aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/status.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-18 14:07:15 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 07:58:22 -0400
commitf142c6b906da451ded2c7a8e17b2a0e6fee3e891 (patch)
treeed23b88e0cc23cb15fa28563d27965421ed47dd7 /net/mac80211/status.c
parent98104fdeda63d57631c9f89e90a7b83b58fcee40 (diff)
mac80211: support P2P Device abstraction
After cfg80211 got a P2P Device abstraction, add support to mac80211. Whether it really is supported or not will depend on whether or not the driver has support for it, but mac80211 needs to change to be able to support drivers that need a P2P Device. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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)) {