brcmfmac: reserve 2 credits for host tx control path
authorAmar Shankar <amsr@cypress.com>
Wed, 10 Jun 2020 15:21:03 +0000 (10:21 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Jul 2020 09:46:43 +0000 (12:46 +0300)
commitb41c232d33666191a1db11befc0f040fcbe664e9
tree55167999e2a6419bf597783dd28c4764c9e7c885
parentfc4aa125974d4401084eb0f4affdb92e9b75f1df
brcmfmac: reserve 2 credits for host tx control path

It is observed that sometimes when sdiod is low in tx credits in low
rssi scenarios, the data path consumes all sdiod rx all credits and
there is no sdiod rx credit available for control path causing host
and card to go out of sync resulting in link loss between host and
card. So in order to prevent it some credits are reserved for control
path.

Note that TXCTL_CREDITS can't be larger than the firmware default
credit update threshold 2; otherwise there will be a deadlock for both
side waiting for each other.

Signed-off-by: Amar Shankar <amsr@cypress.com>
Signed-off-by: Jia-Shyr Chuang <joseph.chuang@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200610152106.175257-4-chi-hsien.lin@cypress.com
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c