summaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch')
-rw-r--r--package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch b/package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch
new file mode 100644
index 0000000000..6c325ee844
--- /dev/null
+++ b/package/kernel/mac80211/patches/brcm/397-brcmfmac-remove-monitor-interface-when-detaching.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 18 Nov 2019 13:35:20 +0100
+Subject: [PATCH 5.5] brcmfmac: remove monitor interface when detaching
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes a minor WARNING in the cfg80211:
+[ 130.658034] ------------[ cut here ]------------
+[ 130.662805] WARNING: CPU: 1 PID: 610 at net/wireless/core.c:954 wiphy_unregister+0xb4/0x198 [cfg80211]
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+@@ -1371,6 +1371,11 @@ void brcmf_detach(struct device *dev)
+ brcmf_fweh_detach(drvr);
+ brcmf_proto_detach(drvr);
+
++ if (drvr->mon_if) {
++ brcmf_net_detach(drvr->mon_if->ndev, false);
++ drvr->mon_if = NULL;
++ }
++
+ /* make sure primary interface removed last */
+ for (i = BRCMF_MAX_IFS - 1; i > -1; i--) {
+ if (drvr->iflist[i])