diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-01-06 14:19:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-06 14:19:18 -0500 |
commit | a50f9d5ee0f81271be49d64801bee0dfe84c2127 (patch) | |
tree | f98c2adf753ee9a18913f455da818c12e7e76df2 | |
parent | b7e047358449f8eb5cba8197b42280b676b82e54 (diff) | |
parent | 277d916fc2e959c3f106904116bb4f7b1148d47a (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 2 | ||||
-rw-r--r-- | net/mac80211/tx.c | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index c72438bb2faf..a1b32ee9594a 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2011,7 +2011,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
2011 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { | 2011 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { |
2012 | if (skb->len >= 16) { | 2012 | if (skb->len >= 16) { |
2013 | hdr = (struct ieee80211_hdr *) skb->data; | 2013 | hdr = (struct ieee80211_hdr *) skb->data; |
2014 | mac80211_hwsim_monitor_ack(txi->rate_driver_data[0], | 2014 | mac80211_hwsim_monitor_ack(data2->channel, |
2015 | hdr->addr2); | 2015 | hdr->addr2); |
2016 | } | 2016 | } |
2017 | txi->flags |= IEEE80211_TX_STAT_ACK; | 2017 | txi->flags |= IEEE80211_TX_STAT_ACK; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c558b246ef00..ca7fa7f0613d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -463,7 +463,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
463 | { | 463 | { |
464 | struct sta_info *sta = tx->sta; | 464 | struct sta_info *sta = tx->sta; |
465 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | 465 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); |
466 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | ||
467 | struct ieee80211_local *local = tx->local; | 466 | struct ieee80211_local *local = tx->local; |
468 | 467 | ||
469 | if (unlikely(!sta)) | 468 | if (unlikely(!sta)) |
@@ -474,15 +473,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
474 | !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { | 473 | !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { |
475 | int ac = skb_get_queue_mapping(tx->skb); | 474 | int ac = skb_get_queue_mapping(tx->skb); |
476 | 475 | ||
477 | /* only deauth, disassoc and action are bufferable MMPDUs */ | ||
478 | if (ieee80211_is_mgmt(hdr->frame_control) && | ||
479 | !ieee80211_is_deauth(hdr->frame_control) && | ||
480 | !ieee80211_is_disassoc(hdr->frame_control) && | ||
481 | !ieee80211_is_action(hdr->frame_control)) { | ||
482 | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; | ||
483 | return TX_CONTINUE; | ||
484 | } | ||
485 | |||
486 | ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", | 476 | ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", |
487 | sta->sta.addr, sta->sta.aid, ac); | 477 | sta->sta.addr, sta->sta.aid, ac); |
488 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) | 478 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) |
@@ -525,9 +515,22 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
525 | static ieee80211_tx_result debug_noinline | 515 | static ieee80211_tx_result debug_noinline |
526 | ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) | 516 | ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) |
527 | { | 517 | { |
518 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | ||
519 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | ||
520 | |||
528 | if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) | 521 | if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) |
529 | return TX_CONTINUE; | 522 | return TX_CONTINUE; |
530 | 523 | ||
524 | /* only deauth, disassoc and action are bufferable MMPDUs */ | ||
525 | if (ieee80211_is_mgmt(hdr->frame_control) && | ||
526 | !ieee80211_is_deauth(hdr->frame_control) && | ||
527 | !ieee80211_is_disassoc(hdr->frame_control) && | ||
528 | !ieee80211_is_action(hdr->frame_control)) { | ||
529 | if (tx->flags & IEEE80211_TX_UNICAST) | ||
530 | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; | ||
531 | return TX_CONTINUE; | ||
532 | } | ||
533 | |||
531 | if (tx->flags & IEEE80211_TX_UNICAST) | 534 | if (tx->flags & IEEE80211_TX_UNICAST) |
532 | return ieee80211_tx_h_unicast_ps_buf(tx); | 535 | return ieee80211_tx_h_unicast_ps_buf(tx); |
533 | else | 536 | else |