| From 6adb4d938ebedcb3e842640678b8aa510ee0b088 Mon Sep 17 00:00:00 2001 |
| From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| Date: Tue, 31 Oct 2023 16:29:13 +0800 |
| Subject: [PATCH 1043/1051] wifi: mt76: testmode: add cheetah support |
| |
| Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| --- |
| mt7915/testmode.c | 9 +++++---- |
| 1 file changed, 5 insertions(+), 4 deletions(-) |
| |
| diff --git a/mt7915/testmode.c b/mt7915/testmode.c |
| index faf6014..ecd6271 100644 |
| --- a/mt7915/testmode.c |
| +++ b/mt7915/testmode.c |
| @@ -2151,7 +2151,7 @@ mt7915_tm_group_prek(struct mt7915_phy *phy, enum mt76_testmode_state state) |
| eeprom = mdev->eeprom.data; |
| dev->cur_prek_offset = 0; |
| group_size = mt7915_get_cal_group_size(dev); |
| - dpd_size = is_mt7915(&dev->mt76) ? MT_EE_CAL_DPD_SIZE_V1 : MT_EE_CAL_DPD_SIZE_V2; |
| + dpd_size = mt7915_get_cal_dpd_size(dev); |
| size = group_size + dpd_size; |
| offs = is_mt7915(&dev->mt76) ? MT_EE_DO_PRE_CAL : MT_EE_DO_PRE_CAL_V2; |
| |
| @@ -2233,11 +2233,11 @@ mt7915_tm_dpd_prek(struct mt7915_phy *phy, enum mt76_testmode_state state) |
| eeprom = mdev->eeprom.data; |
| dev->cur_prek_offset = 0; |
| group_size = mt7915_get_cal_group_size(dev); |
| + dpd_size = mt7915_get_cal_dpd_size(dev); |
| dev->dpd_chan_num_2g = hweight32(DPD_2G_CH_BW20_BITMAP_0); |
| if (is_mt7915(&dev->mt76)) { |
| dev->dpd_chan_num_5g = hweight32(DPD_5G_CH_BW20_BITMAP_7915_0); |
| dev->dpd_chan_num_6g = 0; |
| - dpd_size = MT_EE_CAL_DPD_SIZE_V1; |
| offs = MT_EE_DO_PRE_CAL; |
| } else { |
| dev->dpd_chan_num_5g = hweight32(DPD_5G_CH_BW20_BITMAP_0) + |
| @@ -2246,7 +2246,8 @@ mt7915_tm_dpd_prek(struct mt7915_phy *phy, enum mt76_testmode_state state) |
| dev->dpd_chan_num_6g = hweight32(DPD_6G_CH_BW20_BITMAP_0) + |
| hweight32(DPD_6G_CH_BW20_BITMAP_1) + |
| ARRAY_SIZE(bw160_6g_freq); |
| - dpd_size = MT_EE_CAL_DPD_SIZE_V2; |
| + if (is_mt7981(&dev->mt76)) |
| + dev->dpd_chan_num_6g = 0; |
| offs = MT_EE_DO_PRE_CAL_V2; |
| } |
| size = group_size + dpd_size; |
| @@ -2711,7 +2712,7 @@ mt7915_tm_dump_precal(struct mt76_phy *mphy, struct sk_buff *msg, int flag, int |
| } |
| |
| group_size = mt7915_get_cal_group_size(dev); |
| - dpd_size = is_mt7915(&dev->mt76) ? MT_EE_CAL_DPD_SIZE_V1 : MT_EE_CAL_DPD_SIZE_V2; |
| + dpd_size = mt7915_get_cal_dpd_size(dev); |
| dpd_per_chan_size = is_mt7915(&dev->mt76) ? 2 : 3; |
| total_size = group_size + dpd_size; |
| pre_cal = dev->cal; |
| -- |
| 2.18.0 |
| |