summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
diff options
context:
space:
mode:
authorShayne Chen <shayne.chen@mediatek.com>2022-09-30 17:13:14 +0200
committerFelix Fietkau <nbd@nbd.name>2022-12-01 17:29:12 +0100
commit7a9a957b2be6e894d7d207d987c343b566d71b1d (patch)
tree913f1c5fe8787e669fadcabc18e346640c5dbe6e /drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
parentwifi: mt76: connac: introduce mt76_connac_spe_idx() (diff)
downloadlinux-7a9a957b2be6e894d7d207d987c343b566d71b1d.tar.xz
linux-7a9a957b2be6e894d7d207d987c343b566d71b1d.zip
wifi: mt76: mt7915: add spatial extension index support
In previous, we only allow user to configure tx antenna mask contiguously (e.g. 0x3, 0xf). This patch allows user to configure tx antenna mask interleavingly (e.g. 0x5, 0x8). By setting proper antenna mask and nss, user can prioritized the signal of different antennas, which helps to test their performance in normal mode. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915/testmode.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/testmode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
index e1838f046568..a979460fad2d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
@@ -432,8 +432,6 @@ mt7915_tm_update_channel(struct mt7915_phy *phy)
static void
mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
{
- static const u8 spe_idx_map[] = {0, 0, 1, 0, 3, 2, 4, 0,
- 9, 8, 6, 10, 16, 12, 18, 0};
struct mt76_testmode_data *td = &phy->mt76->test;
struct mt7915_dev *dev = phy->dev;
struct ieee80211_tx_info *info;
@@ -450,7 +448,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
if (td->tx_spe_idx)
phy->test.spe_idx = td->tx_spe_idx;
else
- phy->test.spe_idx = spe_idx_map[td->tx_antenna_mask];
+ phy->test.spe_idx = mt76_connac_spe_idx(td->tx_antenna_mask);
}
mt7915_tm_set_tam_arb(phy, en,