[][MAC80211][WiFi6][mt76][rename bf debug cmd to align connac3]

[Description]
Change 2 BF related debug command naming to align connac3 name. The
reason why I want to make this change is to ensure that the same debug
command script can be used for both connac2 and connac3 chips
simultaneously.

The changed debug commands shows as below:
1. Read BF starec : txbf_sta_rec -> bf_starec_read
2. Read PFMU tag content : txbf_pfmu_tag_idx -> pfmu_tag_read

[Release-log]
N/A

Change-Id: I3fb5b3cd9e3045a99255fe6e8ba7eec8ff5f2ca4
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8173970
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
index e6f1971..334b3fa 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 404ed4dacc3558345f56a49bbe4234387ac06a63 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>
 ---
@@ -25,10 +25,10 @@
  16 files changed, 857 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 ca946f9..8d33291 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,9 +564,9 @@
  	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);
@@ -858,10 +858,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 +870,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 +896,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 +937,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 +950,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 +964,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 +979,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 +988,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 +1022,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 +1034,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 +1118,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 +1128,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 +1162,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 +1171,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 +1189,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 +1206,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 +1215,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 +1223,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 +1233,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 +1262,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 +1283,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 +1292,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 +1308,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 +1363,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 +1375,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 +1384,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 +1409,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 +1418,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 +1427,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 +1505,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 +1542,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 +1555,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 +1565,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 +1586,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 +1594,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 +1609,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 +1618,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 +1627,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 +1636,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 +1646,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 +1655,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 +1665,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 +1846,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 +1858,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 +1872,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 +1886,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[] = {