diff options
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 28cfa981cfb1..8cd72914cdaf 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -155,13 +155,10 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
155 | return; | 155 | return; |
156 | } | 156 | } |
157 | 157 | ||
158 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 158 | ps_dbg_ratelimited(sta->sdata, |
159 | if (net_ratelimit()) | 159 | "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n", |
160 | wiphy_debug(local->hw.wiphy, | 160 | skb_queue_len(&sta->tx_filtered[ac]), |
161 | "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n", | 161 | !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies); |
162 | skb_queue_len(&sta->tx_filtered[ac]), | ||
163 | !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies); | ||
164 | #endif | ||
165 | dev_kfree_skb(skb); | 162 | dev_kfree_skb(skb); |
166 | } | 163 | } |
167 | 164 | ||
@@ -520,36 +517,21 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
520 | 517 | ||
521 | if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { | 518 | if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { |
522 | u64 cookie = (unsigned long)skb; | 519 | u64 cookie = (unsigned long)skb; |
520 | acked = info->flags & IEEE80211_TX_STAT_ACK; | ||
523 | 521 | ||
524 | if (ieee80211_is_nullfunc(hdr->frame_control) || | 522 | /* |
525 | ieee80211_is_qos_nullfunc(hdr->frame_control)) { | 523 | * TODO: When we have non-netdev frame TX, |
526 | acked = info->flags & IEEE80211_TX_STAT_ACK; | 524 | * we cannot use skb->dev->ieee80211_ptr |
525 | */ | ||
527 | 526 | ||
527 | if (ieee80211_is_nullfunc(hdr->frame_control) || | ||
528 | ieee80211_is_qos_nullfunc(hdr->frame_control)) | ||
528 | cfg80211_probe_status(skb->dev, hdr->addr1, | 529 | cfg80211_probe_status(skb->dev, hdr->addr1, |
529 | cookie, acked, GFP_ATOMIC); | 530 | cookie, acked, GFP_ATOMIC); |
530 | } else { | 531 | else |
531 | struct ieee80211_work *wk; | ||
532 | |||
533 | rcu_read_lock(); | ||
534 | list_for_each_entry_rcu(wk, &local->work_list, list) { | ||
535 | if (wk->type != IEEE80211_WORK_OFFCHANNEL_TX) | ||
536 | continue; | ||
537 | if (wk->offchan_tx.frame != skb) | ||
538 | continue; | ||
539 | wk->offchan_tx.status = true; | ||
540 | break; | ||
541 | } | ||
542 | rcu_read_unlock(); | ||
543 | if (local->hw_roc_skb_for_status == skb) { | ||
544 | cookie = local->hw_roc_cookie ^ 2; | ||
545 | local->hw_roc_skb_for_status = NULL; | ||
546 | } | ||
547 | |||
548 | cfg80211_mgmt_tx_status( | 532 | cfg80211_mgmt_tx_status( |
549 | skb->dev, cookie, skb->data, skb->len, | 533 | skb->dev->ieee80211_ptr, cookie, skb->data, |
550 | !!(info->flags & IEEE80211_TX_STAT_ACK), | 534 | skb->len, acked, GFP_ATOMIC); |
551 | GFP_ATOMIC); | ||
552 | } | ||
553 | } | 535 | } |
554 | 536 | ||
555 | if (unlikely(info->ack_frame_id)) { | 537 | if (unlikely(info->ack_frame_id)) { |
@@ -589,7 +571,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
589 | /* send frame to monitor interfaces now */ | 571 | /* send frame to monitor interfaces now */ |
590 | rtap_len = ieee80211_tx_radiotap_len(info); | 572 | rtap_len = ieee80211_tx_radiotap_len(info); |
591 | if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { | 573 | if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { |
592 | printk(KERN_ERR "ieee80211_tx_status: headroom too small\n"); | 574 | pr_err("ieee80211_tx_status: headroom too small\n"); |
593 | dev_kfree_skb(skb); | 575 | dev_kfree_skb(skb); |
594 | return; | 576 | return; |
595 | } | 577 | } |