mt76: mt7921: not support beacon offload disable command
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 mt76: mt7921: not support beacon offload disable command
From: Deren Wu <[email protected]>
Beacon disable flow would be handled in bss stop handler automatically. Force return -EOPNOTSUPP in disable case.
--- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +4 -2
@@ -1255,8 +1255,11 @@ mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev, };struct sk_buff *skb; +/* support enable/update process only +* disable flow would be handled in bss stop handler automatically +*/ if (!enable) - goto out; +return -EOPNOTSUPP ; skb =ieee80211_beacon_get_template (mt76_hw (dev), vif, &offs);if (!skb)
@@ -1282,7 +1285,6 @@ mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev, }dev_kfree_skb (skb); -out:return mt76_mcu_send_msg (&dev->mt76,MCU_UNI_CMD (BSS_INFO_UPDATE ), &req,sizeof (req), true); }
Signature · 1 line
2.18.0
PATCH 2/2 mt76: mt7921: fix command timeout in AP stop period
In reply to a message not in the archiveFrom: Deren Wu <[email protected]>
Due to AP stop improperly, mt7921 driver would face random command timeout by chip fw problem. Migrate AP start/stop process to .start_ap/.stop_ap and congiure BSS network settings in both hooks.
The new flow is shown below.
* AP start
.start_ap()
configure BSS network resource
set BSS to connected state
.bss_info_changed()
enable fw beacon offload
* AP stop
.bss_info_changed()
disable fw beacon offload (skip this command)
.stop_ap()
set BSS to disconnected state (beacon offload disabled automatically) destroy BSS network resource
--- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 2 + .../net/wireless/mediatek/mt76/mt7921/main.c | 49 +++++++++++++++---- .../net/wireless/mediatek/mt76/mt7921/mcu.c | 5 +- .../wireless/mediatek/mt76/mt7921/mt7921.h | 2 + 4 files changed, 45 insertions(+), 13 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +2 -0
@@ -1403,6 +1403,8 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,else conn_type =CONNECTION_INFRA_AP ; basic_req.basic.conn_type =cpu_to_le32 (conn_type); +/* Fully active/deactivate BSS network in AP mode only */ + basic_req.basic.active = enable;break ;case NL80211_IFTYPE_STATION :if (vif->p2p)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +40 -9
67 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +1 -4
@@ -1019,7 +1019,7 @@ mt7921_mcu_uni_bss_bcnft(struct mt7921_dev *dev, struct ieee80211_vif *vif, &bcnft_req, sizeof(bcnft_req), true); } -static int +int mt7921_mcu_set_bss_pm (struct mt7921_dev *dev,struct ieee80211_vif *vif,bool enable) {
@@ -1048,9 +1048,6 @@ mt7921_mcu_set_bss_pm(struct mt7921_dev *dev, struct ieee80211_vif *vif, };int err; -if (vif->type !=NL80211_IFTYPE_STATION ) -return 0 ; - err =mt76_mcu_send_msg (&dev->mt76,MCU_CE_CMD (SET_BSS_ABORT ), &req_hdr,sizeof (req_hdr), false);if (err <0 || !enable)
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h +2 -0
@@ -291,6 +291,8 @@ int mt7921_wpdma_reset(struct mt7921_dev *dev, bool force);int mt7921_wpdma_reinit_cond (struct mt7921_dev *dev);void mt7921_dma_cleanup (struct mt7921_dev *dev);int mt7921_run_firmware (struct mt7921_dev *dev); +int mt7921_mcu_set_bss_pm (struct mt7921_dev *dev,struct ieee80211_vif *vif, +bool enable);int mt7921_mcu_sta_update (struct mt7921_dev *dev,struct ieee80211_sta *sta,struct ieee80211_vif *vif,bool enable,enum mt76_sta_info_state state);
Signature · 1 line
2.18.0