[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
1776d62e [MAC80211][WiFi6/7][app][Fix atenl sync eeprom all issue]
f27a8bc9 [MAC80211][WiFi6][misc][Add coredump support for MT7981]
8ae764db [mac80211][netifd][wifi7][Fix patch fail]
db2ba4ea [mac80211][netifd][wifi7][Fix patch fail]
1671230e [MAC80211][WiFi6][mt76][Fix dump PFMU tag kernel calltrace]
537408c4 [MAC80211][WiFi6][Rebase][Fix patch error]
9a4c64fa [mac80211][wifi6][mt76][Fix txpower sku issues]
8276145f [MAC80211][WiFi6][mt76][not send RTS before sending BSRP]
2c6e3189 [MAC80211][WiFi6][Rebase Patches][Fix patch error]
6b529b8c [[MAC80211][WiFi6][mt76][add per-bss counter for mt7915]
95df57b3 [MAC80211][WiFi6][app][Add atenl support for cheetah]
94705cb2 [MAC80211][WiFi6][mt76][Add support for cheetah]
4ff10eee [mac80211][wifi6][mt76][Add debugfs address map for Cheetah MT76]
85af3247 [MAC80211[WiFi6]][hostapd][Add extender behavior log]
04302ac4 [MAC80211[WiFi7]][hostapd][Add eht_bw320_offset configuration option]
88013859 [MAC80211][WiFi6/7][app][Fix atenl cannot support binfile mode precal issue]
c1cad928 [MAC80211][WiFi6][mt76][Fix binfile cannot sync precal data to atenl]
8fd441fb [MAC80211][WiFi6/7][misc][remove internal patch for ucode package]
4653100b [MAC80211][WiFi6][mt76][rename bf debug cmd to align connac3]
9edd5444 [MAC80211][WiFi6][mt76][Fixed null pointer dereference issue]
[Release-log]
Change-Id: Ia7013b21497826cdf4d9c6192d6812aff5f948ae
diff --git a/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch b/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
index e6f1971..eedc6de 100644
--- a/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
@@ -1,8 +1,8 @@
-From ea0393c4c9076db02c3ebe34b87dc381c34e5a3d Mon Sep 17 00:00:00 2001
+From abf253c784db9cb42cf14ca7b825227ef982c3cd Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 15 Dec 2022 19:45:18 +0800
-Subject: [PATCH 1013/1040] wifi: mt76: testmode: add iBF/eBF cal and cert
- commands with golden
+Subject: [PATCH] wifi: mt76: testmode: add iBF/eBF cal and cert commands with
+ golden
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -15,20 +15,20 @@
mt7915/mmio.c | 2 +
mt7915/mt7915.h | 14 +-
mt7915/mtk_debugfs.c | 35 ++++
- mt7915/mtk_mcu.c | 246 ++++++++++++++++++++++-
+ mt7915/mtk_mcu.c | 247 ++++++++++++++++++++++-
mt7915/regs.h | 4 +
mt7915/testmode.c | 461 ++++++++++++++++++++++++++++---------------
mt7915/testmode.h | 134 +------------
testmode.c | 1 +
testmode.h | 9 +
tools/fields.c | 9 +
- 16 files changed, 857 insertions(+), 324 deletions(-)
+ 16 files changed, 858 insertions(+), 324 deletions(-)
diff --git a/mt76.h b/mt76.h
-index ed69106..fa9c6a4 100644
+index 7ae061d..d16accd 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -716,6 +716,7 @@ struct mt76_testmode_data {
+@@ -718,6 +718,7 @@ struct mt76_testmode_data {
struct list_head tm_entry_list;
struct mt76_wcid *cur_entry;
@@ -36,7 +36,7 @@
u8 entry_num;
union {
struct mt76_testmode_entry_data ed;
-@@ -744,6 +745,9 @@ struct mt76_testmode_data {
+@@ -746,6 +747,9 @@ struct mt76_testmode_data {
u8 txbf_act;
u16 txbf_param[8];
@@ -68,10 +68,10 @@
memcpy(bss->bssid, phy->macaddr, ETH_ALEN);
}
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index bd0efd5..4244177 100644
+index 06a5fb1..948f07b 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -729,8 +729,10 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -730,8 +730,10 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
val |= MT_TXD6_LDPC;
txwi[3] &= ~cpu_to_le32(MT_TXD3_SN_VALID);
@@ -84,7 +84,7 @@
txwi[6] |= cpu_to_le32(val);
#endif
diff --git a/mt7915/main.c b/mt7915/main.c
-index 3b18c95..169d597 100644
+index 44a1b21..8c9b0b2 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -205,46 +205,37 @@ static void mt7915_init_bitrate_mask(struct ieee80211_vif *vif)
@@ -146,7 +146,7 @@
dev->mt76.vif_mask |= BIT_ULL(mvif->mt76.idx);
phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
-@@ -279,7 +270,26 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
+@@ -280,7 +271,26 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
mt7915_mcu_add_sta(dev, vif, NULL, true);
rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid);
@@ -468,10 +468,10 @@
[AGG_AALCR0] = 0x028,
[AGG_AWSCR0] = 0x030,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 33ac2d2..135b39b 100644
+index 78ddbaf..2ef63a3 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -274,7 +274,6 @@ struct mt7915_phy {
+@@ -275,7 +275,6 @@ struct mt7915_phy {
u8 spe_idx;
@@ -479,7 +479,7 @@
bool bf_ever_en;
} test;
#endif
-@@ -379,7 +378,7 @@ struct mt7915_dev {
+@@ -380,7 +379,7 @@ struct mt7915_dev {
void __iomem *dcm;
void __iomem *sku;
@@ -488,7 +488,7 @@
struct {
void *txbf_phase_cal;
void *txbf_pfmu_data;
-@@ -518,6 +517,7 @@ int mt7915_dma_reset(struct mt7915_dev *dev, bool force);
+@@ -519,6 +518,7 @@ int mt7915_dma_reset(struct mt7915_dev *dev, bool force);
int mt7915_dma_start(struct mt7915_dev *dev, bool reset, bool wed_reset);
int mt7915_txbf_init(struct mt7915_dev *dev);
void mt7915_init_txpower(struct mt7915_phy *phy);
@@ -496,7 +496,7 @@
void mt7915_reset(struct mt7915_dev *dev);
int mt7915_run(struct ieee80211_hw *hw);
int mt7915_mcu_init(struct mt7915_dev *dev);
-@@ -598,8 +598,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -599,8 +599,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -508,7 +508,7 @@
static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
{
-@@ -734,4 +736,10 @@ enum {
+@@ -735,4 +737,10 @@ enum {
#endif
@@ -520,7 +520,7 @@
+
#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 96655db..7fc6a3f 100644
+index 587497b..2ce1837 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -2890,6 +2890,36 @@ mt7915_txpower_level_set(void *data, u64 val)
@@ -564,16 +564,16 @@
debugfs_create_file("txpower_level", 0400, dir, dev,
&fops_txpower_level);
-+ debugfs_create_file("txbf_pfmu_tag_idx", 0600, dir, phy,
++ debugfs_create_file("pfmu_tag_read", 0600, dir, phy,
+ &fops_txbf_pfmu_tag_idx);
-+ debugfs_create_file("txbf_sta_rec", 0600, dir, dev,
++ debugfs_create_file("bf_starec_read", 0600, dir, dev,
+ &fops_txbf_sta_rec);
+
debugfs_create_u8("sku_disable", 0600, dir, &dev->dbg.sku_disable);
return 0;
diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
-index 143dae2..906c872 100644
+index 143dae2..7a2d28c 100644
--- a/mt7915/mtk_mcu.c
+++ b/mt7915/mtk_mcu.c
@@ -1,9 +1,10 @@
@@ -588,7 +588,7 @@
int mt7915_mcu_set_txpower_level(struct mt7915_phy *phy, u8 drop_level)
{
-@@ -49,3 +50,246 @@ int mt7915_mcu_set_txpower_level(struct mt7915_phy *phy, u8 drop_level)
+@@ -49,3 +50,247 @@ int mt7915_mcu_set_txpower_level(struct mt7915_phy *phy, u8 drop_level)
MCU_EXT_CMD(TX_POWER_FEATURE_CTRL), &req,
sizeof(req), true);
}
@@ -809,10 +809,11 @@
+ .bfer = bfer,
+ .dbdc_idx = phy->mt76->band_idx,
+ };
-+ struct mt7915_pfmu_tag *tag = phy->dev->test.txbf_pfmu_tag;
++ struct mt7915_pfmu_tag *tag = dev->test.txbf_pfmu_tag;
+
+ /* Reset to 0 for mt7915_tm_txbf_profile_tag_write wait_event */
-+ tag->t1.pfmu_idx = 0;
++ if (tag)
++ tag->t1.pfmu_idx = 0;
+
+ return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TXBF_ACTION), &req,
+ sizeof(req), true);
@@ -858,10 +859,10 @@
#define MT_WF_RMAC_BASE(_band) ((_band) ? 0x820f5000 : 0x820e5000)
#define MT_WF_RMAC(_band, ofs) (MT_WF_RMAC_BASE(_band) + (ofs))
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index e321848..d5c74df 100644
+index 1e6791e..5e20cb9 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
-@@ -53,6 +53,8 @@ struct reg_band {
+@@ -55,6 +55,8 @@ struct reg_band {
static struct reg_band reg_backup_list[TM_REG_MAX_ID];
static void mt7915_tm_update_entry(struct mt7915_phy *phy);
@@ -870,7 +871,7 @@
static u8 mt7915_tm_chan_bw(enum nl80211_chan_width width)
{
-@@ -92,6 +94,25 @@ mt7915_tm_check_antenna(struct mt7915_phy *phy)
+@@ -94,6 +96,25 @@ mt7915_tm_check_antenna(struct mt7915_phy *phy)
return 0;
}
@@ -896,7 +897,7 @@
static void
mt7915_tm_update_channel(struct mt7915_phy *phy)
{
-@@ -292,17 +313,33 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -294,17 +315,33 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
struct mt7915_dev *dev = phy->dev;
@@ -937,7 +938,7 @@
skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76,
&msta->wcid);
-@@ -318,8 +355,11 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -320,8 +357,11 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
bf->ncol = nc;
bf->nrow = nr;
bf->ndp_rate = ndp_rate;
@@ -950,7 +951,7 @@
if (ebf) {
bf->mem[0].row = 0;
-@@ -372,11 +412,8 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
+@@ -374,11 +414,8 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
}
memcpy(sta->addr, ed->addr[0], ETH_ALEN);
@@ -964,7 +965,7 @@
if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
memcpy(&sta->deflink.ht_cap, &sband->ht_cap, sizeof(sta->deflink.ht_cap));
-@@ -401,6 +438,14 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
+@@ -403,6 +440,14 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
list_add_tail(&msta->wcid.list, &td->tm_entry_list);
td->entry_num++;
@@ -979,7 +980,7 @@
return 0;
}
-@@ -470,7 +515,7 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
+@@ -472,7 +517,7 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
struct mt76_testmode_entry_data *ed, tmp;
struct mt76_wcid *wcid, *last;
@@ -988,7 +989,7 @@
return;
memcpy(&tmp, &td->ed, sizeof(tmp));
-@@ -491,20 +536,30 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
+@@ -493,20 +538,30 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
static int
mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
{
@@ -1022,7 +1023,7 @@
MAX_PHASE_GROUP_NUM,
GFP_KERNEL);
if (!phase_cal)
-@@ -514,7 +569,10 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
+@@ -516,7 +571,10 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
}
if (!dev->test.txbf_pfmu_data) {
@@ -1034,7 +1035,7 @@
if (!pfmu_data)
return -ENOMEM;
-@@ -523,21 +581,77 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
+@@ -525,21 +583,77 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
if (!dev->test.txbf_pfmu_tag) {
pfmu_tag = devm_kzalloc(dev->mt76.dev,
@@ -1118,7 +1119,7 @@
return mt7915_tm_set_trx(phy, TM_MAC_TX, true);
}
-@@ -564,8 +678,7 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
+@@ -566,8 +680,7 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
.read_from_e2p = val[3],
.disable = val[4],
};
@@ -1128,7 +1129,7 @@
wait_event_timeout(dev->mt76.tx_wait, phase[val[2]].status != 0, HZ);
memcpy(req.buf, &phase[val[2]].phase, sizeof(req.buf));
-@@ -578,32 +691,9 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
+@@ -580,32 +693,9 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
sizeof(req), true);
}
@@ -1162,7 +1163,7 @@
{
struct mt7915_dev *dev = phy->dev;
struct {
-@@ -630,8 +720,6 @@ static int
+@@ -632,8 +722,6 @@ static int
mt7915_tm_txbf_apply_tx(struct mt7915_phy *phy, u16 wlan_idx, bool ebf,
bool ibf, bool phase_cal)
{
@@ -1171,7 +1172,7 @@
struct mt7915_dev *dev = phy->dev;
struct {
u8 category;
-@@ -660,14 +748,15 @@ static int mt7915_tm_txbf_set_rate(struct mt7915_phy *phy,
+@@ -662,14 +750,15 @@ static int mt7915_tm_txbf_set_rate(struct mt7915_phy *phy,
{
struct mt7915_dev *dev = phy->dev;
struct mt76_testmode_entry_data *ed = mt76_testmode_entry_data(phy->mt76, wcid);
@@ -1189,7 +1190,7 @@
rate.nss = ed->tx_rate_nss;
rate.mcs = ed->tx_rate_idx;
rate.ldpc = (rate.bw || ed->tx_rate_ldpc) * GENMASK(2, 0);
-@@ -681,13 +770,14 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -683,13 +772,14 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
{
bool bf_on = val[0], update = val[3];
/* u16 wlan_idx = val[2]; */
@@ -1206,7 +1207,7 @@
tag->t1.invalid_prof = false;
mt7915_tm_txbf_profile_tag_write(phy, 2, tag);
-@@ -702,7 +792,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -704,7 +794,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
} else {
phy->test.bf_ever_en = false;
@@ -1215,7 +1216,7 @@
tag->t1.invalid_prof = true;
mt7915_tm_txbf_profile_tag_write(phy, 2, tag);
}
-@@ -717,6 +807,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -719,6 +809,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
static int
mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
{
@@ -1223,7 +1224,7 @@
static const u8 mode_to_lm[] = {
[MT76_TM_TX_MODE_CCK] = 0,
[MT76_TM_TX_MODE_OFDM] = 0,
-@@ -730,7 +821,8 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -732,7 +823,8 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
struct mt76_testmode_data *td = &phy->mt76->test;
struct mt76_wcid *wcid;
struct ieee80211_vif *vif = phy->monitor_vif;
@@ -1233,7 +1234,7 @@
u8 pfmu_idx = val[0], nc = val[2], nr;
bool is_atenl = val[6];
int ret;
-@@ -748,18 +840,22 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -750,18 +842,22 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
tag->t1.nr = nr;
tag->t1.nc = nc;
tag->t1.invalid_prof = true;
@@ -1262,7 +1263,7 @@
} else {
tag->t1.row_id1 = 4;
tag->t1.row_id2 = 5;
-@@ -780,6 +876,20 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -782,6 +878,20 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
if (ret)
return ret;
@@ -1283,7 +1284,7 @@
if (!ebf && is_atenl)
return mt7915_tm_txbf_apply_tx(phy, 1, false, true, true);
-@@ -797,7 +907,7 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -799,7 +909,7 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
u8 category;
u8 group_l_m_n;
u8 group;
@@ -1292,7 +1293,7 @@
u8 cal_type;
u8 lna_gain_level;
u8 _rsv[2];
-@@ -805,12 +915,12 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -807,12 +917,12 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
.category = MT_BF_PHASE_CAL,
.group = val[0],
.group_l_m_n = val[1],
@@ -1308,7 +1309,7 @@
phase[req.group].status = 0;
-@@ -818,53 +928,10 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -820,53 +930,10 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
sizeof(req), true);
}
@@ -1363,7 +1364,7 @@
struct mt76_testmode_data *td = &phy->mt76->test;
u8 nss = hweight8(td->tx_antenna_mask);
u16 pfmu_idx = val[0];
-@@ -874,9 +941,9 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -876,9 +943,9 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
u16 angle31 = val[4];
u16 angle41 = val[5];
s16 phi11 = 0, phi21 = 0, phi31 = 0;
@@ -1375,7 +1376,7 @@
return -EINVAL;
if (nss == 2) {
-@@ -890,7 +957,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -892,7 +959,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
phi31 = (s16)(angle41 - angle31);
}
@@ -1384,7 +1385,7 @@
pfmu_data = &pfmu_data[subc_id];
if (subc_id < 32)
-@@ -900,21 +967,21 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -902,21 +969,21 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
pfmu_data->phi11 = cpu_to_le16(phi11);
pfmu_data->phi21 = cpu_to_le16(phi21);
pfmu_data->phi31 = cpu_to_le16(phi31);
@@ -1409,7 +1410,7 @@
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TXBF_ACTION),
&req, sizeof(req), true);
-@@ -926,7 +993,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -928,7 +995,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
static int
mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
{
@@ -1418,7 +1419,7 @@
struct mt7915_dev *dev = phy->dev;
u8 *eeprom = dev->mt76.eeprom.data;
u16 offset;
-@@ -936,7 +1003,7 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
+@@ -938,7 +1005,7 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
is_7976 = mt7915_check_adie(dev, false) || is_mt7916(&dev->mt76);
offset = is_7976 ? 0x60a : 0x651;
@@ -1427,7 +1428,7 @@
for (i = 0; i < MAX_PHASE_GROUP_NUM; i++) {
p = &phase[i];
-@@ -951,17 +1018,75 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
+@@ -953,17 +1020,75 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
return 0;
}
@@ -1505,7 +1506,7 @@
return mt7915_tm_txbf_init(phy, val);
case MT76_TM_TXBF_ACT_UPDATE_CH:
mt7915_tm_update_channel(phy);
-@@ -987,6 +1112,36 @@ mt7915_tm_set_txbf(struct mt7915_phy *phy)
+@@ -989,6 +1114,36 @@ mt7915_tm_set_txbf(struct mt7915_phy *phy)
return mt7915_tm_txbf_apply_tx(phy, wlan_idx, ebf, ibf, phase_cal);
}
@@ -1542,7 +1543,7 @@
default:
break;
};
-@@ -1262,9 +1417,10 @@ mt7915_tm_set_ipi(struct mt7915_phy *phy)
+@@ -1264,9 +1419,10 @@ mt7915_tm_set_ipi(struct mt7915_phy *phy)
static int
mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
@@ -1555,7 +1556,7 @@
struct mt7915_mcu_tx req = {
.valid = true,
.mode = tx_cmd,
-@@ -1272,6 +1428,9 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
+@@ -1274,6 +1430,9 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
};
struct edca *e = &req.edca[0];
@@ -1565,7 +1566,7 @@
e->queue = qid + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS;
e->set = WMM_PARAM_SET;
-@@ -1284,17 +1443,19 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
+@@ -1286,17 +1445,19 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
}
static int
@@ -1586,7 +1587,7 @@
u8 band = phy->mt76->band_idx;
u32 i2t_time, tr2t_time, txv_time;
u16 cw = 0;
-@@ -1308,6 +1469,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode)
+@@ -1310,6 +1471,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode)
ipg -= sig_ext;
if (ipg <= (TM_MAX_SIFS + slot_time)) {
@@ -1594,7 +1595,7 @@
sifs = ipg - slot_time;
} else {
u32 val = (ipg + slot_time) / slot_time;
-@@ -1343,10 +1505,12 @@ done:
+@@ -1345,10 +1507,12 @@ done:
mt7915_tm_set_slot_time(phy, slot_time, sifs);
@@ -1609,7 +1610,7 @@
}
static int
-@@ -1545,7 +1709,7 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
+@@ -1547,7 +1711,7 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
phy->mt76->test.aid = 0;
phy->mt76->test.tx_mpdu_len = 0;
@@ -1618,7 +1619,7 @@
mt7915_tm_set_entry(phy);
} else {
INIT_DELAYED_WORK(&phy->ipi_work, mt7915_tm_ipi_work);
-@@ -1730,7 +1894,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1732,7 +1896,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
u32 tx_time = td->tx_time, ipg = td->tx_ipg;
u8 duty_cycle = td->tx_duty_cycle;
@@ -1627,7 +1628,7 @@
mt7915_tm_update_channel(phy);
if (td->tx_spe_idx)
-@@ -1745,7 +1909,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1747,7 +1911,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
if (duty_cycle < 100)
tx_time = duty_cycle * ipg / (100 - duty_cycle);
}
@@ -1636,7 +1637,7 @@
mt7915_tm_set_tx_len(phy, tx_time);
if (ipg)
-@@ -1764,6 +1928,9 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1766,6 +1930,9 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_tx_frames_mu(phy, en);
mt7915_tm_set_trx(phy, TM_MAC_TX, en);
@@ -1646,7 +1647,7 @@
}
static int
-@@ -1855,7 +2022,7 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
+@@ -1857,7 +2024,7 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, false);
if (en) {
@@ -1655,7 +1656,7 @@
mt7915_tm_update_channel(phy);
if (td->aid)
mt7915_tm_set_rx_user_idx(phy, td->aid);
-@@ -1872,6 +2039,9 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
+@@ -1874,6 +2041,9 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_set_muru_aid(phy, en ? td->aid : 0xf800);
mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, en);
@@ -1665,7 +1666,7 @@
}
static int
-@@ -1931,34 +2101,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
+@@ -1933,34 +2103,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
rate_idx = sband->bitrates[idx].hw_value & 0xff;
}
@@ -1846,10 +1847,10 @@
#endif
diff --git a/testmode.c b/testmode.c
-index babae8d..4ea5877 100644
+index 4c22dfc..410c7ab 100644
--- a/testmode.c
+++ b/testmode.c
-@@ -195,6 +195,7 @@ mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len,
+@@ -196,6 +196,7 @@ mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len,
hdr = __skb_put_zero(head, sizeof(*hdr));
hdr->frame_control = cpu_to_le16(fc);
@@ -1858,10 +1859,10 @@
memcpy(hdr->addr2, addr[1], ETH_ALEN);
memcpy(hdr->addr3, addr[2], ETH_ALEN);
diff --git a/testmode.h b/testmode.h
-index 97e7596..e13920e 100644
+index b39cf51..20fab3e 100644
--- a/testmode.h
+++ b/testmode.h
-@@ -299,7 +299,10 @@ enum mt76_testmode_cfg {
+@@ -303,7 +303,10 @@ enum mt76_testmode_cfg {
};
enum mt76_testmode_txbf_act {
@@ -1872,7 +1873,7 @@
MT76_TM_TXBF_ACT_UPDATE_CH,
MT76_TM_TXBF_ACT_PHASE_COMP,
MT76_TM_TXBF_ACT_TX_PREP,
-@@ -310,6 +313,12 @@ enum mt76_testmode_txbf_act {
+@@ -314,6 +317,12 @@ enum mt76_testmode_txbf_act {
MT76_TM_TXBF_ACT_PROF_UPDATE_ALL,
MT76_TM_TXBF_ACT_PROF_UPDATE_ALL_CMD,
MT76_TM_TXBF_ACT_E2P_UPDATE,
@@ -1886,7 +1887,7 @@
/* keep last */
NUM_MT76_TM_TXBF_ACT,
diff --git a/tools/fields.c b/tools/fields.c
-index fc01043..7caacb9 100644
+index e2cf4b9..027b8cd 100644
--- a/tools/fields.c
+++ b/tools/fields.c
@@ -33,7 +33,10 @@ static const char * const testmode_tx_mode[] = {