aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorArend van Spriel <arend.vanspriel@broadcom.com>2019-07-11 11:05:11 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-07-24 14:51:25 +0300
commite0bfb9601d4812719167cc4124a0d6db1e2f55e4 (patch)
tree45596b4ace1e1a2a57a9424db281d115ab166088 /drivers/net
parentbrcmfmac: avoid firmware commands when bus is down (diff)
downloadlinux-dev-e0bfb9601d4812719167cc4124a0d6db1e2f55e4.tar.xz
linux-dev-e0bfb9601d4812719167cc4124a0d6db1e2f55e4.zip
brcmfmac: simply remove flowring if bus is down
When the bus is down, eg. due to rmmod, there is no need to attempt to inform firmware about it. 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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
index 241747bd5cb2..8428be8b8d43 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
@@ -1398,6 +1398,13 @@ void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid)
u8 ifidx;
int err;
+ /* no need to submit if firmware can not be reached */
+ if (drvr->bus_if->state != BRCMF_BUS_UP) {
+ brcmf_dbg(MSGBUF, "bus down, flowring will be removed\n");
+ brcmf_msgbuf_remove_flowring(msgbuf, flowid);
+ return;
+ }
+
commonring = msgbuf->commonrings[BRCMF_H2D_MSGRING_CONTROL_SUBMIT];
brcmf_commonring_lock(commonring);
ret_ptr = brcmf_commonring_reserve_for_write(commonring);