CVSROOT:        /cvs
Module name:    src
Changes by:     piro...@cvs.openbsd.org 2018/04/26 06:50:07

Modified files:
        sbin/ifconfig  : ifconfig.c 
        sys/dev/ic     : athn.c bwfm.c 
        sys/dev/pci    : if_ipw.c if_iwi.c if_iwm.c if_iwn.c if_wpi.c 
        sys/dev/usb    : if_rsu.c 
        sys/net80211   : ieee80211.c ieee80211_ioctl.c ieee80211_node.c 
                         ieee80211_var.h 

Log message:
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@.

Reply via email to