Commit 0d24b0ea authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: Accept only first creditmap event.

During P2P testing it turned out that the firmware sents multiple
multiple creditmap event messages. Only the first message from the
firmware should be processed. Otherwise the firmware-signalled flow
control can run haywire when it has packets outstanding in firmware.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 402e3ba2
...@@ -434,6 +434,7 @@ struct brcmf_fws_info { ...@@ -434,6 +434,7 @@ struct brcmf_fws_info {
u32 fifo_delay_map; u32 fifo_delay_map;
unsigned long borrow_defer_timestamp; unsigned long borrow_defer_timestamp;
bool bus_flow_blocked; bool bus_flow_blocked;
bool creditmap_received;
}; };
/* /*
...@@ -1356,6 +1357,10 @@ static int brcmf_fws_notify_credit_map(struct brcmf_if *ifp, ...@@ -1356,6 +1357,10 @@ static int brcmf_fws_notify_credit_map(struct brcmf_if *ifp,
brcmf_err("event payload too small (%d)\n", e->datalen); brcmf_err("event payload too small (%d)\n", e->datalen);
return -EINVAL; return -EINVAL;
} }
if (fws->creditmap_received)
return 0;
fws->creditmap_received = true;
brcmf_dbg(TRACE, "enter: credits %pM\n", credits); brcmf_dbg(TRACE, "enter: credits %pM\n", credits);
brcmf_fws_lock(ifp->drvr, flags); brcmf_fws_lock(ifp->drvr, flags);
......
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