mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -2869,6 +2869,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;
|
||||
|
||||
@@ -2885,6 +2888,7 @@ mt76_connac_mcu_send_ram_firmware(struct mt76_dev *dev,
|
||||
return err;
|
||||
}
|
||||
|
||||
next:
|
||||
offset += len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user