diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-01-30 03:47:28 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-06 03:55:20 -0500 |
commit | d4c80d9df6d1e4473b1409e4d220ca3d1612125c (patch) | |
tree | cfce7bfe004dfe2c733a272aeb22f57ed957249f /net/mac80211 | |
parent | 0297ea17bf7879fb5846fafd1be4c0471e72848d (diff) |
mac80211: Fix IBSS disconnect
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.
Cc: <stable@vger.kernel.org>
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ibss.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 771080ec7212..2796a198728f 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -695,12 +695,9 @@ static void ieee80211_ibss_disconnect(struct ieee80211_sub_if_data *sdata) | |||
695 | struct cfg80211_bss *cbss; | 695 | struct cfg80211_bss *cbss; |
696 | struct beacon_data *presp; | 696 | struct beacon_data *presp; |
697 | struct sta_info *sta; | 697 | struct sta_info *sta; |
698 | int active_ibss; | ||
699 | u16 capability; | 698 | u16 capability; |
700 | 699 | ||
701 | active_ibss = ieee80211_sta_active_ibss(sdata); | 700 | if (!is_zero_ether_addr(ifibss->bssid)) { |
702 | |||
703 | if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) { | ||
704 | capability = WLAN_CAPABILITY_IBSS; | 701 | capability = WLAN_CAPABILITY_IBSS; |
705 | 702 | ||
706 | if (ifibss->privacy) | 703 | if (ifibss->privacy) |