Hi, On 09/10/14 20:19, Fabian Raetz wrote: > On Wed, Sep 10, 2014 at 02:42:43PM +0200, Marcin Piotr Pawlowski wrote: >> Yes, I think that it could be is possible to double clean the node cache. >> >> Updated diff with suggestion from Stefan. > > Hi, > > this patch works for me too. > > But is the problem not specific to the > iwn(4) driver or at least only specific to drivers which override the > default state machine and not calling into the original state machine when > IEEE80211_S_SCAN is entered? > > ieee80211_begin_scan() calls ieee80211_free_allnodes() which prevents > the problem for drivers which use the default scanning infrastructure. > > So would it make sense to move the call to ieee80211_clean_cached() into > iwn(4) like in the modified patch below? > > I experimented a bit with calling ieee80211_free_allnodes() here as it > is called in default scanning infrastructure but this does not work for > me (yet) :)
The ieee80211_begin_scan is used by ieee80211_newstate() but ifconfig scan is done by ioctl(SIOCS80211SCAN) which is processes by the ieee80211_ioctl() that then invokes ieee80211_new_state(). So both paths are independent and this issue is not specific to the iwn driver. I hope that I have not overlooked something. Best regards, mpp