Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328162
b: refs/heads/master
c: 1bad538
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Sep 10, 2012
1 parent 81e130f commit 3a0d723
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b22cfcfcae5b2c1e9b43543b6a23e5ef517de8f8
refs/heads/master: 1bad53824305807bb5cf49d6b588dd9d867586c6
48 changes: 30 additions & 18 deletions trunk/net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,29 +517,41 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)

if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) {
u64 cookie = (unsigned long)skb;
bool found = false;

acked = info->flags & IEEE80211_TX_STAT_ACK;

if (ieee80211_is_nullfunc(hdr->frame_control) ||
ieee80211_is_qos_nullfunc(hdr->frame_control)) {
cfg80211_probe_status(skb->dev, hdr->addr1,
cookie, acked, GFP_ATOMIC);
} else if (skb->dev) {
cfg80211_mgmt_tx_status(
skb->dev->ieee80211_ptr, cookie, skb->data,
skb->len, acked, GFP_ATOMIC);
} else {
struct ieee80211_sub_if_data *p2p_sdata;
rcu_read_lock();

list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (!sdata->dev)
continue;

rcu_read_lock();
if (skb->dev != sdata->dev)
continue;

p2p_sdata = rcu_dereference(local->p2p_sdata);
if (p2p_sdata) {
cfg80211_mgmt_tx_status(
&p2p_sdata->wdev, cookie, skb->data,
skb->len, acked, GFP_ATOMIC);
}
rcu_read_unlock();
found = true;
break;
}

if (!skb->dev) {
sdata = rcu_dereference(local->p2p_sdata);
if (sdata)
found = true;
}

if (!found)
skb->dev = NULL;
else if (ieee80211_is_nullfunc(hdr->frame_control) ||
ieee80211_is_qos_nullfunc(hdr->frame_control)) {
cfg80211_probe_status(sdata->dev, hdr->addr1,
cookie, acked, GFP_ATOMIC);
} else {
cfg80211_mgmt_tx_status(&sdata->wdev, cookie, skb->data,
skb->len, acked, GFP_ATOMIC);
}

rcu_read_unlock();
}

if (unlikely(info->ack_frame_id)) {
Expand Down

0 comments on commit 3a0d723

Please sign in to comment.