Commit 82bc9ab6 authored by Arend Van Spriel's avatar Arend Van Spriel Committed by Kalle Valo

brcmfmac: restore stopping netdev queue when bus clogs up

When the host-interface bus has hard time handling transmit packets
it informs higher layer about this and it would stop the netdev
queue when needed. However, since commit 9cd18359 ("brcmfmac:
Make FWS queueing configurable.") this was broken. With this patch
the behaviour is restored.

Cc: stable@vger.kernel.org # v4.5, v4.6, v4.7
Fixes: 9cd18359 ("brcmfmac: Make FWS queueing configurable.")
Tested-by: default avatarPer Förlin <per.forlin@gmail.com>
Reviewed-by: default avatarHante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: default avatarFranky Lin <franky.lin@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4028a514
...@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb) ...@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked) void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
{ {
struct brcmf_fws_info *fws = drvr->fws; struct brcmf_fws_info *fws = drvr->fws;
struct brcmf_if *ifp;
int i;
fws->bus_flow_blocked = flow_blocked; if (fws->avoid_queueing) {
if (!flow_blocked) for (i = 0; i < BRCMF_MAX_IFS; i++) {
brcmf_fws_schedule_deq(fws); ifp = drvr->iflist[i];
else if (!ifp || !ifp->ndev)
fws->stats.bus_flow_block++; continue;
brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_FLOW,
flow_blocked);
}
} else {
fws->bus_flow_blocked = flow_blocked;
if (!flow_blocked)
brcmf_fws_schedule_deq(fws);
else
fws->stats.bus_flow_block++;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment