mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7921s: fix a potential firmware freeze during startup
The maximum command quota of the firmware may be exceeded because the command to retrieve the quota setting has not been taken into account. This patch considers not only the quota usage of the command retrieving quota settings but also limits the total quota usage. Signed-off-by: Leon Yen <[email protected]> Signed-off-by: Ming Yen Hsieh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -46,6 +46,10 @@ static int mt76s_refill_sched_quota(struct mt76_dev *dev, u32 *data)
|
||||
return 0;
|
||||
|
||||
sdio->sched.pse_mcu_quota += pse_mcu_quota;
|
||||
if (sdio->pse_mcu_quota_max &&
|
||||
sdio->sched.pse_mcu_quota > sdio->pse_mcu_quota_max) {
|
||||
sdio->sched.pse_mcu_quota = sdio->pse_mcu_quota_max;
|
||||
}
|
||||
sdio->sched.pse_data_quota += pse_data_quota;
|
||||
sdio->sched.ple_data_quota += ple_data_quota;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user