4c42b2b0c93d245cc2187bf1c187bd6a54ea84f4
[openwrt/staging/luka.git] /
1 From c613085b74941024194e41b200601b9aa6ee388f Mon Sep 17 00:00:00 2001
2 From: Arend van Spriel <arend.vanspriel@broadcom.com>
3 Date: Thu, 11 Jul 2019 11:05:08 +0200
4 Subject: [PATCH] brcmfmac: avoid firmware command in brcmf_netdev_open() when
5 bus is down
6
7 No point in sending a firmware command when bus is down so make it
8 conditional checking the state.
9
10 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
12 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
21 @@ -579,7 +579,8 @@ static int brcmf_netdev_stop(struct net_
22
23 brcmf_cfg80211_down(ndev);
24
25 - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
26 + if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
27 + brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
28
29 brcmf_net_setcarrier(ifp, false);
30