mirror of
https://github.com/Fishwaldo/build.git
synced 2025-04-12 09:01:50 +00:00
introduced with the Cypress "0048-brcmfmac-reserve-2-credits-for-host-tx-control-path" patch (Reference: https://www.spinics.net/lists/linux-wireless/msg201592.html)
22 lines
924 B
Diff
22 lines
924 B
Diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
index e8712ad3a..50c81078a 100644
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
@@ -664,9 +664,14 @@ static void pkt_align(struct sk_buff *p, int len, int align)
|
|
/* To check if there's window offered */
|
|
static bool data_ok(struct brcmf_sdio *bus)
|
|
{
|
|
- /* Reserve TXCTL_CREDITS credits for txctl */
|
|
- return (bus->tx_max - bus->tx_seq) > TXCTL_CREDITS &&
|
|
- ((bus->tx_max - bus->tx_seq) & 0x80) == 0;
|
|
+ u8 tx_rsv = 0;
|
|
+
|
|
+ /* Reserve TXCTL_CREDITS credits for txctl when it is ready to send */
|
|
+ if (bus->ctrl_frame_stat)
|
|
+ tx_rsv = TXCTL_CREDITS;
|
|
+
|
|
+ return (bus->tx_max - bus->tx_seq - tx_rsv) != 0 &&
|
|
+ ((bus->tx_max - bus->tx_seq - tx_rsv) & 0x80) == 0;
|
|
}
|
|
|
|
/* To check if there's window offered */
|