View Single Post
  #2   (View Single Post)  
Old 29th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
Join Date: May 2008
Location: USA
Posts: 7,636

Another search string in Google will provide more information, as it will search through one of the mailing list archive sites:"ifconfig scan openbsd"

This led me to a brief discussion on the tech@ mailing list specific to the iwn(4) driver:

Looking through the CVS log for src/sys/dev/pci/if_iwn.c, I can see that this was committed as revision 1.200, then fixed due to a regression in revision r.201. But the next commit -- 1.202 -- changes the way scans work across a broad swath of 802.11 drivers. One of these patches may be the reason for your apparent incomplete scan. You can try reverting them and build a test kernel. If reverting a patch doesn't build cleanly, you can always grab the kernel source from the CVS repository at a point in time prior to the commit.
revision 1.202
date: 2018/04/26 12:50:07; author: pirofti; state: Exp; lines: +1 -6; commitid: dXAOUb33rnol1noX;
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@.

Last edited by jggimi; 29th December 2018 at 02:31 PM. Reason: clarity, typos
Reply With Quote