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
7 No point in sending a firmware command when bus is down so make it
8 conditional checking the state.
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>
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
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_
23 brcmf_cfg80211_down(ndev);
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);
29 brcmf_net_setcarrier(ifp, false);