summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-01-30 12:47:28 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-23 01:34:42 +0400
commit6ad076da3661424f02b6bcfd840103f9e0d1cf3b (patch)
tree85243aecd2fe181a09477c5d6853c010999c769b /net
parentd88957ea3195d0fd4ccd239bb674a82e3cf961a5 (diff)
downloadlinux-6ad076da3661424f02b6bcfd840103f9e0d1cf3b.tar.xz
mac80211: Fix IBSS disconnect
commit d4c80d9df6d1e4473b1409e4d220ca3d1612125c upstream. Currently, when a station leaves an IBSS network, the corresponding BSS is not dropped from cfg80211 if there are other active stations in the network. But, the small window that is present when trying to determine a station's status based on IEEE80211_IBSS_MERGE_INTERVAL introduces a race. Instead of trying to keep the BSS, always remove it when leaving an IBSS network. There is not much benefit to retain the BSS entry since it will be added with a subsequent join operation. This fixes an issue where a dangling BSS entry causes ath9k to wait for a beacon indefinitely. Reported-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 27a39de89679..d40e0e1e7a4e 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -687,12 +687,9 @@ static void ieee80211_ibss_disconnect(struct ieee80211_sub_if_data *sdata)
struct cfg80211_bss *cbss;
struct beacon_data *presp;
struct sta_info *sta;
- int active_ibss;
u16 capability;
- active_ibss = ieee80211_sta_active_ibss(sdata);
-
- if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
+ if (!is_zero_ether_addr(ifibss->bssid)) {
capability = WLAN_CAPABILITY_IBSS;
if (ifibss->privacy)