352-v5.4-0003-brcmfmac-avoid-firmware-command-in-brcmf_netdev_open.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  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. No point in sending a firmware command when bus is down so make it
  7. conditional checking the state.
  8. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
  9. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  10. Reviewed-by: Franky Lin <franky.lin@broadcom.com>
  11. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  12. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  13. ---
  14. drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
  15. 1 file changed, 2 insertions(+), 1 deletion(-)
  16. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
  17. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
  18. @@ -558,7 +558,8 @@ static int brcmf_netdev_stop(struct net_
  19. brcmf_cfg80211_down(ndev);
  20. - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
  21. + if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
  22. + brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
  23. brcmf_net_setcarrier(ifp, false);