Don't try to distinguish "unsupported OID" from "hard error".

We don't seem to reliably get the NDIS "unsupported OID" errors from
packet.dll, so just treat *all* OID get errors as "try something else".
diff --git a/pcap-npf.c b/pcap-npf.c
index dbf2b61..c07c291 100644
--- a/pcap-npf.c
+++ b/pcap-npf.c
@@ -129,11 +129,12 @@
 /*
  * Sigh.  PacketRequest() will have made a DeviceIoControl()
  * call to the NPF driver to perform the OID request, with a
- * BIOCQUERYOID ioctl.  It looks as if the returned status
- * will be an NDIS_STATUS_ value, but those aren't defined
- * in any userland header.
- *
- * So we define them here.
+ * BIOCQUERYOID ioctl.  The kernel code should get back one
+ * of NDIS_STATUS_INVALID_OID, NDIS_STATUS_NOT_SUPPORTED,
+ * or NDIS_STATUS_NOT_RECOGNIZED if the OID request isn't
+ * supported by the OS or the driver, but that doesn't seem
+ * to make it to the caller of PacketRequest() in a
+ * reiable fashion.
  */
 #define NDIS_STATUS_INVALID_OID		0xc0010017
 #define NDIS_STATUS_NOT_SUPPORTED	0xc00000bb	/* STATUS_NOT_SUPPORTED */
@@ -165,22 +166,13 @@
 	oid_data_arg->Oid = oid;
 	oid_data_arg->Length = (ULONG)(*lenp);	/* XXX - check for ridiculously large value? */
 	if (!PacketRequest(adapter, FALSE, oid_data_arg)) {
-		int status;
-		DWORD request_error;
 		char errmsgbuf[PCAP_ERRBUF_SIZE+1];
 
-		request_error = GetLastError();
-		if (request_error == NDIS_STATUS_INVALID_OID ||
-		    request_error == NDIS_STATUS_NOT_SUPPORTED ||
-		    request_error == NDIS_STATUS_NOT_RECOGNIZED)
-			status = PCAP_ERROR_OPERATION_NOTSUP;
-		else
-			status = PCAP_ERROR;
-		pcap_win32_err_to_str(request_error, errmsgbuf);
+		pcap_win32_err_to_str(GetLastError(), errmsgbuf);
 		pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE,
 		    "Error calling PacketRequest: %s", errmsgbuf);
 		free(oid_data_arg);
-		return (status);
+		return (-1);
 	}
 
 	/*
@@ -1500,13 +1492,6 @@
 		len = sizeof (phys_medium);
 		status = oid_get_request(adapter, gen_physical_medium_oids[i],
 		    &phys_medium, &len, errbuf);
-		if (status == PCAP_ERROR) {
-			/*
-			 * Failed with a hard error.
-			 */
-			PacketCloseAdapter(adapter);
-			return (-1);
-		}
 		if (status == 0) {
 			/*
 			 * Success.
@@ -1514,8 +1499,10 @@
 			break;
 		}
 		/*
-		 * Failed with "I don't support that OID", so try the
-		 * next one, if we have a next one.
+		 * Failed.  We can't determine whether it failed
+		 * because that particular OID isn't supported
+		 * or because some other problem occurred, so we
+		 * just drive on and try the next OID.
 		 */
 	}
 	if (status == 0) {
@@ -1546,13 +1533,6 @@
 	len = sizeof(connect_state_ex);
 	status = oid_get_request(adapter, OID_GEN_MEDIA_CONNECT_STATUS_EX,
 	    &connect_state_ex, &len, errbuf);
-	if (status == PCAP_ERROR) {
-		/*
-		 * Fatal error.
-		 */
-		PacketCloseAdapter(adapter);
-		return (-1);
-	}
 	if (status == 0) {
 		switch (connect_state_ex) {
 
@@ -1576,22 +1556,15 @@
 	 * OID_GEN_MEDIA_CONNECT_STATUS_EX isn't supported because it's
 	 * not in our SDK.
 	 */
-	status = PCAP_ERROR_OPERATION_NOTSUP;
+	status = -1;
 #endif
-	if (status == PCAP_ERROR_OPERATION_NOTSUP) {
+	if (status == -1) {
 		/*
-		 * OK, OID_GEN_MEDIA_CONNECT_STATUS_EX isn't supported,
+		 * OK, OID_GEN_MEDIA_CONNECT_STATUS_EX didn't work,
 		 * try OID_GEN_MEDIA_CONNECT_STATUS.
 		 */
 		status = oid_get_request(adapter, OID_GEN_MEDIA_CONNECT_STATUS,
 		    &connect_state, &len, errbuf);
-		if (status == PCAP_ERROR) {
-			/*
-			 * Fatal error.
-			 */
-			PacketCloseAdapter(adapter);
-			return (-1);
-		}
 		if (status == 0) {
 			switch (connect_state) {
 
diff --git a/pcap.c b/pcap.c
index b2c2790..a60344e 100644
--- a/pcap.c
+++ b/pcap.c
@@ -3312,9 +3312,6 @@
 
 	case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
 		return ("That device doesn't support that time stamp precision");
-
-	case PCAP_ERROR_OPERATION_NOTSUP:
-		return ("That device doesn't support that operation");
 	}
 	(void)pcap_snprintf(ebuf, sizeof ebuf, "Unknown error: %d", errnum);
 	return(ebuf);
diff --git a/pcap/pcap.h b/pcap/pcap.h
index 4ea9592..f809dd1 100644
--- a/pcap/pcap.h
+++ b/pcap/pcap.h
@@ -302,7 +302,6 @@
 #define PCAP_ERROR_CANTSET_TSTAMP_TYPE	-10	/* this device doesn't support setting the time stamp type */
 #define PCAP_ERROR_PROMISC_PERM_DENIED	-11	/* you don't have permission to capture in promiscuous mode */
 #define PCAP_ERROR_TSTAMP_PRECISION_NOTSUP -12  /* the requested time stamp precision is not supported */
-#define PCAP_ERROR_OPERATION_NOTSUP	-13	/* OID operation not supported by adapter */
 
 /*
  * Warning codes for the pcap API.