6c325ee844c3766252c7af62e0abd778de19a394
[oweals/openwrt.git] /
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Mon, 18 Nov 2019 13:35:20 +0100
3 Subject: [PATCH 5.5] brcmfmac: remove monitor interface when detaching
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 This fixes a minor WARNING in the cfg80211:
9 [  130.658034] ------------[ cut here ]------------
10 [  130.662805] WARNING: CPU: 1 PID: 610 at net/wireless/core.c:954 wiphy_unregister+0xb4/0x198 [cfg80211]
11
12 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 ---
14  drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++
15  1 file changed, 5 insertions(+)
16
17 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
18 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
19 @@ -1371,6 +1371,11 @@ void brcmf_detach(struct device *dev)
20         brcmf_fweh_detach(drvr);
21         brcmf_proto_detach(drvr);
22  
23 +       if (drvr->mon_if) {
24 +               brcmf_net_detach(drvr->mon_if->ndev, false);
25 +               drvr->mon_if = NULL;
26 +       }
27 +
28         /* make sure primary interface removed last */
29         for (i = BRCMF_MAX_IFS - 1; i > -1; i--) {
30                 if (drvr->iflist[i])