Skip to content

Commit

Permalink
mac80211: Fix IBSS disconnect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and Johannes Berg committed Feb 6, 2014
1 parent 0297ea1 commit d4c80d9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d4c80d9

Please sign in to comment.