]> git.baikalelectronics.ru Git - kernel.git/commit
net: wwan: mhi_wwan_ctrl: Fix RX buffer starvation
authorLoic Poulain <loic.poulain@linaro.org>
Tue, 20 Apr 2021 09:36:22 +0000 (11:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2021 00:13:43 +0000 (17:13 -0700)
commitaf3ac2e12e2fa5ce913c22774bb57bf05a5652b8
tree936f2cc2025146353947b48270a4ea117bd6cdfc
parentaa9cf65cac82b189d0064e04d8695165f57d6ff9
net: wwan: mhi_wwan_ctrl: Fix RX buffer starvation

The mhi_wwan_rx_budget_dec function is supposed to return true if
RX buffer budget has been successfully decremented, allowing to queue
a new RX buffer for transfer. However the current implementation is
broken when RX budget is '1', in which case budget is decremented but
false is returned, preventing to requeue one buffer, and leading to
RX buffer starvation.

Fixes: 90fb041e39e7 ("net: Add Qcom WWAN control driver")
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/mhi_wwan_ctrl.c