b26b3865e49e57b9e3022b859135d4966d1af315
[openwrt/staging/noltari.git] /
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()
5 when 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 ---
15 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
19 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
20 @@ -579,7 +579,8 @@ static int brcmf_netdev_stop(struct net_
21
22 brcmf_cfg80211_down(ndev);
23
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);
27
28 brcmf_net_setcarrier(ifp, false);
29