This patch move the credit map setting to right place to avoid
brcmf_fws_return_credits() return without setting the credit map.
It fix the thoughput zero stalls issue in softAP mode when STA
using PM 1 mode.
Signed-off-by: Double Lo <double.lo@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-6-chi-hsien.lin@cypress.com
if (!credits)
return;
+ fws->fifo_credit_map |= 1 << fifo;
+
if (fifo > BRCMF_FWS_FIFO_AC_BK &&
fifo <= BRCMF_FWS_FIFO_AC_VO) {
for (lender_ac = BRCMF_FWS_FIFO_AC_VO; lender_ac >= 0;
if (credits) {
fws->fifo_credit[fifo] += credits;
- fws->fifo_credit_map |= 1 << fifo;
}
if (fws->fifo_credit[fifo] > fws->init_fifo_credit[fifo])