mac80211: fix tx queue allocation for active monitor interfaces
authorFelix Fietkau <nbd@nbd.name>
Sat, 22 Sep 2018 13:18:46 +0000 (15:18 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 22 Sep 2018 16:43:29 +0000 (18:43 +0200)
Fixes a crash with drivers like ath9k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/patches/394-mac80211-allocate-TXQs-for-active-monitor-interfaces.patch [new file with mode: 0644]

diff --git a/package/kernel/mac80211/patches/394-mac80211-allocate-TXQs-for-active-monitor-interfaces.patch b/package/kernel/mac80211/patches/394-mac80211-allocate-TXQs-for-active-monitor-interfaces.patch
new file mode 100644 (file)
index 0000000..c5c6586
--- /dev/null
@@ -0,0 +1,26 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Sat, 22 Sep 2018 15:05:59 +0200
+Subject: [PATCH] mac80211: allocate TXQs for active monitor interfaces
+
+Monitor mode interfaces with the active flag are passed down to the driver.
+Drivers using TXQ expect that all interfaces have allocated TXQs before
+they get added.
+
+Fixes: 79af1f866193d ("mac80211: avoid allocating TXQs that won't be used")
+Cc: stable@vger.kernel.org
+Reported-by: Catrinel Catrinescu <cc@80211.de>
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -1816,7 +1816,8 @@ int ieee80211_if_add(struct ieee80211_lo
+               if (local->ops->wake_tx_queue &&
+                   type != NL80211_IFTYPE_AP_VLAN &&
+-                  type != NL80211_IFTYPE_MONITOR)
++                  (type != NL80211_IFTYPE_MONITOR ||
++                   (params->flags & MONITOR_FLAG_ACTIVE)))
+                       txq_size += sizeof(struct txq_info) +
+                                   local->hw.txq_data_size;