Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cfg80211: call disconnect_wk when AP stops

Since we now prevent regulatory restore during STA disconnect
if concurrent AP interfaces are active, we need to reschedule
this check when the AP state changes. This fixes never doing
a restore when an AP is the last interface to stop. Or to put
it another way: we need to re-check after anything we check
here changes.

Cc: stable@vger.kernel.org
Fixes: 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA disconnect in concurrent interfaces")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+5 -1
+2
net/wireless/ap.c
··· 41 41 cfg80211_sched_dfs_chan_update(rdev); 42 42 } 43 43 44 + schedule_work(&cfg80211_disconnect_work); 45 + 44 46 return err; 45 47 } 46 48
+2
net/wireless/core.h
··· 445 445 bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, 446 446 u32 center_freq_khz, u32 bw_khz); 447 447 448 + extern struct work_struct cfg80211_disconnect_work; 449 + 448 450 /** 449 451 * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable 450 452 * @wiphy: the wiphy to validate against
+1 -1
net/wireless/sme.c
··· 667 667 rtnl_unlock(); 668 668 } 669 669 670 - static DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); 670 + DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); 671 671 672 672 673 673 /*