linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] wifi: mt76: mt7996: move radio ctrl commands to proper functions
@ 2023-06-02 15:20 Shayne Chen
  2023-06-02 15:20 ` [PATCH 02/12] wifi: mt76: connac: add a setting bit for dsp firmware Shayne Chen
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Shayne Chen @ 2023-06-02 15:20 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: linux-wireless, Lorenzo Bianconi, Ryder Lee, Evelyn Tsai,
	Bo Jiao, linux-mediatek, Shayne Chen

Move radio enable/disable commands into functions for configuring
per-phy radio.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7996/main.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 0975774fe244..8a1edc5c1288 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -43,6 +43,10 @@ int mt7996_run(struct ieee80211_hw *hw)
 	if (ret)
 		goto out;
 
+	ret = mt7996_mcu_set_radio_en(phy, true);
+	if (ret)
+		goto out;
+
 	ret = mt7996_mcu_set_chan_info(phy, UNI_CHANNEL_RX_PATH);
 	if (ret)
 		goto out;
@@ -82,6 +86,8 @@ static void mt7996_stop(struct ieee80211_hw *hw)
 
 	mutex_lock(&dev->mt76.mutex);
 
+	mt7996_mcu_set_radio_en(phy, false);
+
 	clear_bit(MT76_STATE_RUNNING, &phy->mt76->state);
 
 	mutex_unlock(&dev->mt76.mutex);
@@ -190,10 +196,6 @@ static int mt7996_add_interface(struct ieee80211_hw *hw,
 	if (ret)
 		goto out;
 
-	ret = mt7996_mcu_set_radio_en(phy, true);
-	if (ret)
-		goto out;
-
 	dev->mt76.vif_mask |= BIT_ULL(mvif->mt76.idx);
 	phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
 
@@ -253,7 +255,6 @@ static void mt7996_remove_interface(struct ieee80211_hw *hw,
 		phy->monitor_vif = NULL;
 
 	mt7996_mcu_add_dev_info(phy, vif, false);
-	mt7996_mcu_set_radio_en(phy, false);
 
 	rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
 
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-06-07 14:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 15:20 [PATCH 01/12] wifi: mt76: mt7996: move radio ctrl commands to proper functions Shayne Chen
2023-06-02 15:20 ` [PATCH 02/12] wifi: mt76: connac: add a setting bit for dsp firmware Shayne Chen
2023-06-02 17:55   ` Lorenzo Bianconi
2023-06-02 15:20 ` [PATCH 03/12] wifi: mt76: mt7996: add dsp firmware download Shayne Chen
2023-06-02 17:56   ` Lorenzo Bianconi
2023-06-07 14:16     ` Kalle Valo
2023-06-02 15:21 ` [PATCH 04/12] wifi: mt76: mt7996: fix bss wlan_idx when sending bss_info command Shayne Chen
2023-06-02 15:21 ` [PATCH 05/12] wifi: mt76: mt7996: init he and eht cap for AP_VLAN Shayne Chen
2023-06-02 15:21 ` [PATCH 06/12] wifi: mt76: mt7996: enable VHT extended NSS BW feature Shayne Chen
2023-06-02 15:21 ` [PATCH 07/12] wifi: mt76: connac: add a new bss_info tag for setting ifs time Shayne Chen
2023-06-02 17:57   ` Lorenzo Bianconi
2023-06-02 15:21 ` [PATCH 08/12] wifi: mt76: mt7996: set ifs time by mcu command Shayne Chen
2023-06-02 18:12   ` Lorenzo Bianconi
2023-06-02 15:21 ` [PATCH 09/12] wifi: mt76: mt7996: use correct phy for background radar event Shayne Chen
2023-06-02 15:21 ` [PATCH 10/12] wifi: mt76: mt7996: fix WA event ring size Shayne Chen
2023-06-02 15:21 ` [PATCH 11/12] wifi: mt76: mt7996: add muru support Shayne Chen
2023-06-02 15:21 ` [PATCH 12/12] wifi: mt76: mt7996: increase tx token size Shayne Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).