mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: add missing rdd_idx check when enabling background radar
Add the missing rdd idx check (< 0) in
mt7996_mcu_rdd_background_enable(). mt7996_get_rdd_idx() returns -1
for phys without 5 GHz support, and the negative index was passed to
the RDD MCU command unchecked.
Fixes: 1529e335f93d ("wifi: mt76: mt7996: rework radar HWRDD idx")
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
5f31226103
commit
1ece37f8a9
@@ -4253,6 +4253,9 @@ int mt7996_mcu_rdd_background_enable(struct mt7996_phy *phy,
|
||||
struct mt7996_dev *dev = phy->dev;
|
||||
int err, region, rdd_idx = mt7996_get_rdd_idx(phy, true);
|
||||
|
||||
if (rdd_idx < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!chandef) { /* disable offchain */
|
||||
err = mt7996_mcu_rdd_cmd(dev, RDD_STOP, rdd_idx, 0);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user