aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-07-24 18:42:36 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:10:59 -0400
commit8c7d857c4a4a552d8d3e1b2e24e1864ec2989285 (patch)
tree8fb6920044ee856549cb4d969ef4d4ae78374e08 /net
parent7eeff74c29259e9cb7765e3845c0b74057f744da (diff)
mac80211: don't call mgd_prepare_tx when associated
This doesn't make any sense since we are expected to be on the medium or at least to Tx only when we are on the right channel and the AP/GO can hear us. Move the call to mgd_prepare_tx() for deauth to be only done in case we're sending a deauth while not associated. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 81b2269e8f3a..f0d6fa283071 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -610,8 +610,6 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
610 IEEE80211_SKB_CB(skb)->flags |= 610 IEEE80211_SKB_CB(skb)->flags |=
611 IEEE80211_TX_INTFL_DONT_ENCRYPT; 611 IEEE80211_TX_INTFL_DONT_ENCRYPT;
612 612
613 drv_mgd_prepare_tx(local, sdata);
614
615 ieee80211_tx_skb(sdata, skb); 613 ieee80211_tx_skb(sdata, skb);
616 } 614 }
617} 615}
@@ -3504,14 +3502,17 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
3504 req->bssid, req->reason_code); 3502 req->bssid, req->reason_code);
3505 3503
3506 if (ifmgd->associated && 3504 if (ifmgd->associated &&
3507 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) 3505 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) {
3508 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, 3506 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
3509 req->reason_code, true, frame_buf); 3507 req->reason_code, true, frame_buf);
3510 else 3508 } else {
3509 drv_mgd_prepare_tx(sdata->local, sdata);
3511 ieee80211_send_deauth_disassoc(sdata, req->bssid, 3510 ieee80211_send_deauth_disassoc(sdata, req->bssid,
3512 IEEE80211_STYPE_DEAUTH, 3511 IEEE80211_STYPE_DEAUTH,
3513 req->reason_code, true, 3512 req->reason_code, true,
3514 frame_buf); 3513 frame_buf);
3514 }
3515
3515 mutex_unlock(&ifmgd->mtx); 3516 mutex_unlock(&ifmgd->mtx);
3516 3517
3517 __cfg80211_send_deauth(sdata->dev, frame_buf, DEAUTH_DISASSOC_LEN); 3518 __cfg80211_send_deauth(sdata->dev, frame_buf, DEAUTH_DISASSOC_LEN);