diff options
author | Deren Wu <deren.wu@mediatek.com> | 2022-11-24 22:20:38 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-12-01 17:29:14 +0100 |
commit | f37f76d43865c58cb96aa13c87164abb41f22d0b (patch) | |
tree | dd598e94c3e95f47c4994fa710badb5fc6d883d2 /drivers | |
parent | e5c6bc6f19d8c293f86b347cddab54d5a3830b38 (diff) | |
download | linux-f37f76d43865c58cb96aa13c87164abb41f22d0b.tar.bz2 |
wifi: mt76: do not send firmware FW_FEATURE_NON_DL region
skip invalid section to avoid potential risks
Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 96d91238ad8d..5a047e630860 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -2906,6 +2906,9 @@ mt76_connac_mcu_send_ram_firmware(struct mt76_dev *dev, len = le32_to_cpu(region->len); addr = le32_to_cpu(region->addr); + if (region->feature_set & FW_FEATURE_NON_DL) + goto next; + if (region->feature_set & FW_FEATURE_OVERRIDE_ADDR) override = addr; @@ -2922,6 +2925,7 @@ mt76_connac_mcu_send_ram_firmware(struct mt76_dev *dev, return err; } +next: offset += len; } |