diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2018-04-26 12:50:08 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2018-04-26 12:50:08 +0000 |
commit | b5e621a41798b95e9539225bae33e087fcebc12d (patch) | |
tree | f682d47a097afc9b760402d0835a6924f179f01a /sys/dev/pci/if_iwm.c | |
parent | dd64a9bb6b48cd5481a54a4814304303c0100f01 (diff) |
net80211: stub SIOCS80211SCAN, make ifconfig scan instant.
The following removes the functionality of the SIOCS80211SCAN ioctl.
After long discussions with stps@, mpi@, and deraadt@ we decided that
this was the correct way of fixing ifconfig scan from blocking the
network stack.
The kernel will continue scanning in the background and filling the
nodes array, but ifconfig scan commands will now basically do just a
SIOCG80211ALLNODES and pretty print the array. So the output stays the
same but is instant.
In fact, when the interface is freshly brought up, if you type fast
enough, you can see the array being filled by running multiple ifconfig
scans in sequence.
The SIOCS80211SCAN ioctl stays for now as wi(4), pgt(4) and malo(4)
still need it around. But not for long...
Another change that this introduces is the fact that ifconfig scan no
longer plays with UP and DOWN. If the interface is down it complains and
exits. This is needed in order to maintain the nodes list.
Works on iwm(4), iwn(4), urtwn(4), run(4) and athn(4).
Tested by mpi@, landry@, florian@, thanks!
OK mpi@.
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index fa3c1c82cc8..150cb4dcef6 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.226 2018/02/28 14:39:35 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.227 2018/04/26 12:50:07 pirofti Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -6708,9 +6708,6 @@ iwm_stop(struct ifnet *ifp) sc->sc_cmd_resp_pkt[i] = NULL; sc->sc_cmd_resp_len[i] = 0; } - if (ic->ic_scan_lock & IEEE80211_SCAN_REQUEST) - wakeup(&ic->ic_scan_lock); - ic->ic_scan_lock = IEEE80211_SCAN_UNLOCKED; ifp->if_flags &= ~IFF_RUNNING; ifq_clr_oactive(&ifp->if_snd); |