aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-07 14:22:28 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-25 09:42:39 -0400
commit1852d40eaba36fe1e97e0e497ffce291c99f5886 (patch)
tree6eb0435e6943fd7605b4fcf9d6543d735cbb03b6 /net
parent8bf24293453a10a696bcd00abb1248e6365f66c2 (diff)
mac80211: ibss: disable beaconing before freeing beacon
If we don't disable beaconing, the driver might attempt to continue, but would fail to request a beacon. That's strange, so disable beaconing first. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 539d4a11b47b..bd02fac188bd 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -58,14 +58,6 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
58 /* Reset own TSF to allow time synchronization work. */ 58 /* Reset own TSF to allow time synchronization work. */
59 drv_reset_tsf(local, sdata); 59 drv_reset_tsf(local, sdata);
60 60
61 skb = ifibss->skb;
62 RCU_INIT_POINTER(ifibss->presp, NULL);
63 synchronize_rcu();
64 skb->data = skb->head;
65 skb->len = 0;
66 skb_reset_tail_pointer(skb);
67 skb_reserve(skb, sdata->local->hw.extra_tx_headroom);
68
69 if (!ether_addr_equal(ifibss->bssid, bssid)) 61 if (!ether_addr_equal(ifibss->bssid, bssid))
70 sta_info_flush(sdata); 62 sta_info_flush(sdata);
71 63
@@ -73,10 +65,21 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
73 if (sdata->vif.bss_conf.ibss_joined) { 65 if (sdata->vif.bss_conf.ibss_joined) {
74 sdata->vif.bss_conf.ibss_joined = false; 66 sdata->vif.bss_conf.ibss_joined = false;
75 sdata->vif.bss_conf.ibss_creator = false; 67 sdata->vif.bss_conf.ibss_creator = false;
68 sdata->vif.bss_conf.enable_beacon = false;
76 netif_carrier_off(sdata->dev); 69 netif_carrier_off(sdata->dev);
77 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IBSS); 70 ieee80211_bss_info_change_notify(sdata,
71 BSS_CHANGED_IBSS |
72 BSS_CHANGED_BEACON_ENABLED);
78 } 73 }
79 74
75 skb = ifibss->skb;
76 RCU_INIT_POINTER(ifibss->presp, NULL);
77 synchronize_rcu();
78 skb->data = skb->head;
79 skb->len = 0;
80 skb_reset_tail_pointer(skb);
81 skb_reserve(skb, sdata->local->hw.extra_tx_headroom);
82
80 sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; 83 sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
81 84
82 cfg80211_chandef_create(&chandef, chan, ifibss->channel_type); 85 cfg80211_chandef_create(&chandef, chan, ifibss->channel_type);