aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r--net/mac80211/status.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 8cd72914cda..2ce89732d0f 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -517,21 +517,41 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
517 517
518 if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { 518 if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) {
519 u64 cookie = (unsigned long)skb; 519 u64 cookie = (unsigned long)skb;
520 bool found = false;
521
520 acked = info->flags & IEEE80211_TX_STAT_ACK; 522 acked = info->flags & IEEE80211_TX_STAT_ACK;
521 523
522 /* 524 rcu_read_lock();
523 * TODO: When we have non-netdev frame TX, 525
524 * we cannot use skb->dev->ieee80211_ptr 526 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
525 */ 527 if (!sdata->dev)
528 continue;
529
530 if (skb->dev != sdata->dev)
531 continue;
526 532
527 if (ieee80211_is_nullfunc(hdr->frame_control) || 533 found = true;
528 ieee80211_is_qos_nullfunc(hdr->frame_control)) 534 break;
529 cfg80211_probe_status(skb->dev, hdr->addr1, 535 }
536
537 if (!skb->dev) {
538 sdata = rcu_dereference(local->p2p_sdata);
539 if (sdata)
540 found = true;
541 }
542
543 if (!found)
544 skb->dev = NULL;
545 else if (ieee80211_is_nullfunc(hdr->frame_control) ||
546 ieee80211_is_qos_nullfunc(hdr->frame_control)) {
547 cfg80211_probe_status(sdata->dev, hdr->addr1,
530 cookie, acked, GFP_ATOMIC); 548 cookie, acked, GFP_ATOMIC);
531 else 549 } else {
532 cfg80211_mgmt_tx_status( 550 cfg80211_mgmt_tx_status(&sdata->wdev, cookie, skb->data,
533 skb->dev->ieee80211_ptr, cookie, skb->data, 551 skb->len, acked, GFP_ATOMIC);
534 skb->len, acked, GFP_ATOMIC); 552 }
553
554 rcu_read_unlock();
535 } 555 }
536 556
537 if (unlikely(info->ack_frame_id)) { 557 if (unlikely(info->ack_frame_id)) {