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.
This commit is contained in:
Bill Paul 2004-02-01 21:35:15 +00:00
parent 8600a4122a
commit f0aed0dbd0

View File

@ -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);
}