wifi: mt76: mt7921s: fix a potential firmware freeze during startup
authorLeon Yen <leon.yen@mediatek.com>
Mon, 16 Sep 2024 06:01:57 +0000 (14:01 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 13 Jan 2025 10:21:54 +0000 (11:21 +0100)
commitfbce6136da0a40f62ea22361e7d13f6a502c20ad
tree7b8099b3c2d8cbd0f3a56961912c5367c3947d65
parent5a569e90162a37364f22d9f0ff9d2added7b3ee5
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 <leon.yen@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20240916060157.10157-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
drivers/net/wireless/mediatek/mt76/sdio_txrx.c