[][MAC80211][WiFi6][mt76][Fix cheetah 5G ibf issue]
[Description]
Fix cheetah 5G ibf issue
max nss should use chainmask instead of antenna_mask since cheetah is
3TX 3RX but 2ss (chainmask is 0x7 but antenna_mask is 0x3).
Otherwise, 5G ibf cannot use 3TRX with MCS = 23.
Submit this change to testmode "additional support" patch instead of
cheetah testmode patch, as it addresses a general issue.
[Release-log]
N/A
Change-Id: I4584103ae0b100678c54acea33609e6d8502bbf6
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8242507
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-additional-supports.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-additional-supports.patch
index 9f92153..75d06fe 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-additional-supports.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-additional-supports.patch
@@ -1,7 +1,7 @@
-From e7c6d49d0b5582ba7cb37d9d844a341b18c5a393 Mon Sep 17 00:00:00 2001
+From 49238ab5d438d7110060e6cd21f35247d6ce3cb5 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Thu, 21 Apr 2022 15:43:19 +0800
-Subject: [PATCH 1009/1042] wifi: mt76: testmode: additional supports
+Subject: [PATCH] wifi: mt76: testmode: additional supports
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -22,11 +22,11 @@
mt7915/regs.h | 3 +
mt7915/testmode.c | 1244 ++++++++++++++++++++++++++++++++++++++++++---
mt7915/testmode.h | 278 ++++++++++
- testmode.c | 287 +++++++++--
+ testmode.c | 289 +++++++++--
testmode.h | 79 +++
tools/fields.c | 90 +++-
tx.c | 3 +-
- 20 files changed, 2063 insertions(+), 168 deletions(-)
+ 20 files changed, 2064 insertions(+), 169 deletions(-)
diff --git a/dma.c b/dma.c
index 24b44e7..8049830 100644
@@ -2417,7 +2417,7 @@
+
#endif
diff --git a/testmode.c b/testmode.c
-index 1b37392..b39fef4 100644
+index 1b37392..bc7f0b5 100644
--- a/testmode.c
+++ b/testmode.c
@@ -8,6 +8,7 @@ const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS] = {
@@ -2601,7 +2601,7 @@
dev_kfree_skb(head);
return -ENOMEM;
}
-@@ -167,15 +228,14 @@ int mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len)
+@@ -167,23 +228,22 @@ int mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len)
frag_tail = &(*frag_tail)->next;
}
@@ -2621,8 +2621,9 @@
{
struct mt76_testmode_data *td = &phy->test;
struct ieee80211_tx_info *info;
-@@ -183,7 +243,7 @@ mt76_testmode_tx_init(struct mt76_phy *phy)
- u8 max_nss = hweight8(phy->antenna_mask);
+ struct ieee80211_tx_rate *rate;
+- u8 max_nss = hweight8(phy->antenna_mask);
++ u8 max_nss = hweight8(phy->chainmask);
int ret;
- ret = mt76_testmode_alloc_skb(phy, td->tx_mpdu_len);