summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2005-04-20 02:17:53 +0000
committerwpaul <wpaul@FreeBSD.org>2005-04-20 02:17:53 +0000
commitc67b019336c570d65b0b274141b21ea9cbb654ae (patch)
tree3d6d61ba2b1d238f2a95ec39947ff271b8c9a396 /sys
parent7deff5f03cb398c1f5e68a93dc5d1d18992663f0 (diff)
downloadFreeBSD-src-c67b019336c570d65b0b274141b21ea9cbb654ae.zip
FreeBSD-src-c67b019336c570d65b0b274141b21ea9cbb654ae.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/if_ndis/if_ndis.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c
index 3dff334..aa0f5c2 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -2090,16 +2090,16 @@ ndis_ioctl(ifp, command, data)
ndis_set_offload(sc);
break;
case SIOCG80211:
+ if (!NDIS_INITIALIZED(sc))
+ goto do_80211;
if (sc->ndis_80211)
error = ndis_80211_ioctl_get(ifp, command, data);
else
error = ENOTTY;
break;
case SIOCS80211:
- if (!NDIS_INITIALIZED(sc)) {
- error = 0;
- break;
- }
+ if (!NDIS_INITIALIZED(sc))
+ goto do_80211;
if (sc->ndis_80211)
error = ndis_80211_ioctl_set(ifp, command, data);
else
@@ -2117,6 +2117,7 @@ ndis_ioctl(ifp, command, data)
if (error != ENOTTY)
break;
default:
+do_80211:
sc->ndis_skip = 1;
if (sc->ndis_80211) {
error = ieee80211_ioctl(&sc->ic, command, data);
OpenPOWER on IntegriCloud