mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
wifi: mt76: do not send firmware FW_FEATURE_NON_DL region
skip invalid section to avoid potential risks
Fixes: 23bdc5d8ca ("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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user