mt76 fixes
Subsystems (2)
Felix Fietkau
maintainercover mt76 fixes
Felix Fietkau (10):
mt76x2: remove some harmless WARN_ONs in tx status and rx path
mt76x2: fix transmission of encrypted management frames
mt76x2: increase OFDM SIFS time
mt76x2: add channel argument to eeprom tx power functions
mt76x2: initialize channel power limits at probe time
mt76x2: convert between per-chain tx power and combined output
mt76x2: remove MAC address limitation for multi-vif setups
mt76x2: clean up MAC/BSSID address initialization
mt76x2: drop wiphy->addresses
mt76x2: configure rx filter based on monitor mode setting
Fengguang Wu (2):
mt76: fix debugfs_simple_attr.cocci warnings
mt76: fix returnvar.cocci warnings
Lorenzo Bianconi (2):
mt76x2: init: disable APCLI by default
mt76x2: init: fix rx filter default value during init
drivers/net/wireless/mediatek/mt76/debugfs.c | 7 +- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2.h | 3 +- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 41 ++++++++--- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.h | 7 +- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 67 ++++++++++------- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 85 +++++++++++++++++----- drivers/net/wireless/mediatek/mt76/mt76x2_mac.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 57 +++++++++------ drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 30 ++------ drivers/net/wireless/mediatek/mt76/mt76x2_regs.h | 8 ++ drivers/net/wireless/mediatek/mt76/mt76x2_tx.c | 6 +- 12 files changed, 204 insertions(+), 109 deletions(-)
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 1/14 mt76: fix debugfs_simple_attr.cocci warnings
From: Fengguang Wu <[email protected]>
drivers/net/wireless/mediatek/mt76/debugfs.c:36:0-23: WARNING: fops_regval should be defined with DEFINE_DEBUGFS_ATTRIBUTE
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files.
Semantic patch information:
Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
--- drivers/net/wireless/mediatek/mt76/debugfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/debugfs.c +4 -3
@@ -33,7 +33,8 @@ mt76_reg_get(void *data, u64 *val)return 0 ; } -DEFINE_SIMPLE_ATTRIBUTE (fops_regval, mt76_reg_get, mt76_reg_set,"0x%08llx\n" ); +DEFINE_DEBUGFS_ATTRIBUTE (fops_regval, mt76_reg_get, mt76_reg_set, +"0x%08llx\n" );static int mt76_queues_read (struct seq_file *s,void *data)
@@ -65,8 +66,8 @@ struct dentry *mt76_register_debugfs(struct mt76_dev *dev)debugfs_create_u8 ("led_pin" ,S_IRUSR |S_IWUSR , dir, &dev->led_pin);debugfs_create_u32 ("regidx" ,S_IRUSR |S_IWUSR , dir, &dev->debugfs_reg); -debugfs_create_file ("regval" ,S_IRUSR |S_IWUSR , dir, dev, - &fops_regval); +debugfs_create_file_unsafe ("regval" ,S_IRUSR |S_IWUSR , dir, dev, + &fops_regval);debugfs_create_blob ("eeprom" ,S_IRUSR , dir, &dev->eeprom);if (dev->otp.data)debugfs_create_blob ("otp" ,S_IRUSR , dir, &dev->otp);
Signature · 1 line
2.14.2
Re: [01/14] mt76: fix debugfs_simple_attr.cocci warnings
Quoted 12 lines · Felix Fietkau
From: Fengguang Wu <[email protected]>
drivers/net/wireless/mediatek/mt76/debugfs.c:36:0-23: WARNING:
fops_regvalshould be defined withDEFINE_DEBUGFS_ATTRIBUTEUse
DEFINE_DEBUGFS_ATTRIBUTErather thanDEFINE_SIMPLE_ATTRIBUTEfor debugfs files.Semantic patch information:
Rationale:DEFINE_SIMPLE_ATTRIBUTE+debugfs_create_file()imposes some significant overhead as compared toDEFINE_DEBUGFS_ATTRIBUTE+debugfs_create_file_unsafe().
Quoted 5 lines
Generated by:
scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocciFixes a5f6039c8f9c ("mt76: add driver code for MT76x2e")CC Felix Fietkau <[email protected]>Signed-off-by Fengguang Wu <[email protected]>
10 patches applied to wireless-drivers-next.git, thanks.
1a2b3666da58 mt76: fix debugfs_simple_attr.cocci warnings 34152a809d8c mt76: fix returnvar.cocci warningsc2d4c8723dbf mt76x2: remove some harmless WARN_ONs in tx status and rx path ed6b43708116 mt76x2: increase OFDM SIFS time60e2434c5f5a mt76x2: add channel argument to eeprom tx power functions 984ea50324ec mt76x2: initialize channel power limits at probe time 53aa29b274ba mt76x2: convert between per-chain tx power and combined output eb46e5b7be0d mt76x2: init: disable APCLI by default e8be626d794b mt76x2: configure rx filter based on monitor mode setting a86af66f9b0c mt76x2: init: fix rx filter default value during init
Signature · 3 lines
https://patchwork.kernel.org/patch/10112577/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Felix Fietkau
maintainerPATCH 2/14 mt76: fix returnvar.cocci warnings
In reply to Felix FietkauFrom: Fengguang Wu <[email protected]>
drivers/net/wireless/mediatek/mt76/mt76x2_main.c:86:5-8: Unneeded variable: "ret". Return "0" on line 112
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
--- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +1 -2
@@ -83,7 +83,6 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)struct mt76x2_dev *dev = hw->priv;struct mt76x2_vif *mvif = (struct mt76x2_vif *) vif->drv_priv;unsigned int idx =0 ; -int ret =0 ;if (vif->addr[0 ] &BIT (1 )) idx =1 + (((dev->mt76.macaddr[0 ] ^ vif->addr[0 ]) >>2 ) &7 );
@@ -109,7 +108,7 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mvif->group_wcid.hw_key_idx =-1 ;mt76x2_txq_init (dev, vif->txq); -return ret; +return 0 ; } static void
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 3/14 mt76x2: remove some harmless WARN_ONs in tx status and rx path
In reply to Felix FietkauDiscard affected packets instead. Should reduce the frequency of bogus bug reports
--- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c +14 -14
@@ -28,7 +28,7 @@ void mt76x2_mac_set_bssid(struct mt76x2_dev *dev, u8 idx, const u8 *addr) get_unaligned_le16(addr + 4)); } -static void +static int mt76x2_mac_process_rate (struct ieee80211_rx_status *status,u16 rate) {u8 idx =FIELD_GET (MT_RXWI_RATE_INDEX , rate);
@@ -42,7 +42,7 @@ mt76x2_mac_process_rate(struct ieee80211_rx_status *status, u16 rate) idx +=4 ; status->rate_idx = idx; -return ; +return 0 ;case MT_PHY_TYPE_CCK :if (idx >=8 ) { idx -=8 ;
@@ -53,7 +53,7 @@ mt76x2_mac_process_rate(struct ieee80211_rx_status *status, u16 rate) idx =0 ; status->rate_idx = idx; -return ; +return 0 ;case MT_PHY_TYPE_HT_GF : status->enc_flags |=RX_ENC_FLAG_HT_GF ;/* fall through */
@@ -67,8 +67,7 @@ mt76x2_mac_process_rate(struct ieee80211_rx_status *status, u16 rate) status->nss =FIELD_GET (MT_RATE_INDEX_VHT_NSS , idx) +1 ;break ;default : -WARN_ON (1 ); -return ; +return -EINVAL ; }if (rate &MT_RXWI_RATE_LDPC )
@@ -92,6 +91,8 @@ mt76x2_mac_process_rate(struct ieee80211_rx_status *status, u16 rate)default :break ; } + +return 0 ; } static __le16
@@ -272,12 +273,10 @@ int mt76x2_mac_process_rx(struct mt76x2_dev *dev, struct sk_buff *skb, status->freq = dev->mt76.chandef.chan->center_freq; status->band = dev->mt76.chandef.chan->band; -mt76x2_mac_process_rate (status, rate); - -return 0 ; +return mt76x2_mac_process_rate (status, rate); } -static void +static int mt76x2_mac_process_tx_rate (struct ieee80211_tx_rate *txrate,u16 rate,enum nl80211_band band) {
@@ -293,13 +292,13 @@ mt76x2_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate, idx +=4 ; txrate->idx = idx; -return ; +return 0 ;case MT_PHY_TYPE_CCK :if (idx >=8 ) idx -=8 ; txrate->idx = idx; -return ; +return 0 ;case MT_PHY_TYPE_HT_GF : txrate->flags |=IEEE80211_TX_RC_GREEN_FIELD ;/* fall through */
@@ -312,8 +311,7 @@ mt76x2_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate, txrate->idx = idx;break ;default : -WARN_ON (1 ); -return ; +return -EINVAL ; }switch (FIELD_GET (MT_RXWI_RATE_BW , rate)) {
@@ -326,12 +324,14 @@ mt76x2_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate, txrate->flags |=IEEE80211_TX_RC_80_MHZ_WIDTH ;break ;default : -WARN_ON (1 ); +return -EINVAL ;break ; }if (rate &MT_RXWI_RATE_SGI ) txrate->flags |=IEEE80211_TX_RC_SHORT_GI ; + +return 0 ; } static void
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 4/14 mt76x2: fix transmission of encrypted management frames
In reply to Felix FietkauHardware encryption seems to break encrypted unicast mgmt tx. Unfortunately the hardware TXWI header does not have a bit to indicate that a frame is software encrypted, so sw-encrypted frames need to use a different WCID. For that to work, the CCMP PN needs to be generated in software, which makes things a bit slower, so only do it for keys that also need to tx management frames.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 16 ++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 8 +++++++- drivers/net/wireless/mediatek/mt76/mt76x2_tx.c | 6 ++++-- 4 files changed, 28 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +1 -0
@@ -129,6 +129,7 @@ struct mt76_wcid {bool tx_rate_set;u8 tx_rate_nss;s8 max_txpwr_adj; +bool sw_iv; };struct mt76_txq {
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c +16 -0
@@ -171,10 +171,12 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi, {struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);struct ieee80211_tx_rate *rate = &info->control.rates[0 ]; +struct ieee80211_key_conf *key = info->control.hw_key;u16 rate_ht_mask =FIELD_PREP (MT_RXWI_RATE_PHY ,BIT (1 ) |BIT (2 ));u16 txwi_flags =0 ;u8 nss;s8 txpwr_adj, max_txpwr_adj; +u8 ccmp_pn[8 ];memset (txwi,0 ,sizeof (*txwi));
@@ -185,6 +187,20 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi, txwi->pktid =1 ; +if (wcid && wcid->sw_iv && key) { +u64 pn =atomic64_inc_return (&key->tx_pn); + ccmp_pn[0 ] = pn; + ccmp_pn[1 ] = pn >>8 ; + ccmp_pn[2 ] =0 ; + ccmp_pn[3 ] =0x20 | (key->keyidx <<6 ); + ccmp_pn[4 ] = pn >>16 ; + ccmp_pn[5 ] = pn >>24 ; + ccmp_pn[6 ] = pn >>32 ; + ccmp_pn[7 ] = pn >>40 ; + txwi->iv = *((u32 *) &ccmp_pn[0 ]); + txwi->eiv = *((u32 *) &ccmp_pn[1 ]); + } +spin_lock_bh (&dev->mt76.lock);if (wcid && (rate->idx <0 || !rate->count)) { txwi->rate = wcid->tx_rate;
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +7 -1
@@ -343,9 +343,15 @@ mt76x2_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,if (cmd ==SET_KEY ) { key->hw_key_idx = wcid->idx; wcid->hw_key_idx = idx; +if (key->flags &IEEE80211_KEY_FLAG_RX_MGMT ) { + key->flags |=IEEE80211_KEY_FLAG_SW_MGMT_TX ; + wcid->sw_iv = true; + } }else { -if (idx == wcid->hw_key_idx) +if (idx == wcid->hw_key_idx) { wcid->hw_key_idx =-1 ; + wcid->sw_iv = true; + } key =NULL ; }
drivers/net/wireless/mediatek/mt76/mt76x2_tx.c +4 -2
@@ -36,7 +36,9 @@ void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, msta = (struct mt76x2_sta *) control->sta->drv_priv; wcid = &msta->wcid; - }else if (vif) { + } + +if (vif || (!info->control.hw_key && wcid->hw_key_idx !=-1 )) {struct mt76x2_vif *mvif; mvif = (struct mt76x2_vif *) vif->drv_priv;
@@ -166,7 +168,7 @@ int mt76x2_tx_prepare_skb(struct mt76_dev *mdev, void *txwi, *tx_info =FIELD_PREP (MT_TXD_INFO_QSEL , qsel) |MT_TXD_INFO_80211 ; -if (!wcid || wcid->hw_key_idx ==0xff ) +if (!wcid || wcid->hw_key_idx ==0xff || wcid->sw_iv) *tx_info |=MT_TXD_INFO_WIV ;return 0 ;
Signature · 1 line
2.14.2
Re: [04/14] mt76x2: fix transmission of encrypted management frames
Quoted 8 lines · Felix Fietkau
Hardware encryption seems to break encrypted unicast mgmt tx. Unfortunately the hardware TXWI header does not have a bit to indicate that a frame is software encrypted, so sw-encrypted frames need to use a different WCID. For that to work, the CCMP PN needs to be generated in software, which makes things a bit slower, so only do it for keys that also need to tx management frames.
Signed-off-by Felix Fietkau <[email protected]>
Failed to apply:
fatal: sha1 information is lacking or useless (drivers/net/wireless/mediatek/mt76/mt76x2_mac.c).
error: could not build fake ancestor
Applying: mt76x2: fix transmission of encrypted management frames
Patch failed at 0001 mt76x2: fix transmission of encrypted management frames
The copy of the patch that failed is found in: .git/rebase-apply/patch
Patch set to Changes Requested.
Signature · 3 lines
https://patchwork.kernel.org/patch/10112573/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Felix Fietkau
maintainerPATCH 5/14 mt76x2: increase OFDM SIFS time
In reply to Felix FietkauFixes throughput issues in combination with LDPC
--- drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +1 -8
@@ -325,8 +325,7 @@ mt76x2_configure_tx_delay(struct mt76x2_dev *dev, enum nl80211_band band, u8 bw)mt76_wr (dev,MT_TX_SW_CFG0 , cfg0);mt76_wr (dev,MT_TX_SW_CFG1 , cfg1); -mt76_rmw_field (dev,MT_XIFS_TIME_CFG ,MT_XIFS_TIME_CFG_CCK_SIFS , -13 + (bw ?1 :0 )); +mt76_rmw_field (dev,MT_XIFS_TIME_CFG ,MT_XIFS_TIME_CFG_OFDM_SIFS ,15 ); } static void
@@ -559,7 +558,6 @@ int mt76x2_phy_set_channel(struct mt76x2_dev *dev,u8 bw, bw_index;int freq, freq1;int ret; -u8 sifs =13 ; dev->cal.channel_cal_done = false; freq = chandef->chan->center_freq;
@@ -611,11 +609,6 @@ int mt76x2_phy_set_channel(struct mt76x2_dev *dev, MT_EXT_CCA_CFG_CCA_MASK), ext_cca_chan[ch_group_index]); -if (chandef->width >=NL80211_CHAN_WIDTH_40 ) - sifs++; - -mt76_rmw_field (dev,MT_XIFS_TIME_CFG ,MT_XIFS_TIME_CFG_OFDM_SIFS , sifs); - ret =mt76x2_mcu_set_channel (dev, channel, bw, bw_index, scan);if (ret)return ret;
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 6/14 mt76x2: add channel argument to eeprom tx power functions
In reply to Felix FietkauPreparation for exposing maximum power to mac80211
--- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 30 +++++++++++++--------- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.h | 6 +++-- drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 7 ++--- 3 files changed, 26 insertions(+), 17 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c +18 -12
@@ -425,12 +425,13 @@ mt76x2_rate_power_val(u8 val)return mt76x2_sign_extend_optional (val,7 ); } -void mt76x2_get_rate_power (struct mt76x2_dev *dev,struct mt76_rate_power *t) +void mt76x2_get_rate_power (struct mt76x2_dev *dev,struct mt76_rate_power *t, +struct ieee80211_channel *chan) {bool is_5ghz;u16 val; - is_5ghz = dev->mt76.chandef.chan->band ==NL80211_BAND_5GHZ ; + is_5ghz = chan->band ==NL80211_BAND_5GHZ ;memset (t,0 ,sizeof (*t));
@@ -484,9 +485,9 @@ void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76_rate_power *t)static void mt76x2_get_power_info_2g (struct mt76x2_dev *dev,struct mt76x2_tx_power_info *t, -int chain,int offset) +struct ieee80211_channel *chan,int chain,int offset) { -int channel = dev->mt76.chandef.chan->hw_value; +int channel = chan->hw_value;int delta_idx;u8 data[6 ];u16 val;
@@ -511,9 +512,9 @@ mt76x2_get_power_info_2g(struct mt76x2_dev *dev, struct mt76x2_tx_power_info *t,static void mt76x2_get_power_info_5g (struct mt76x2_dev *dev,struct mt76x2_tx_power_info *t, -int chain,int offset) +struct ieee80211_channel *chan,int chain,int offset) { -int channel = dev->mt76.chandef.chan->hw_value; +int channel = chan->hw_value;enum mt76x2_cal_channel_group group;int delta_idx;u16 val;
@@ -559,7 +560,8 @@ mt76x2_get_power_info_5g(struct mt76x2_dev *dev, struct mt76x2_tx_power_info *t, }void mt76x2_get_power_info (struct mt76x2_dev *dev, -struct mt76x2_tx_power_info *t) +struct mt76x2_tx_power_info *t, +struct ieee80211_channel *chan) {u16 bw40, bw80;
@@ -568,13 +570,17 @@ void mt76x2_get_power_info(struct mt76x2_dev *dev, bw40 =mt76x2_eeprom_get (dev,MT_EE_TX_POWER_DELTA_BW40 ); bw80 =mt76x2_eeprom_get (dev,MT_EE_TX_POWER_DELTA_BW80 ); -if (dev->mt76.chandef.chan->band ==NL80211_BAND_5GHZ ) { +if (chan->band ==NL80211_BAND_5GHZ ) { bw40 >>=8 ; -mt76x2_get_power_info_5g (dev, t,0 ,MT_EE_TX_POWER_0_START_5G ); -mt76x2_get_power_info_5g (dev, t,1 ,MT_EE_TX_POWER_1_START_5G ); +mt76x2_get_power_info_5g (dev, t, chan,0 , +MT_EE_TX_POWER_0_START_5G ); +mt76x2_get_power_info_5g (dev, t, chan,1 , +MT_EE_TX_POWER_1_START_5G ); }else { -mt76x2_get_power_info_2g (dev, t,0 ,MT_EE_TX_POWER_0_START_2G ); -mt76x2_get_power_info_2g (dev, t,1 ,MT_EE_TX_POWER_1_START_2G ); +mt76x2_get_power_info_2g (dev, t, chan,0 , +MT_EE_TX_POWER_0_START_2G ); +mt76x2_get_power_info_2g (dev, t, chan,1 , +MT_EE_TX_POWER_1_START_2G ); }if (mt76x2_tssi_enabled (dev) || !field_valid (t->target_power))
drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.h +4 -2
@@ -146,9 +146,11 @@ mt76x2_eeprom_get(struct mt76x2_dev *dev, enum mt76x2_eeprom_field field)return get_unaligned_le16 (dev->mt76.eeprom.data + field); } -void mt76x2_get_rate_power (struct mt76x2_dev *dev,struct mt76_rate_power *t); +void mt76x2_get_rate_power (struct mt76x2_dev *dev,struct mt76_rate_power *t, +struct ieee80211_channel *chan);void mt76x2_get_power_info (struct mt76x2_dev *dev, -struct mt76x2_tx_power_info *t); +struct mt76x2_tx_power_info *t, +struct ieee80211_channel *chan);int mt76x2_get_temp_comp (struct mt76x2_dev *dev,struct mt76x2_temp_comp *t);bool mt76x2_ext_pa_enabled (struct mt76x2_dev *dev,enum nl80211_band band);void mt76x2_read_rx_gain (struct mt76x2_dev *dev);
drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +4 -3
@@ -117,11 +117,12 @@ mt76x2_get_max_power(struct mt76_rate_power *r)void mt76x2_phy_set_txpower (struct mt76x2_dev *dev) {enum nl80211_chan_width width = dev->mt76.chandef.width; +struct ieee80211_channel *chan = dev->mt76.chandef.chan;struct mt76x2_tx_power_info txp;int txp_0, txp_1, delta =0 ;struct mt76_rate_power t = {}; -mt76x2_get_power_info (dev, &txp); +mt76x2_get_power_info (dev, &txp, chan);if (width ==NL80211_CHAN_WIDTH_40 ) delta = txp.delta_bw40;
@@ -131,7 +132,7 @@ void mt76x2_phy_set_txpower(struct mt76x2_dev *dev)if (txp.target_power > dev->txpower_conf) delta -= txp.target_power - dev->txpower_conf; -mt76x2_get_rate_power (dev, &t); +mt76x2_get_rate_power (dev, &t, chan);mt76x2_add_rate_power_offset (&t, txp.chain[0 ].target_power + txp.chain[0 ].delta);mt76x2_limit_rate_power (&t, dev->txpower_conf);
@@ -675,7 +676,7 @@ mt76x2_phy_tssi_compensate(struct mt76x2_dev *dev)return ; dev->cal.tssi_comp_pending = false; -mt76x2_get_power_info (dev, &txp); +mt76x2_get_power_info (dev, &txp, chan);if (mt76x2_ext_pa_enabled (dev, chan->band)) t.pa_mode =1 ;
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 7/14 mt76x2: initialize channel power limits at probe time
In reply to Felix FietkauThis allows user space to query the real hardware limits directly
--- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 11 ++++++++ drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 30 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 14 +--------- 4 files changed, 43 insertions(+), 13 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c +11 -0
@@ -483,6 +483,17 @@ void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76_rate_power *t, t->vht[8 ] = t->vht[9 ] =mt76x2_rate_power_val (val >>8 ); } +int mt76x2_get_max_rate_power (struct mt76_rate_power *r) +{ +int i; +s8 ret =0 ; + +for (i =0 ; i <sizeof (r->all); i++) + ret =max (ret, r->all[i]); + +return ret; +} +static void mt76x2_get_power_info_2g (struct mt76x2_dev *dev,struct mt76x2_tx_power_info *t,struct ieee80211_channel *chan,int chain,int offset)
drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.h +1 -0
@@ -148,6 +148,7 @@ mt76x2_eeprom_get(struct mt76x2_dev *dev, enum mt76x2_eeprom_field field)void mt76x2_get_rate_power (struct mt76x2_dev *dev,struct mt76_rate_power *t,struct ieee80211_channel *chan); +int mt76x2_get_max_rate_power (struct mt76_rate_power *r);void mt76x2_get_power_info (struct mt76x2_dev *dev,struct mt76x2_tx_power_info *t,struct ieee80211_channel *chan);
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +30 -0
@@ -760,6 +760,34 @@ static void mt76x2_led_set_brightness(struct led_classdev *led_cdev,mt76x2_led_set_config (mt76,0xff ,0 ); } +static void +mt76x2_init_txpower (struct mt76x2_dev *dev, +struct ieee80211_supported_band *sband) +{ +struct ieee80211_channel *chan; +struct mt76x2_tx_power_info txp; +struct mt76_rate_power t = {}; +int target_power; +int i; + +for (i =0 ; i < sband->n_channels; i++) { + chan = &sband->channels[i]; + +mt76x2_get_power_info (dev, &txp, chan); + + target_power =max_t (int, (txp.chain[0 ].target_power + + txp.chain[0 ].delta), + (txp.chain[1 ].target_power + + txp.chain[1 ].delta)); + +mt76x2_get_rate_power (dev, &t, chan); + + chan->max_power =mt76x2_get_max_rate_power (&t) + + target_power; + chan->max_power /=2 ; + } +} +int mt76x2_register_device (struct mt76x2_dev *dev) {struct ieee80211_hw *hw =mt76_hw (dev);
@@ -828,6 +856,8 @@ int mt76x2_register_device(struct mt76x2_dev *dev) goto fail;mt76x2_init_debugfs (dev); +mt76x2_init_txpower (dev, &dev->mt76.sband_2g.sband); +mt76x2_init_txpower (dev, &dev->mt76.sband_5g.sband);return 0 ;
drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +1 -13
@@ -102,18 +102,6 @@ mt76x2_limit_rate_power(struct mt76_rate_power *r, int limit) r->all[i] = limit; } -static int -mt76x2_get_max_power (struct mt76_rate_power *r) -{ -int i; -s8 ret =0 ; - -for (i =0 ; i <sizeof (r->all); i++) - ret =max (ret, r->all[i]); - -return ret; -} -void mt76x2_phy_set_txpower (struct mt76x2_dev *dev) {enum nl80211_chan_width width = dev->mt76.chandef.width;
@@ -136,7 +124,7 @@ void mt76x2_phy_set_txpower(struct mt76x2_dev *dev)mt76x2_add_rate_power_offset (&t, txp.chain[0 ].target_power + txp.chain[0 ].delta);mt76x2_limit_rate_power (&t, dev->txpower_conf); - dev->txpower_cur =mt76x2_get_max_power (&t); + dev->txpower_cur =mt76x2_get_max_rate_power (&t);mt76x2_add_rate_power_offset (&t, -(txp.chain[0 ].target_power + txp.chain[0 ].delta + delta)); dev->target_power = txp.chain[0 ].target_power;
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 8/14 mt76x2: convert between per-chain tx power and combined output
In reply to Felix FietkauUsing both chains adds max. 3 dBm. A similar worst-case calculation is being used in ath9k as well to ensure that the hardware stays within regulatory limits
--- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 7 +++++++ 2 files changed, 10 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +3 -0
@@ -785,6 +785,9 @@ mt76x2_init_txpower(struct mt76x2_dev *dev, chan->max_power =mt76x2_get_max_rate_power (&t) + target_power; chan->max_power /=2 ; + +/* convert to combined output power on 2x2 devices */ + chan->max_power +=3 ; } }
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +7 -0
@@ -155,6 +155,9 @@ mt76x2_config(struct ieee80211_hw *hw, u32 changed)if (changed &IEEE80211_CONF_CHANGE_POWER ) { dev->txpower_conf = hw->conf.power_level *2 ; +/* convert to per-chain power for 2x2 devices */ + dev->txpower_conf -=6 ; +if (test_bit (MT76_STATE_RUNNING , &dev->mt76.state)) {mt76x2_phy_set_txpower (dev);mt76x2_tx_set_txpwr_auto (dev, dev->txpower_conf);
@@ -443,6 +446,10 @@ mt76x2_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm)struct mt76x2_dev *dev = hw->priv; *dbm = dev->txpower_cur /2 ; + +/* convert from per-chain power to combined output on 2x2 devices */ + *dbm +=3 ; +return 0 ; }
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 9/14 mt76x2: remove MAC address limitation for multi-vif setups
In reply to Felix FietkauThe hardware has a separate set of registers to configure a per-interface MAC address.
--- drivers/net/wireless/mediatek/mt76/mt76x2.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 27 +++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt76x2_mac.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 30 ++++++++++-------------- drivers/net/wireless/mediatek/mt76/mt76x2_regs.h | 8 +++++++ 6 files changed, 47 insertions(+), 22 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2.h +1 -0
@@ -90,6 +90,7 @@ struct mt76x2_dev {const u16 *beacon_offsets;unsigned long wcid_mask[128 /BITS_PER_LONG ]; +unsigned long vif_mask;int txpower_conf;int txpower_cur;
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +2 -0
@@ -279,6 +279,8 @@ int mt76x2_mac_reset(struct mt76x2_dev *dev, bool hard)FIELD_PREP (MT_MAC_BSSID_DW1_MBSS_MODE ,3 ) |/* 8 beacons */ MT_MAC_BSSID_DW1_MBSS_LOCAL_BIT); +mt76_set (dev,MT_MAC_ADDR_EXT_CTL ,MT_MAC_ADDR_EXT_CTL_EN ); +/* Fire a pre-TBTT interrupt 8 ms before TBTT */ mt76_rmw_field (dev,MT_INT_TIMER_CFG ,MT_INT_TIMER_CFG_PRE_TBTT ,8 <<4 );
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c +23 -4
@@ -22,10 +22,29 @@void mt76x2_mac_set_bssid (struct mt76x2_dev *dev,u8 idx,const u8 *addr) { - idx &=7 ; -mt76_wr (dev,MT_MAC_APC_BSSID_L (idx),get_unaligned_le32 (addr)); -mt76_rmw_field (dev,MT_MAC_APC_BSSID_H (idx),MT_MAC_APC_BSSID_H_ADDR , -get_unaligned_le16 (addr +4 )); +u32 lo =0 , hi =0 ; + +if (addr) { + lo =get_unaligned_le32 (addr); + hi =get_unaligned_le16 (addr +4 ); + hi |=MT_MAC_APC_BSSID0_H_EN ; + } + +mt76_wr (dev,MT_MAC_APC_BSSID_L (idx), lo); +mt76_wr (dev,MT_MAC_APC_BSSID_H (idx), hi); +} + +void mt76x2_mac_set_ext_mac (struct mt76x2_dev *dev,u8 idx,const u8 *addr) +{ +u32 lo =0 , hi =0 ; + +if (addr) { + lo =get_unaligned_le32 (addr); + hi =get_unaligned_le16 (addr +4 ); + } + +mt76_wr (dev,MT_MAC_ADDR_EXT_L (idx), lo); +mt76_wr (dev,MT_MAC_ADDR_EXT_H (idx), hi); } static int
drivers/net/wireless/mediatek/mt76/mt76x2_mac.h +1 -0
@@ -162,6 +162,7 @@ int mt76x2_mac_start(struct mt76x2_dev *dev);void mt76x2_mac_stop (struct mt76x2_dev *dev,bool force);void mt76x2_mac_resume (struct mt76x2_dev *dev);void mt76x2_mac_set_bssid (struct mt76x2_dev *dev,u8 idx,const u8 *addr); +void mt76x2_mac_set_ext_mac (struct mt76x2_dev *dev,u8 idx,const u8 *addr);int mt76x2_mac_process_rx (struct mt76x2_dev *dev,struct sk_buff *skb,void *rxi);
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +12 -18
@@ -82,26 +82,15 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) {struct mt76x2_dev *dev = hw->priv;struct mt76x2_vif *mvif = (struct mt76x2_vif *) vif->drv_priv; -unsigned int idx =0 ; +unsigned int idx; -if (vif->addr[0 ] &BIT (1 )) - idx =1 + (((dev->mt76.macaddr[0 ] ^ vif->addr[0 ]) >>2 ) &7 ); + idx =ffs (~dev->vif_mask); +if (!idx || idx >8 ) +return -ENOSPC ; -/* -* Client mode typically only has one configurable BSSID register, -* which is used for bssidx=0. This is linked to the MAC address. -* Since mac80211 allows changing interface types, and we cannot -* force the use of the primary MAC address for a station mode -* interface, we need some other way of configuring a per-interface -* remote BSSID. -* The hardware provides an AP-Client feature, where bssidx 0-7 are -* used for AP mode and bssidx 8-15 for client mode. -* We shift the station interface bss index by 8 to force the -* hardware to recognize the BSSID. -* The resulting bssidx mismatch for unicast frames is ignored by hw. -*/ -if (vif->type ==NL80211_IFTYPE_STATION ) - idx +=8 ; + idx--; + dev->vif_mask |=BIT (idx); +mt76x2_mac_set_ext_mac (dev, idx, vif->addr); mvif->idx = idx; mvif->group_wcid.idx =254 - idx;
@@ -114,8 +103,13 @@ mt76x2_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)static void mt76x2_remove_interface (struct ieee80211_hw *hw,struct ieee80211_vif *vif) { +struct mt76x2_vif *mvif = (struct mt76x2_vif *)vif->drv_priv;struct mt76x2_dev *dev = hw->priv; +int idx = mvif->idx; +mt76x2_mac_set_bssid (dev, mvif->idx,NULL ); +mt76x2_mac_set_ext_mac (dev, idx,NULL ); + dev->vif_mask &= ~BIT (idx);mt76_txq_remove (&dev->mt76, vif->txq); }
drivers/net/wireless/mediatek/mt76/mt76x2_regs.h +8 -0
@@ -438,6 +438,14 @@#define MT_TX_SW_CFG3 0x1478 +#define MT_MAC_ADDR_EXT_CTL 0x147c +#define MT_MAC_ADDR_EXT_CTL_EN BIT(0) + +#define MT_MAC_ADDR_EXT_BASE 0x1480 +#define MT_MAC_ADDR_EXT_L (_n) (MT_MAC_ADDR_EXT_BASE + ((_n) * 8)) +#define MT_MAC_ADDR_EXT_H (_n) (MT_MAC_ADDR_EXT_BASE + ((_n) * 8 + 4)) +#define MT_MAC_ADDR_EXT_H_MASK GENMASK(15, 0) +#define MT_PN_PAD_MODE 0x150c#define MT_TXOP_HLDR_ET 0x1608
Signature · 1 line
2.14.2
Felix Fietkau
maintainerRe: [PATCH 09/14] mt76x2: remove MAC address limitation for multi-vif setups
Quoted 5 lines · Felix Fietkau
The hardware has a separate set of registers to configure a per-interface MAC address.
Signed-off-by Lorenzo Bianconi <[email protected]>Signed-off-by Felix Fietkau <[email protected]>
Please drop patches 09-11, I'm currently investigating a performance regression. The rest should be fine.
- Felix
Re: [09/14] mt76x2: remove MAC address limitation for multi-vif setups
In reply to Felix FietkauQuoted 5 lines · Felix Fietkau
The hardware has a separate set of registers to configure a per-interface MAC address.
Signed-off-by Lorenzo Bianconi <[email protected]>Signed-off-by Felix Fietkau <[email protected]>
Dropped per Felix request
3 patches set to Changes Requested.
10112557 [09/14] mt76x2: remove MAC address limitation for multi-vif setups 10112559 [10/14] mt76x2: clean up MAC/BSSID address initialization 10112571 [11/14] mt76x2: drop wiphy->addresses
Signature · 3 lines
https://patchwork.kernel.org/patch/10112557/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Felix Fietkau
maintainerPATCH 10/14 mt76x2: clean up MAC/BSSID address initialization
In reply to Felix FietkauDrop the use of the EEPROM address entirely, rely on interface address only
--- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 11 ++++------- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +4 -7
@@ -231,7 +231,6 @@ mt76x2_init_beacon_offsets(struct mt76x2_dev *dev)int mt76x2_mac_reset (struct mt76x2_dev *dev,bool hard) {static const u8 null_addr[ETH_ALEN ] = {}; -const u8 *macaddr = dev->mt76.macaddr;u32 val;int i, k;
@@ -271,13 +270,11 @@ int mt76x2_mac_reset(struct mt76x2_dev *dev, bool hard)mt76_wr (dev,MT_MCU_CLOCK_CTL ,0x1401 );mt76_clear (dev,MT_FCE_L2_STUFF ,MT_FCE_L2_STUFF_WR_MPDU_LEN_EN ); -mt76_wr (dev,MT_MAC_ADDR_DW0 ,get_unaligned_le32 (macaddr)); -mt76_wr (dev,MT_MAC_ADDR_DW1 ,get_unaligned_le16 (macaddr +4 )); +mt76_wr (dev,MT_MAC_ADDR_DW0 ,0 ); +mt76_wr (dev,MT_MAC_ADDR_DW1 ,0 ); -mt76_wr (dev,MT_MAC_BSSID_DW0 ,get_unaligned_le32 (macaddr)); -mt76_wr (dev,MT_MAC_BSSID_DW1 ,get_unaligned_le16 (macaddr +4 ) | -FIELD_PREP (MT_MAC_BSSID_DW1_MBSS_MODE ,3 ) |/* 8 beacons */ -MT_MAC_BSSID_DW1_MBSS_LOCAL_BIT ); +mt76_wr (dev,MT_MAC_BSSID_DW0 ,0 ); +mt76_wr (dev,MT_MAC_BSSID_DW1 ,0 );mt76_set (dev,MT_MAC_ADDR_EXT_CTL ,MT_MAC_ADDR_EXT_CTL_EN );
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c +14 -0
@@ -27,6 +27,15 @@ void mt76x2_mac_set_bssid(struct mt76x2_dev *dev, u8 idx, const u8 *addr)if (addr) { lo =get_unaligned_le32 (addr); hi =get_unaligned_le16 (addr +4 ); + +if (!idx) { +mt76_wr (dev,MT_MAC_BSSID_DW0 , lo); + +mt76_rmw_field (dev,MT_MAC_BSSID_DW1 , +MT_MAC_BSSID_DW1_ADDR , + hi); + } + hi |=MT_MAC_APC_BSSID0_H_EN ; }
@@ -41,6 +50,11 @@ void mt76x2_mac_set_ext_mac(struct mt76x2_dev *dev, u8 idx, const u8 *addr)if (addr) { lo =get_unaligned_le32 (addr); hi =get_unaligned_le16 (addr +4 ); + +if (!idx) { +mt76_wr (dev,MT_MAC_ADDR_DW0 , lo); +mt76_wr (dev,MT_MAC_ADDR_DW1 , hi); + } }mt76_wr (dev,MT_MAC_ADDR_EXT_L (idx), lo);
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 11/14 mt76x2: drop wiphy->addresses
In reply to Felix FietkauNow that the MAC address limitation is resolved, we no longer need a MAC address list
--- drivers/net/wireless/mediatek/mt76/mt76x2.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2.h +0 -2
@@ -84,8 +84,6 @@ struct mt76x2_calibration {struct mt76x2_dev {struct mt76_dev mt76;/* must be first */ -struct mac_address macaddr_list[8 ]; -struct mutex mutex;const u16 *beacon_offsets;
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +1 -15
@@ -796,7 +796,7 @@ int mt76x2_register_device(struct mt76x2_dev *dev)struct wiphy *wiphy = hw->wiphy;void *status_fifo;int fifo_size; -int i, ret; +int ret; fifo_size =roundup_pow_of_two (32 *sizeof (struct mt76x2_tx_status )); status_fifo =devm_kzalloc (dev->mt76.dev, fifo_size,GFP_KERNEL );
@@ -818,20 +818,6 @@ int mt76x2_register_device(struct mt76x2_dev *dev) hw->sta_data_size =sizeof (struct mt76x2_sta ); hw->vif_data_size =sizeof (struct mt76x2_vif ); -for (i =0 ; i <ARRAY_SIZE (dev->macaddr_list); i++) { -u8 *addr = dev->macaddr_list[i].addr; - -memcpy (addr, dev->mt76.macaddr,ETH_ALEN ); - -if (!i) -continue ; - - addr[0 ] |=BIT (1 ); - addr[0 ] ^= ((i -1 ) <<2 ); - } - wiphy->addresses = dev->macaddr_list; - wiphy->n_addresses =ARRAY_SIZE (dev->macaddr_list); - wiphy->iface_combinations = if_comb; wiphy->n_iface_combinations =ARRAY_SIZE (if_comb);
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 12/14 mt76x2: init: disable APCLI by default
In reply to Felix FietkauFrom: Lorenzo Bianconi <[email protected]>
It is no longer necessary for client mode operation, vif index entries 8-16 are no longer used
--- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +0 -2
@@ -307,8 +307,6 @@ int mt76x2_mac_reset(struct mt76x2_dev *dev, bool hard)for (i =0 ; i <16 ; i++)mt76_rr (dev,MT_TX_STAT_FIFO ); -mt76_set (dev,MT_MAC_APC_BSSID_H (0 ),MT_MAC_APC_BSSID0_H_EN ); - mt76_wr(dev, MT_CH_TIME_CFG, MT_CH_TIME_CFG_TIMER_EN | MT_CH_TIME_CFG_TX_AS_BUSY |
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 13/14 mt76x2: configure rx filter based on monitor mode setting
In reply to Felix FietkauDue to an unrelated issue, the MT_RX_FILTR_CFG_PROMISC flag is currently unset, which means that monitor mode is unconditionally enabled. Toggle this flag based on the mac80211 monitor mode setting instead
--- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +9 -0
@@ -146,6 +146,15 @@ mt76x2_config(struct ieee80211_hw *hw, u32 changed)mutex_lock (&dev->mutex); +if (changed &IEEE80211_CONF_CHANGE_MONITOR ) { +if (!(hw->conf.flags &IEEE80211_CONF_MONITOR )) + dev->rxfilter |=MT_RX_FILTR_CFG_PROMISC ; +else + dev->rxfilter &= ~MT_RX_FILTR_CFG_PROMISC ; + +mt76_wr (dev,MT_RX_FILTR_CFG , dev->rxfilter); + } +if (changed &IEEE80211_CONF_CHANGE_POWER ) { dev->txpower_conf = hw->conf.power_level *2 ;
Signature · 1 line
2.14.2
Felix Fietkau
maintainerPATCH 14/14 mt76x2: init: fix rx filter default value during init
In reply to Felix FietkauFrom: Lorenzo Bianconi <[email protected]>
mt76x2_mac_start writes dev->rxfilter to the hardware. It also happens during init, before dev->rxfilter is filled with the initval register value, leading to issues like promisc mode being enabled unconditionally.
Fix this by reading the default value into dev->rxfilter earlier
--- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +2 -1
@@ -583,6 +583,8 @@ int mt76x2_init_hardware(struct mt76x2_dev *dev)if (ret)return ret; + dev->rxfilter =mt76_rr (dev,MT_RX_FILTR_CFG ); + ret =mt76x2_dma_init (dev);if (ret)return ret;
@@ -597,7 +599,6 @@ int mt76x2_init_hardware(struct mt76x2_dev *dev)return ret;mt76x2_mac_stop (dev, false); - dev->rxfilter =mt76_rr (dev,MT_RX_FILTR_CFG );return 0 ; }
Signature · 1 line
2.14.2