]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cfg80211: call disconnect_wk when AP stops
authorJohannes Berg <johannes.berg@intel.com>
Fri, 1 Feb 2019 10:09:54 +0000 (11:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Feb 2019 07:11:04 +0000 (08:11 +0100)
commit e005bd7ddea06784c1eb91ac5bb6b171a94f3b05 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/ap.c
net/wireless/core.h
net/wireless/sme.c

index 882d97bdc6bfd49ac3acf80f5674821b15f46e35..550ac9d827fe7d7f266f0ac511afec0aa4d8f8c3 100644 (file)
@@ -41,6 +41,8 @@ int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
                cfg80211_sched_dfs_chan_update(rdev);
        }
 
+       schedule_work(&cfg80211_disconnect_work);
+
        return err;
 }
 
index c61dbba8bf479e5f0b411cda0a07611d93ae5458..7f4d5f2f911203a28effd1c59e88a35c18f6360f 100644 (file)
@@ -444,6 +444,8 @@ void cfg80211_process_wdev_events(struct wireless_dev *wdev);
 bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range,
                                u32 center_freq_khz, u32 bw_khz);
 
+extern struct work_struct cfg80211_disconnect_work;
+
 /**
  * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable
  * @wiphy: the wiphy to validate against
index f741d8376a463b588231550c4cca661e55d2e6b7..7d34cb884840e96d68b43e5f90036d3d3cd306dd 100644 (file)
@@ -667,7 +667,7 @@ static void disconnect_work(struct work_struct *work)
        rtnl_unlock();
 }
 
-static DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);
+DECLARE_WORK(cfg80211_disconnect_work, disconnect_work);
 
 
 /*