Small cleanup of the WPA code additions. The SIOCG80211 and SIOCS80211

ioctls are now handled explicitly, but we can't really do anything
with them unless the NIC is up (trying to get/set a parameter when
the NDIS driver isn't running always yields an error). If something
invokes either of these ioctls and the NIC isn't initialized, punt
to the default ieee80211_ioctl() routine.
This commit is contained in:
Bill Paul 2005-04-20 02:17:53 +00:00
parent 6b23be5f70
commit d365e2f833

View File

@ -2090,16 +2090,16 @@ ndis_ioctl(ifp, command, data)
ndis_set_offload(sc); ndis_set_offload(sc);
break; break;
case SIOCG80211: case SIOCG80211:
if (!NDIS_INITIALIZED(sc))
goto do_80211;
if (sc->ndis_80211) if (sc->ndis_80211)
error = ndis_80211_ioctl_get(ifp, command, data); error = ndis_80211_ioctl_get(ifp, command, data);
else else
error = ENOTTY; error = ENOTTY;
break; break;
case SIOCS80211: case SIOCS80211:
if (!NDIS_INITIALIZED(sc)) { if (!NDIS_INITIALIZED(sc))
error = 0; goto do_80211;
break;
}
if (sc->ndis_80211) if (sc->ndis_80211)
error = ndis_80211_ioctl_set(ifp, command, data); error = ndis_80211_ioctl_set(ifp, command, data);
else else
@ -2117,6 +2117,7 @@ ndis_ioctl(ifp, command, data)
if (error != ENOTTY) if (error != ENOTTY)
break; break;
default: default:
do_80211:
sc->ndis_skip = 1; sc->ndis_skip = 1;
if (sc->ndis_80211) { if (sc->ndis_80211) {
error = ieee80211_ioctl(&sc->ic, command, data); error = ieee80211_ioctl(&sc->ic, command, data);