Skip to content

Commit

Permalink
wifi: mt76: do not send firmware FW_FEATURE_NON_DL region
Browse files Browse the repository at this point in the history
[ Upstream commit f37f76d ]

skip invalid section to avoid potential risks

Fixes: 23bdc5d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
deren authored and gregkh committed Dec 31, 2022
1 parent 52f7e23 commit d26fdb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2834,6 +2834,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;

Expand All @@ -2850,6 +2853,7 @@ mt76_connac_mcu_send_ram_firmware(struct mt76_dev *dev,
return err;
}

next:
offset += len;
}

Expand Down

0 comments on commit d26fdb1

Please sign in to comment.