From: Sujith Manoharan Date: Thu, 30 Jan 2014 08:47:28 +0000 (+0530) Subject: mac80211: Fix IBSS disconnect X-Git-Tag: v3.14-rc6~30^2~1^2^2~1^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4c80d9df6d1e4473b1409e4d220ca3d1612125c;p=platform%2Fkernel%2Flinux-exynos.git 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: Reported-by: Simon Wunderlich Signed-off-by: Sujith Manoharan Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 771080e..2796a19 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) 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)