Skip to contentSkip to conversation

mac80211: Fix IBSS disconnect

PATCH Applied Sujith Manoharan 2 participants 2 messages Jan 30, 2014 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mac80211: Fix IBSS disconnect

From: Sujith Manoharan <[email protected]>

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.

---
v2 - Remove BSS entry in the CSA-failure case too.

 net/mac80211/ibss.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/mac80211/ibss.c +1 -4
index 771080e..2796a19 100644
@@ -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)
Signature · 1 line
1.8.5.3
maintainer Applied
#1 lore raw
Quoted 9 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

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.

Quoted 7 lines

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.

Applied.

johannes