blob: fcc126c2d3e8f8988598362e3e7f0837c14b9846 [file] [log] [blame]
developera20cdc22024-05-31 18:57:31 +08001From 6adb4d938ebedcb3e842640678b8aa510ee0b088 Mon Sep 17 00:00:00 2001
developera46f6132024-03-26 14:09:54 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Tue, 31 Oct 2023 16:29:13 +0800
developera20cdc22024-05-31 18:57:31 +08004Subject: [PATCH 1043/1051] wifi: mt76: testmode: add cheetah support
developera46f6132024-03-26 14:09:54 +08005
6Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
7---
8 mt7915/testmode.c | 9 +++++----
9 1 file changed, 5 insertions(+), 4 deletions(-)
10
11diff --git a/mt7915/testmode.c b/mt7915/testmode.c
developerdc9eeae2024-04-08 14:36:46 +080012index faf6014..ecd6271 100644
developera46f6132024-03-26 14:09:54 +080013--- a/mt7915/testmode.c
14+++ b/mt7915/testmode.c
15@@ -2151,7 +2151,7 @@ mt7915_tm_group_prek(struct mt7915_phy *phy, enum mt76_testmode_state state)
16 eeprom = mdev->eeprom.data;
17 dev->cur_prek_offset = 0;
18 group_size = mt7915_get_cal_group_size(dev);
19- dpd_size = is_mt7915(&dev->mt76) ? MT_EE_CAL_DPD_SIZE_V1 : MT_EE_CAL_DPD_SIZE_V2;
20+ dpd_size = mt7915_get_cal_dpd_size(dev);
21 size = group_size + dpd_size;
22 offs = is_mt7915(&dev->mt76) ? MT_EE_DO_PRE_CAL : MT_EE_DO_PRE_CAL_V2;
23
24@@ -2233,11 +2233,11 @@ mt7915_tm_dpd_prek(struct mt7915_phy *phy, enum mt76_testmode_state state)
25 eeprom = mdev->eeprom.data;
26 dev->cur_prek_offset = 0;
27 group_size = mt7915_get_cal_group_size(dev);
28+ dpd_size = mt7915_get_cal_dpd_size(dev);
29 dev->dpd_chan_num_2g = hweight32(DPD_2G_CH_BW20_BITMAP_0);
30 if (is_mt7915(&dev->mt76)) {
31 dev->dpd_chan_num_5g = hweight32(DPD_5G_CH_BW20_BITMAP_7915_0);
32 dev->dpd_chan_num_6g = 0;
33- dpd_size = MT_EE_CAL_DPD_SIZE_V1;
34 offs = MT_EE_DO_PRE_CAL;
35 } else {
36 dev->dpd_chan_num_5g = hweight32(DPD_5G_CH_BW20_BITMAP_0) +
37@@ -2246,7 +2246,8 @@ mt7915_tm_dpd_prek(struct mt7915_phy *phy, enum mt76_testmode_state state)
38 dev->dpd_chan_num_6g = hweight32(DPD_6G_CH_BW20_BITMAP_0) +
39 hweight32(DPD_6G_CH_BW20_BITMAP_1) +
40 ARRAY_SIZE(bw160_6g_freq);
41- dpd_size = MT_EE_CAL_DPD_SIZE_V2;
42+ if (is_mt7981(&dev->mt76))
43+ dev->dpd_chan_num_6g = 0;
44 offs = MT_EE_DO_PRE_CAL_V2;
45 }
46 size = group_size + dpd_size;
47@@ -2711,7 +2712,7 @@ mt7915_tm_dump_precal(struct mt76_phy *mphy, struct sk_buff *msg, int flag, int
48 }
49
50 group_size = mt7915_get_cal_group_size(dev);
51- dpd_size = is_mt7915(&dev->mt76) ? MT_EE_CAL_DPD_SIZE_V1 : MT_EE_CAL_DPD_SIZE_V2;
52+ dpd_size = mt7915_get_cal_dpd_size(dev);
53 dpd_per_chan_size = is_mt7915(&dev->mt76) ? 2 : 3;
54 total_size = group_size + dpd_size;
55 pre_cal = dev->cal;
56--
572.18.0
58