wifi: mt76: connac: use peer address for station BMC entry
Subsystems (2)
Shayne Chen
reviewerPATCH 1/10 wifi: mt76: connac: use peer address for station BMC entry
Set peer address and aid for the BMC wtbl of station interface. For some functions such as parsing MU_EDCA parameters from beacon, firmware will need the peer address to do correct parsing.
Without this patch, MU uplink traffic would get suffered.
--- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 9 ++++++++- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 15 ++++++++++----- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 6 +++--- .../net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +8 -1
@@ -392,7 +392,14 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,if (!sta) { basic->conn_type =cpu_to_le32 (CONNECTION_INFRA_BC ); -eth_broadcast_addr (basic->peer_addr); + +if (is_mt799x (dev) && vif->type ==NL80211_IFTYPE_STATION && + !is_zero_ether_addr (vif->bss_conf.bssid)) { +memcpy (basic->peer_addr, vif->bss_conf.bssid,ETH_ALEN ); + basic->aid =cpu_to_le16 (vif->cfg.aid); + }else { +eth_broadcast_addr (basic->peer_addr); + }return ; }
drivers/net/wireless/mediatek/mt76/mt7996/main.c +10 -5
@@ -238,7 +238,11 @@ static int mt7996_add_interface(struct ieee80211_hw *hw,mt7996_init_bitrate_mask (vif);mt7996_mcu_add_bss_info (phy, vif, true); -mt7996_mcu_add_sta (dev, vif,NULL , true); +/* defer the first STA_REC of BMC entry to BSS_CHANGED_BSSID for STA +* interface, since firmware only records BSSID when the entry is new +*/ +if (vif->type !=NL80211_IFTYPE_STATION ) +mt7996_mcu_add_sta (dev, vif,NULL , true, true);rcu_assign_pointer (dev->mt76.wcid[idx], &mvif->sta.wcid); out:
@@ -256,7 +260,7 @@ static void mt7996_remove_interface(struct ieee80211_hw *hw,struct mt7996_phy *phy =mt7996_hw_phy (hw);int idx = msta->wcid.idx; -mt7996_mcu_add_sta (dev, vif,NULL , false); +mt7996_mcu_add_sta (dev, vif,NULL , false, false);mt7996_mcu_add_bss_info (phy, vif, false);if (vif == phy->monitor_vif)
@@ -599,7 +603,8 @@ static void mt7996_bss_info_changed(struct ieee80211_hw *hw, (changed & BSS_CHANGED_ASSOC && vif->cfg.assoc) || (changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon)) {mt7996_mcu_add_bss_info (phy, vif, true); -mt7996_mcu_add_sta (dev, vif,NULL , true); +mt7996_mcu_add_sta (dev, vif,NULL , true, + !!(changed &BSS_CHANGED_BSSID )); }if (changed &BSS_CHANGED_ERP_CTS_PROT )
@@ -688,7 +693,7 @@ int mt7996_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,mt7996_mac_wtbl_update (dev, idx,MT_WTBL_UPDATE_ADM_COUNT_CLEAR ); - ret =mt7996_mcu_add_sta (dev, vif, sta, true); + ret =mt7996_mcu_add_sta (dev, vif, sta, true, true);if (ret)return ret;
@@ -702,7 +707,7 @@ void mt7996_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;int i; -mt7996_mcu_add_sta (dev, vif, sta, false); +mt7996_mcu_add_sta (dev, vif, sta, false, false);mt7996_mac_wtbl_update (dev, msta->wcid.idx,MT_WTBL_UPDATE_ADM_COUNT_CLEAR );
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +3 -3
@@ -2133,7 +2133,7 @@ mt7996_mcu_add_group(struct mt7996_dev *dev, struct ieee80211_vif *vif, }int mt7996_mcu_add_sta (struct mt7996_dev *dev,struct ieee80211_vif *vif, -struct ieee80211_sta *sta,bool enable) +struct ieee80211_sta *sta,bool enable,bool newly) {struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;struct mt7996_sta *msta;
@@ -2149,8 +2149,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,return PTR_ERR (skb);/* starec basic */ -mt76_connac_mcu_sta_basic_tlv (&dev->mt76, skb, vif, sta, enable, - !rcu_access_pointer (dev->mt76.wcid[msta->wcid.idx])); +mt76_connac_mcu_sta_basic_tlv (&dev->mt76, skb, vif, sta, enable, newly); +if (!enable) goto out;
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +1 -1
@@ -450,7 +450,7 @@ int mt7996_mcu_add_dev_info(struct mt7996_phy *phy,int mt7996_mcu_add_bss_info (struct mt7996_phy *phy,struct ieee80211_vif *vif,int enable);int mt7996_mcu_add_sta (struct mt7996_dev *dev,struct ieee80211_vif *vif, -struct ieee80211_sta *sta,bool enable); +struct ieee80211_sta *sta,bool enable,bool newly);int mt7996_mcu_add_tx_ba (struct mt7996_dev *dev,struct ieee80211_ampdu_params *params,bool add);
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 2/10 wifi: mt76: mt7996: disable rx header translation for BMC entry
When a BMC wtbl of station interface is correctly set with peer address, HW will do rx header translation for broadcast data packets, which makes mac80211 unable to find the corresponding ieee80211_sta and drop the packets. To fix this, disable HW rx header translation for BMC entry.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +5 -4
@@ -1778,10 +1778,10 @@ mt7996_mcu_sta_hdr_trans_tlv(struct mt7996_dev *dev, struct sk_buff *skb,else hdr_trans->from_ds = true; - wcid = (struct mt76_wcid *)sta->drv_priv; -if (!wcid) +if (!sta)return ; + wcid = (struct mt76_wcid *)sta->drv_priv; hdr_trans->dis_rx_hdr_tran = !test_bit (MT_WCID_FLAG_HDR_TRANS , &wcid->flags);if (test_bit (MT_WCID_FLAG_4ADDR , &wcid->flags)) { hdr_trans->to_ds = true;
@@ -2154,6 +2154,9 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,if (!enable) goto out; +/* starec hdr trans */ +mt7996_mcu_sta_hdr_trans_tlv (dev, skb, vif, sta); +/* tag order is in accordance with firmware dependency. */ if (sta) {/* starec hdrt mode */
@@ -2178,8 +2181,6 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,mt7996_mcu_sta_muru_tlv (dev, skb, vif, sta);/* starec bfee */ mt7996_mcu_sta_bfee_tlv (dev, skb, vif, sta); -/* starec hdr trans */ -mt7996_mcu_sta_hdr_trans_tlv (dev, skb, vif, sta); } ret =mt7996_mcu_add_group (dev, vif, sta);
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 3/10 wifi: mt76: mt7996: set RCPI value in rate control command
In reply to Shayne ChenFrom: Peter Chiu <[email protected]>
Set RCPI values in mt7996_mcu_sta_rate_ctrl_tlv(), which can make the FW rate control algorithm be initialized with a better MCS selection table.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +3 -0
@@ -1968,6 +1968,7 @@ static void mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { +#define INIT_RCPI 180 struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;struct mt76_phy *mphy = mvif->phy->mt76;struct cfg80211_chan_def *chandef = &mphy->chandef;
@@ -2065,6 +2066,8 @@ mt7996_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7996_dev *dev, IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP); } ra->sta_cap =cpu_to_le32 (cap); + +memset (ra->rx_rcpi,INIT_RCPI ,sizeof (ra->rx_rcpi)); } int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev, struct ieee80211_vif *vif,
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 4/10 wifi: mt76: connac: enable HW CSO module for mt7996
In reply to Shayne ChenFrom: Howard Hsu <[email protected]>
For mt7996 chipsets, the HW CSO module can help to identify TCP traffic, which assists the firmware in adjusting algorithms to improve overall performance.
--- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +7 -0
@@ -610,6 +610,12 @@ struct sta_rec_ra_fixed {u8 mmps_mode; } __packed; +struct sta_rec_tx_proc { +__le16 tag; +__le16 len; +__le32 flag; +} __packed; +/* wtbl_rec */ struct wtbl_req_hdr {
@@ -777,6 +783,7 @@ struct wtbl_raw {sizeof (struct sta_rec_ra_fixed ) + \sizeof (struct sta_rec_he_6g_capa ) + \sizeof (struct sta_rec_pn_info ) + \ +sizeof (struct sta_rec_tx_proc ) + \sizeof (struct tlv ) + \ MT76_CONNAC_WTBL_UPDATE_MAX_SIZE)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +14 -0
@@ -1748,6 +1748,18 @@ mt7996_mcu_sta_bfee_tlv(struct mt7996_dev *dev, struct sk_buff *skb, bfee->fb_identity_matrix = (nrow ==1 && tx_ant ==2 ); } +static void +mt7996_mcu_sta_tx_proc_tlv (struct sk_buff *skb) +{ +struct sta_rec_tx_proc *tx_proc; +struct tlv *tlv; + + tlv =mt76_connac_mcu_add_tlv (skb,STA_REC_TX_PROC ,sizeof (*tx_proc)); + + tx_proc = (struct sta_rec_tx_proc *)tlv; + tx_proc->flag =cpu_to_le32 (0 ); +} +static void mt7996_mcu_sta_hdrt_tlv (struct mt7996_dev *dev,struct sk_buff *skb) {
@@ -2159,6 +2171,8 @@ int mt7996_mcu_add_sta(struct mt7996_dev *dev, struct ieee80211_vif *vif,/* starec hdr trans */ mt7996_mcu_sta_hdr_trans_tlv (dev, skb, vif, sta); +/* starec tx proc */ +mt7996_mcu_sta_tx_proc_tlv (skb);/* tag order is in accordance with firmware dependency. */ if (sta) {
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 5/10 wifi: mt76: mt7996: fix non-main BSS no beacon issue for MBSS scenario
In reply to Shayne ChenFrom: Henry Yen <[email protected]>
Do not add UNI_BSS_INFO_11V_MBSSID tag when bssid_indicator is not set to avoid abnormal beaconing behavior in non-11v MBSS scenario.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +4 -1
@@ -819,11 +819,14 @@ mt7996_mcu_bss_mbssid_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,struct bss_info_uni_mbssid *mbssid;struct tlv *tlv; +if (!vif->bss_conf.bssid_indicator) +return ; + tlv =mt7996_mcu_add_uni_tlv (skb,UNI_BSS_INFO_11V_MBSSID ,sizeof (*mbssid)); mbssid = (struct bss_info_uni_mbssid *)tlv; -if (enable && vif->bss_conf.bssid_indicator) { +if (enable) { mbssid->max_indicator = vif->bss_conf.bssid_indicator; mbssid->mbss_idx = vif->bss_conf.bssid_index; mbssid->tx_bss_omac_idx =0 ;
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 6/10 wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature
In reply to Shayne ChenFrom: Howard Hsu <[email protected]>
Without this commit, reading chip temperature will cause memory leakage.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +4 -1
@@ -3750,6 +3750,7 @@ int mt7996_mcu_get_temperature(struct mt7996_phy *phy) }__packed * res;struct sk_buff *skb;int ret; +u32 temp; ret =mt76_mcu_send_and_get_msg (&phy->dev->mt76,MCU_WM_UNI_CMD (THERMAL ), &req,sizeof (req), true, &skb);
@@ -3757,8 +3758,10 @@ int mt7996_mcu_get_temperature(struct mt7996_phy *phy)return ret; res = (void *)skb->data; + temp =le32_to_cpu (res->temperature); +dev_kfree_skb (skb); -return le32_to_cpu (res->temperature); +return temp; }int mt7996_mcu_set_thermal_throttling (struct mt7996_phy *phy,u8 state)
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 7/10 wifi: mt76: connac: enable critical packet mode support for mt7992
In reply to Shayne ChenFrom: Howard Hsu <[email protected]>
For mt7992 chipsets, critical packet mode should be properly configured to let the HW SDO module correctly fill the AC queue in TX descriptors of some higher priority packets such as ARP and ICMP.
Without this patch, HW queues may hang when running MU traffic.
--- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 ++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 13 +++++++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 + 4 files changed, 23 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +1 -0
@@ -1220,6 +1220,7 @@ enum {MCU_EXT_CMD_TXDPD_CAL =0x60 ,MCU_EXT_CMD_CAL_CACHE =0x67 ,MCU_EXT_CMD_RED_ENABLE =0x68 , +MCU_EXT_CMD_CP_SUPPORT =0x75 ,MCU_EXT_CMD_SET_RADAR_TH =0x7c ,MCU_EXT_CMD_SET_RDD_PATTERN =0x7d , MCU_EXT_CMD_MWDS_SUPPORT = 0x80,
drivers/net/wireless/mediatek/mt76/mt7996/main.c +8 -0
@@ -35,6 +35,14 @@ int mt7996_run(struct ieee80211_hw *hw) ret =mt7996_mcu_set_hdr_trans (dev, true);if (ret) goto out; + +if (is_mt7992 (&dev->mt76)) { +u8 queue =mt76_connac_lmac_mapping (IEEE80211_AC_VI ); + + ret =mt7996_mcu_cp_support (dev, queue); +if (ret) + goto out; + } }mt7996_mac_enable_nf (dev, phy->mt76->band_idx);
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +13 -0
@@ -4530,3 +4530,16 @@ int mt7996_mcu_set_txpower_sku(struct mt7996_phy *phy)return mt76_mcu_skb_send_msg (&dev->mt76, skb,MCU_WM_UNI_CMD (TXPOWER ), true); } + +int mt7996_mcu_cp_support (struct mt7996_dev *dev,u8 mode) +{ +__le32 cp_mode; + +if (mode <mt76_connac_lmac_mapping (IEEE80211_AC_BE ) || + mode >mt76_connac_lmac_mapping (IEEE80211_AC_VO )) +return -EINVAL ; + + cp_mode =cpu_to_le32 (mode); +return mt76_mcu_send_msg (&dev->mt76,MCU_WA_EXT_CMD (CP_SUPPORT ), + &cp_mode,sizeof (cp_mode), true); +}
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +1 -0
@@ -612,6 +612,7 @@ int mt7996_mcu_bcn_prot_enable(struct mt7996_dev *dev, struct ieee80211_vif *vifint mt7996_mcu_wtbl_update_hdr_trans (struct mt7996_dev *dev,struct ieee80211_vif *vif,struct ieee80211_sta *sta); +int mt7996_mcu_cp_support (struct mt7996_dev *dev,u8 mode);#ifdef CONFIG_MAC80211_DEBUGFS void mt7996_sta_add_debugfs (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta,struct dentry *dir);
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 8/10 wifi: mt76: mt7996: add sanity checks for background radar trigger
In reply to Shayne ChenFrom: StanleyYP Wang <[email protected]>
Check if background radar is enabled or not before manually triggering it, and also add more checks in radar detected event.
--- drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c | 5 +++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c +5 -0
@@ -225,6 +225,11 @@ mt7996_radar_trigger(void *data, u64 val)if (val >MT_RX_SEL2 )return -EINVAL ; +if (val ==MT_RX_SEL2 && !dev->rdd2_phy) { +dev_err (dev->mt76.dev,"Background radar is not enabled\n" ); +return -EINVAL ; + } +return mt7996_mcu_rdd_cmd (dev,RDD_RADAR_EMULATE , val,0 ,0 ); }
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +4 -1
@@ -355,7 +355,10 @@ mt7996_mcu_rx_radar_detected(struct mt7996_dev *dev, struct sk_buff *skb)if (r->band_idx >=ARRAY_SIZE (dev->mt76.phys))return ; -if (dev->rdd2_phy && r->band_idx ==MT_RX_SEL2 ) +if (r->band_idx ==MT_RX_SEL2 && !dev->rdd2_phy) +return ; + +if (r->band_idx ==MT_RX_SEL2 ) mphy = dev->rdd2_phy->mt76;else mphy = dev->mt76.phys[r->band_idx];
Signature · 1 line
2.39.2
Shayne Chen
reviewerPATCH 9/10 wifi: mt76: mt7996: let upper layer handle MGMT frame protection
In reply to Shayne ChenFrom: Michael-CY Lee <[email protected]>
The firmware support for management frame protection has limitations:
- do not support cipher BIP-GMAC-128 and BIP-GMAC-256
- support cipher BIP-CMAC-128 and BIP-CMAC-256, except action frame with action type 'not robust'.
Therefore, to simplify the logic, do not set the IGTK to firmware and let the encryption of management frames be handled by upper layer.
--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +4 -4
@@ -352,10 +352,6 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,/* fall back to sw encryption for unsupported ciphers */ switch (key->cipher) { -case WLAN_CIPHER_SUITE_AES_CMAC : - wcid_keyidx = &wcid->hw_key_idx2; - key->flags |=IEEE80211_KEY_FLAG_GENERATE_MMIE ; -break ;case WLAN_CIPHER_SUITE_TKIP :case WLAN_CIPHER_SUITE_CCMP :case WLAN_CIPHER_SUITE_CCMP_256 :
@@ -363,6 +359,10 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,case WLAN_CIPHER_SUITE_GCMP_256 :case WLAN_CIPHER_SUITE_SMS4 :break ; +case WLAN_CIPHER_SUITE_AES_CMAC : + key->flags |=IEEE80211_KEY_FLAG_GENERATE_MMIE ; + fallthrough; +case WLAN_CIPHER_SUITE_BIP_CMAC_256 :case WLAN_CIPHER_SUITE_BIP_GMAC_128 :case WLAN_CIPHER_SUITE_BIP_GMAC_256 :if (key->keyidx ==6 || key->keyidx ==7 )
Signature · 1 line
2.39.2
Felix Fietkau
maintainerRe: [PATCH 09/10] wifi: mt76: mt7996: let upper layer handle MGMT frame protection
Quoted 21 lines · Shayne Chen
From: Michael-CY Lee <[email protected]>
The firmware support for management frame protection has limitations:
- do not support cipher BIP-GMAC-128 and BIP-GMAC-256
- support cipher BIP-CMAC-128 and BIP-CMAC-256, except action frame with action type 'not robust'.Therefore, to simplify the logic, do not set the IGTK to firmware and let the encryption of management frames be handled by upper layer.
Signed-off-by Michael-CY Lee <[email protected]>Signed-off-by Shayne Chen <[email protected]>--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/wireless/mediatek/mt76/mt7996/main.c +0
-0
drivers/net/wireless/mediatek/mt76/mt7996/main.c static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, · line 356
Quoted 5 lines
drivers/net/wireless/mediatek/mt76/mt7996/main.c +0
-2@@ -352,10 +352,6 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,/* fall back to sw encryption for unsupported ciphers */ switch (key->cipher) { -case WLAN_CIPHER_SUITE_AES_CMAC : - wcid_keyidx = &wcid->hw_key_idx2;
Did you intend to drop the wcid_keyidx line? If so, I don't see anything related to that in the patch description.
- Felix
Shayne Chen (陳軒丞)
reviewerRe: [PATCH 09/10] wifi: mt76: mt7996: let upper layer handle MGMT frame protection
Quoted 31 lines · Felix Fietkau
External email : Please do not click links or open attachments until you have verified the sender or the content.
Quoted 3 lines · Shayne Chen
From: Michael-CY Lee <[email protected]>
The firmware support for management frame protection has
limitations:
Quoted 2 lines
- do not support cipher BIP-GMAC-128 and BIP-GMAC-256
- support cipher BIP-CMAC-128 and BIP-CMAC-256, except action framewith
Quoted 3 lines
action type 'not robust'.
Therefore, to simplify the logic, do not set the IGTK to firmware
and
Review
Quoted 9 lines
let the encryption of management frames be handled by upper layer.
Signed-off-by Michael-CY Lee <[email protected]>Signed-off-by Shayne Chen <[email protected]>--- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/drivers/net/wireless/mediatek/mt76/mt7996/main.cdrivers/net/wireless/mediatek/mt76/mt7996/main.c static int mt7996_set_key(struct ieee80211_hw
Quoted 4 lines
index
338ff10b121d..4ab4d2bcbedc100644drivers/net/wireless/mediatek/mt76/mt7996/main.c +0
-0@@ -352,10 +352,6 @@ static int mt7996_set_key(struct ieee80211_hw*hw, enum
set_key_cmdcmd,Quoted 1 line
Quoted 9 lines
drivers/net/wireless/mediatek/mt76/mt7996/main.c static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, · line 356
Quoted 4 lines
/* fall back to sw encryption for unsupported ciphers */ switch (
key->cipher) {drivers/net/wireless/mediatek/mt76/mt7996/main.c +0
-2-case WLAN_CIPHER_SUITE_AES_CMAC : -wcid_keyidx = &wcid->hw_key_idx2;Did you intend to drop the
wcid_keyidxline? If so, I don't see anything
related to that in the patch description.
Hi Felix,
I missed that line, will send v2 to fix it.
Thanks,
Shayne
Quoted 1 line
- Felix
Shayne Chen
reviewerPATCH 10/10 wifi: mt76: mt7996: add sanity check for NAPI schedule
In reply to Shayne ChenFrom: Henry Yen <[email protected]>
It's observed that host driver might occasionally receive interrupts from unexpected Rx ring, whose Rx NAPI hasn't been prepared yet. Under such situation, __napi_poll crash issue would occur, so we add a sanity check to prevent it.
Without this patch, we might encounter kernel crash issue especially in WED-on & RRO-on software path.
--- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +1 -1
@@ -560,7 +560,7 @@ static void mt7996_irq_tasklet(struct tasklet_struct *t)napi_schedule (&dev->mt76.tx_napi);for (i =0 ; i < __MT_RXQ_MAX; i++) { -if ((intr &MT_INT_RX (i))) +if ((intr &MT_INT_RX (i)) && dev->mt76.napi[i].poll)napi_schedule (&dev->mt76.napi[i]); }
Signature · 1 line
2.39.2
Felix Fietkau
maintainerRe: [PATCH 10/10] wifi: mt76: mt7996: add sanity check for NAPI schedule
Quoted 9 lines · Shayne Chen
From: Henry Yen <[email protected]>
It's observed that host driver might occasionally receive interrupts from unexpected Rx ring, whose Rx NAPI hasn't been prepared yet. Under such situation,
__napi_pollcrash issue would occur, so we add a sanity check to prevent it.Without this patch, we might encounter kernel crash issue especially in WED-on & RRO-on software path.
Does this issue occur even with Lorenzo's fix "wifi: mt76: mt7996: fix uninitialized variable in mt7996_irq_tasklet()"?
- Felix
Shayne Chen (陳軒丞)
reviewerRe: [PATCH 10/10] wifi: mt76: mt7996: add sanity check for NAPI schedule
Quoted 11 lines · Felix Fietkau
External email : Please do not click links or open attachments until you have verified the sender or the content.
Quoted 7 lines · Shayne Chen
From: Henry Yen <[email protected]>
It's observed that host driver might occasionally receive interrupts from unexpected Rx ring, whose Rx NAPI hasn't been prepared yet. Under such situation,
__napi_pollcrash issue would occur, so we add a sanity check to prevent it.
Quoted 7 lines
Quoted 2 lines
Without this patch, we might encounter kernel crash issue especially in WED-on & RRO-on software path.
Does this issue occur even with Lorenzo's fix "wifi: mt76: mt7996:
fix
uninitialized variable inmt7996_irq_tasklet()"?
They achieve the same purpose, please drop this patch.
Thanks,
Shayne
Quoted 1 line
- Felix