wifi: mt76: mt7915: set correct antenna for radar detection on MT7915D

For MT7915D, correct antenna index should be set to let DFS radar
detection work on the 5 GHz band.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Shayne Chen
2022-09-30 23:13:15 +08:00
committed by Felix Fietkau
parent 7a9a957b2b
commit 7a12e06dac
2 changed files with 16 additions and 0 deletions

View File

@@ -1818,6 +1818,13 @@ static int mt7915_dfs_start_rdd(struct mt7915_dev *dev, int chain)
if (err < 0)
return err;
if (is_mt7915(&dev->mt76)) {
err = mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_SET_WF_ANT, chain,
0, dev->dbdc_support ? 2 : 0);
if (err < 0)
return err;
}
return mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_DET_MODE, chain,
MT_RX_SEL0, 1);
}
@@ -1938,6 +1945,14 @@ int mt7915_dfs_init_radar_detector(struct mt7915_phy *phy)
if (err < 0)
return err;
if (is_mt7915(&dev->mt76)) {
err = mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_SET_WF_ANT,
phy->band_idx, 0,
dev->dbdc_support ? 2 : 0);
if (err < 0)
return err;
}
mt7915_dfs_stop_radar_detector(phy);
phy->mt76->dfs_state = MT_DFS_STATE_DISABLED;

View File

@@ -357,6 +357,7 @@ enum mt7915_rdd_cmd {
RDD_DET_MODE,
RDD_RADAR_EMULATE,
RDD_START_TXQ = 20,
RDD_SET_WF_ANT = 30,
RDD_CAC_START = 50,
RDD_CAC_END,
RDD_NORMAL_START,