diff options
author | Shayne Chen <shayne.chen@mediatek.com> | 2020-10-22 04:28:17 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-04 14:31:13 +0100 |
commit | aadf09537c575db5c9c19b0f3e98f6c569015073 (patch) | |
tree | e1b3beb00d283bbf1633d83bd3d594f7d54a70af /drivers/net/wireless/mediatek/mt76/mt7915/init.c | |
parent | mt76: testmode: add support for HE rate modes (diff) | |
download | linux-aadf09537c575db5c9c19b0f3e98f6c569015073.tar.xz linux-aadf09537c575db5c9c19b0f3e98f6c569015073.zip |
mt76: mt7915: implement testmode tx support
Support testmode tx for MT7915A, including tx streams and HE rate
settings.
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
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/init.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index 8a3b701910bf..fe369f85dfeb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -264,6 +264,7 @@ mt7915_init_wiphy(struct ieee80211_hw *hw) ieee80211_hw_set(hw, HAS_RATE_CONTROL); ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD); + ieee80211_hw_set(hw, WANT_MONITOR_VIF); hw->max_tx_fragments = 4; } @@ -620,9 +621,6 @@ int mt7915_register_ext_phy(struct mt7915_dev *dev) mphy->hw->wiphy->perm_addr[0] |= 2; mphy->hw->wiphy->perm_addr[0] ^= BIT(7); - /* The second interface does not get any packets unless it has a vif */ - ieee80211_hw_set(mphy->hw, WANT_MONITOR_VIF); - ret = mt76_register_phy(mphy); if (ret) ieee80211_free_hw(mphy->hw); @@ -678,6 +676,10 @@ int mt7915_register_device(struct mt7915_dev *dev) mt7915_cap_dbdc_disable(dev); dev->phy.dfs_state = -1; +#ifdef CONFIG_NL80211_TESTMODE + dev->mt76.test_ops = &mt7915_testmode_ops; +#endif + ret = mt76_register_device(&dev->mt76, true, mt7915_rates, ARRAY_SIZE(mt7915_rates)); if (ret) |