blob: d1ef4f9d94822a56bc94e0dd73adbcec252ce6e8 [file] [log] [blame]
From e7e65b6c3742760ff15770e525e0a4e9438ac7a2 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 1044/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 faf60146..ecd62712 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