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.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 8cd72914cdaf..b0801b7d572d 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -519,19 +519,27 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
519 u64 cookie = (unsigned long)skb; 519 u64 cookie = (unsigned long)skb;
520 acked = info->flags & IEEE80211_TX_STAT_ACK; 520 acked = info->flags & IEEE80211_TX_STAT_ACK;
521 521
522 /*
523 * TODO: When we have non-netdev frame TX,
524 * we cannot use skb->dev->ieee80211_ptr
525 */
526
527 if (ieee80211_is_nullfunc(hdr->frame_control) || 522 if (ieee80211_is_nullfunc(hdr->frame_control) ||
528 ieee80211_is_qos_nullfunc(hdr->frame_control)) 523 ieee80211_is_qos_nullfunc(hdr->frame_control)) {
529 cfg80211_probe_status(skb->dev, hdr->addr1, 524 cfg80211_probe_status(skb->dev, hdr->addr1,
530 cookie, acked, GFP_ATOMIC); 525 cookie, acked, GFP_ATOMIC);
531 else 526 } else if (skb->dev) {
532 cfg80211_mgmt_tx_status( 527 cfg80211_mgmt_tx_status(
533 skb->dev->ieee80211_ptr, cookie, skb->data, 528 skb->dev->ieee80211_ptr, cookie, skb->data,
534 skb->len, acked, GFP_ATOMIC); 529 skb->len, acked, GFP_ATOMIC);
530 } else {
531 struct ieee80211_sub_if_data *p2p_sdata;
532
533 rcu_read_lock();
534
535 p2p_sdata = rcu_dereference(local->p2p_sdata);
536 if (p2p_sdata) {
537 cfg80211_mgmt_tx_status(
538 &p2p_sdata->wdev, cookie, skb->data,
539 skb->len, acked, GFP_ATOMIC);
540 }
541 rcu_read_unlock();
542 }
535 } 543 }
536 544
537 if (unlikely(info->ack_frame_id)) { 545 if (unlikely(info->ack_frame_id)) {