On Thu, Nov 07, 2019 at 09:22:40AM +0000, Stuart Henderson wrote: > On 2019/11/07 11:10, Lauri Tirkkonen wrote: > > I think it might be a little confusing to make this operation implicit > > in another operation (ie. list APs), and for root only. How does a user > > find out about this feature? > > The manpage part of the diff is yet to be written ;) > > > Wouldn't it be better to have a separate > > command to trigger the scan, eg. 'rescan'? That could be documented and > > restricted to root. > > But the command is not "ifconfig list_aps", it's "ifconfig scan" and > it's really expected that this would trigger a scan. To me the current > behaviour (where "ifconfig iwm0 scan" might give you a list from 300km > while you were travelling connected to your phone hotspot) with no > way to update it short of forcing a disconnection is more confusing.
Note also that this diff only fixes the issue for drivers which support background scanning in the first place, namely iwn(4) and iwm(4). Other drivers will still require down/up because they need to be moved out of RUN (associated) state in order to scan.
