Commit 7a12e06d authored by Shayne Chen's avatar Shayne Chen Committed by Felix Fietkau

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: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 7a9a957b
...@@ -1818,6 +1818,13 @@ static int mt7915_dfs_start_rdd(struct mt7915_dev *dev, int chain) ...@@ -1818,6 +1818,13 @@ static int mt7915_dfs_start_rdd(struct mt7915_dev *dev, int chain)
if (err < 0) if (err < 0)
return err; 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, return mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_DET_MODE, chain,
MT_RX_SEL0, 1); MT_RX_SEL0, 1);
} }
...@@ -1938,6 +1945,14 @@ int mt7915_dfs_init_radar_detector(struct mt7915_phy *phy) ...@@ -1938,6 +1945,14 @@ int mt7915_dfs_init_radar_detector(struct mt7915_phy *phy)
if (err < 0) if (err < 0)
return err; 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); mt7915_dfs_stop_radar_detector(phy);
phy->mt76->dfs_state = MT_DFS_STATE_DISABLED; phy->mt76->dfs_state = MT_DFS_STATE_DISABLED;
......
...@@ -357,6 +357,7 @@ enum mt7915_rdd_cmd { ...@@ -357,6 +357,7 @@ enum mt7915_rdd_cmd {
RDD_DET_MODE, RDD_DET_MODE,
RDD_RADAR_EMULATE, RDD_RADAR_EMULATE,
RDD_START_TXQ = 20, RDD_START_TXQ = 20,
RDD_SET_WF_ANT = 30,
RDD_CAC_START = 50, RDD_CAC_START = 50,
RDD_CAC_END, RDD_CAC_END,
RDD_NORMAL_START, RDD_NORMAL_START,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment