From 0574916d374dbdbf8d9f6b8ce2d4f13548effb03 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 20 Dec 2009 11:04:43 +0000 Subject: mac80211: fix a race condition in ad-hoc bringup with fixed bssid git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18859 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/mac80211/patches/200-mac80211_ibss_fix.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 package/mac80211/patches/200-mac80211_ibss_fix.patch (limited to 'package/mac80211') diff --git a/package/mac80211/patches/200-mac80211_ibss_fix.patch b/package/mac80211/patches/200-mac80211_ibss_fix.patch new file mode 100644 index 000000000..c2fb1d7a2 --- /dev/null +++ b/package/mac80211/patches/200-mac80211_ibss_fix.patch @@ -0,0 +1,20 @@ +--- a/net/mac80211/ibss.c ++++ b/net/mac80211/ibss.c +@@ -382,6 +382,7 @@ static void ieee80211_rx_bss_info(struct + struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, + u8 *bssid,u8 *addr, u32 supp_rates) + { ++ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; + struct ieee80211_local *local = sdata->local; + struct sta_info *sta; + int band = local->hw.conf.channel->band; +@@ -397,6 +398,9 @@ struct sta_info *ieee80211_ibss_add_sta( + return NULL; + } + ++ if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) ++ return NULL; ++ + if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) + return NULL; + -- cgit v1.2.3