1 From 1be747d977014fea13dbac0de885c0c358eb393c 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 3/7] brcmfmac: avoid firmware command in brcmf_netdev_open()
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>
15 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
18 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
19 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
20 @@ -589,7 +589,8 @@ static int brcmf_netdev_stop(struct net_
22 brcmf_cfg80211_down(ndev);
24 - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
25 + if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
26 + brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
28 brcmf_net_setcarrier(ifp, false);