From 1fc97b3c26908eb26527fefdd8051abe51c65d69 Mon Sep 17 00:00:00 2001 From: wpaul Date: Sun, 1 Feb 2004 21:35:15 +0000 Subject: Use the OID_802_11_CONFIGURATION OID when deciding if the underlying driver is for an 802.11 device or not. At least one driver I have does not support the OID_802_11_NETWORK_TYPES_SUPPORTED OID. Also, for now, don't do anything special in the ndis_suspend() method. I originally wanted to shut down the NIC but leave the IFF_UP flag alone since technically the interface is meant to remain up, but an interrupt may be delivered to the ISR on suspend, and if this happens while the NIC is halted, we will crash, since none of the miniport driver methods will function. This needs to be dealt with properly later, but for now this prevents a panic, and the resume method properly re-inits the NIC. --- sys/dev/if_ndis/if_ndis.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index a40a208..21ed955 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -650,12 +650,12 @@ ndis_attach(dev) ndis_init_dma(sc); /* - * See if the OID_802_11_NETWORK_TYPES_SUPPORTED OID is + * See if the OID_802_11_CONFIGURATION OID is * supported by this driver. If it is, then this an 802.11 * wireless driver, and we should set up media for wireless. */ for (i = 0; i < sc->ndis_oidcnt; i++) { - if (sc->ndis_oids[i] == OID_802_11_NETWORK_TYPES_SUPPORTED) { + if (sc->ndis_oids[i] == OID_802_11_CONFIGURATION) { sc->ndis_80211++; break; } @@ -959,8 +959,10 @@ ndis_suspend(dev) sc = device_get_softc(dev); ifp = &sc->arpcom.ac_if; +#ifdef notdef if (ifp->if_flags & IFF_UP) ndis_stop(sc); +#endif return(0); } -- cgit v1.1