linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
	Arend van Spriel <arend.vanspriel@broadcom.com>
Subject: [PATCH 3/7] brcmfmac: avoid firmware command in brcmf_netdev_open() when bus is down
Date: Thu, 11 Jul 2019 11:05:08 +0200	[thread overview]
Message-ID: <1562835912-1404-4-git-send-email-arend.vanspriel@broadcom.com> (raw)
In-Reply-To: <1562835912-1404-1-git-send-email-arend.vanspriel@broadcom.com>

No point in sending a firmware command when bus is down so make it
conditional checking the state.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 80d54d2..705b8cc 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -579,7 +579,8 @@ static int brcmf_netdev_stop(struct net_device *ndev)
 
 	brcmf_cfg80211_down(ndev);
 
-	brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
+	if (ifp->drvr->bus_if->state == BRCMF_BUS_UP)
+		brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0);
 
 	brcmf_net_setcarrier(ifp, false);
 
-- 
1.9.1


  parent reply	other threads:[~2019-07-11  9:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11  9:05 [PATCH 0/7] brcmfmac: rework probe/attach sequence Arend van Spriel
2019-07-11  9:05 ` [PATCH 1/7] Revert "brcmfmac: fix NULL pointer derefence during USB disconnect" Arend van Spriel
2019-07-24 11:51   ` Kalle Valo
2019-07-11  9:05 ` [PATCH 2/7] brcmfmac: change the order of things in brcmf_detach() Arend van Spriel
2019-07-20 21:26   ` Rafał Miłecki
2019-07-11  9:05 ` Arend van Spriel [this message]
2019-07-11  9:05 ` [PATCH 4/7] brcmfmac: clear events in brcmf_fweh_detach() will always fail Arend van Spriel
2019-07-11  9:05 ` [PATCH 5/7] brcmfmac: avoid firmware commands when bus is down Arend van Spriel
2019-07-11  9:05 ` [PATCH 6/7] brcmfmac: simply remove flowring if " Arend van Spriel
2019-07-11  9:05 ` [PATCH 7/7] brcmfmac: remove unnecessary strlcpy() upon obtaining "ver" iovar Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1562835912-1404-4-git-send-email-arend.vanspriel@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).