blob: abcf56e1d5947bb2e537a8f949b7835fd62354f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -517,6 +517,8 @@ void ieee80211_tx_status(struct ieee8021
if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) {
u64 cookie = (unsigned long)skb;
+ bool found = false;
+
acked = info->flags & IEEE80211_TX_STAT_ACK;
/*
@@ -524,8 +526,18 @@ void ieee80211_tx_status(struct ieee8021
* we cannot use skb->dev->ieee80211_ptr
*/
- if (ieee80211_is_nullfunc(hdr->frame_control) ||
- ieee80211_is_qos_nullfunc(hdr->frame_control))
+ list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+ if (skb->dev != sdata->dev)
+ continue;
+
+ found = true;
+ break;
+ }
+
+ if (!found)
+ skb->dev = NULL;
+ else 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
|