aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/570-mac80211_tx_status_crash.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-08-29 08:16:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-08-29 08:16:31 +0000
commiteb896ce900cf69fdb2afb876dbda3a26be4f7895 (patch)
treead65b8cb64fd6ededf8db2e083939090c0fe7e5d /package/mac80211/patches/570-mac80211_tx_status_crash.patch
parent4405faae26cbddd63447a307200d928109286595 (diff)
downloadupstream-eb896ce900cf69fdb2afb876dbda3a26be4f7895.tar.gz
upstream-eb896ce900cf69fdb2afb876dbda3a26be4f7895.tar.bz2
upstream-eb896ce900cf69fdb2afb876dbda3a26be4f7895.zip
mac80211: reorganize patches
SVN-Revision: 33289
Diffstat (limited to 'package/mac80211/patches/570-mac80211_tx_status_crash.patch')
-rw-r--r--package/mac80211/patches/570-mac80211_tx_status_crash.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/mac80211/patches/570-mac80211_tx_status_crash.patch b/package/mac80211/patches/570-mac80211_tx_status_crash.patch
new file mode 100644
index 0000000000..abcf56e1d5
--- /dev/null
+++ b/package/mac80211/patches/570-mac80211_tx_status_crash.patch
@@ -0,0 +1,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