blob: 474ef7bba2993f3fafeaae7446c0881e1cd9a6ca [file] [log] [blame]
developerade48b12023-12-12 10:37:24 +08001From c5df80abbbbcfe8b3845a03ca48fc7745ba0d972 Mon Sep 17 00:00:00 2001
developerc83f1ac2023-10-23 10:30:11 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 23 Oct 2023 10:25:25 +0800
developerade48b12023-12-12 10:37:24 +08004Subject: [PATCH 73/76] Revert "wifi: mt76: move struct ieee80211_chanctx_conf
5 up to struct mt76_vif"
developerc83f1ac2023-10-23 10:30:11 +08006
7This reverts commit d1881b1b2bf6018d1cb1b91e4301a60021cacaa3.
8---
9 mt76.h | 1 -
10 mt7921/main.c | 12 ++++++------
11 mt792x.h | 1 +
12 mt792x_core.c | 4 ++--
13 4 files changed, 9 insertions(+), 9 deletions(-)
14
15diff --git a/mt76.h b/mt76.h
developerade48b12023-12-12 10:37:24 +080016index d082b24..699d84e 100644
developerc83f1ac2023-10-23 10:30:11 +080017--- a/mt76.h
18+++ b/mt76.h
developerade48b12023-12-12 10:37:24 +080019@@ -836,7 +836,6 @@ struct mt76_vif {
developerc83f1ac2023-10-23 10:30:11 +080020 u8 basic_rates_idx;
21 u8 mcast_rates_idx;
22 u8 beacon_rates_idx;
23- struct ieee80211_chanctx_conf *ctx;
24 };
25
26 struct mt76_phy {
27diff --git a/mt7921/main.c b/mt7921/main.c
developerade48b12023-12-12 10:37:24 +080028index aa0cd78..ffcad1e 100644
developerc83f1ac2023-10-23 10:30:11 +080029--- a/mt7921/main.c
30+++ b/mt7921/main.c
developerade48b12023-12-12 10:37:24 +080031@@ -801,7 +801,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
developerc83f1ac2023-10-23 10:30:11 +080032
33 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
34 mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid,
35- true, mvif->mt76.ctx);
36+ true, mvif->ctx);
37
38 ewma_avg_signal_init(&msta->avg_ack_signal);
39
developerade48b12023-12-12 10:37:24 +080040@@ -836,7 +836,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
developerc83f1ac2023-10-23 10:30:11 +080041 if (!sta->tdls)
42 mt76_connac_mcu_uni_add_bss(&dev->mphy, vif,
43 &mvif->sta.wcid, false,
44- mvif->mt76.ctx);
45+ mvif->ctx);
46 }
47
48 spin_lock_bh(&dev->mt76.sta_poll_lock);
developerade48b12023-12-12 10:37:24 +080049@@ -1255,7 +1255,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developerc83f1ac2023-10-23 10:30:11 +080050 mt792x_mutex_acquire(dev);
51
52 err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid,
53- true, mvif->mt76.ctx);
54+ true, mvif->ctx);
55 if (err)
56 goto out;
57
developerade48b12023-12-12 10:37:24 +080058@@ -1287,7 +1287,7 @@ mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
developerc83f1ac2023-10-23 10:30:11 +080059 goto out;
60
61 mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false,
62- mvif->mt76.ctx);
63+ mvif->ctx);
64
65 out:
66 mt792x_mutex_release(dev);
developerade48b12023-12-12 10:37:24 +080067@@ -1312,7 +1312,7 @@ static void mt7921_ctx_iter(void *priv, u8 *mac,
developerc83f1ac2023-10-23 10:30:11 +080068 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
69 struct ieee80211_chanctx_conf *ctx = priv;
70
71- if (ctx != mvif->mt76.ctx)
72+ if (ctx != mvif->ctx)
73 return;
74
75 if (vif->type == NL80211_IFTYPE_MONITOR)
developerade48b12023-12-12 10:37:24 +080076@@ -1345,7 +1345,7 @@ static void mt7921_mgd_prepare_tx(struct ieee80211_hw *hw,
developerc83f1ac2023-10-23 10:30:11 +080077 jiffies_to_msecs(HZ);
78
79 mt792x_mutex_acquire(dev);
80- mt7921_set_roc(mvif->phy, mvif, mvif->mt76.ctx->def.chan, duration,
81+ mt7921_set_roc(mvif->phy, mvif, mvif->ctx->def.chan, duration,
82 MT7921_ROC_REQ_JOIN);
83 mt792x_mutex_release(dev);
84 }
85diff --git a/mt792x.h b/mt792x.h
developerade48b12023-12-12 10:37:24 +080086index 3c897b3..558753f 100644
developerc83f1ac2023-10-23 10:30:11 +080087--- a/mt792x.h
88+++ b/mt792x.h
developerade48b12023-12-12 10:37:24 +080089@@ -106,6 +106,7 @@ struct mt792x_vif {
developerc83f1ac2023-10-23 10:30:11 +080090 struct ewma_rssi rssi;
91
92 struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS];
93+ struct ieee80211_chanctx_conf *ctx;
94 };
95
96 struct mt792x_phy {
97diff --git a/mt792x_core.c b/mt792x_core.c
developerade48b12023-12-12 10:37:24 +080098index 502be22..1228a8a 100644
developerc83f1ac2023-10-23 10:30:11 +080099--- a/mt792x_core.c
100+++ b/mt792x_core.c
developerade48b12023-12-12 10:37:24 +0800101@@ -265,7 +265,7 @@ int mt792x_assign_vif_chanctx(struct ieee80211_hw *hw,
developerc83f1ac2023-10-23 10:30:11 +0800102 struct mt792x_dev *dev = mt792x_hw_dev(hw);
103
104 mutex_lock(&dev->mt76.mutex);
105- mvif->mt76.ctx = ctx;
106+ mvif->ctx = ctx;
107 mutex_unlock(&dev->mt76.mutex);
108
109 return 0;
developerade48b12023-12-12 10:37:24 +0800110@@ -281,7 +281,7 @@ void mt792x_unassign_vif_chanctx(struct ieee80211_hw *hw,
developerc83f1ac2023-10-23 10:30:11 +0800111 struct mt792x_dev *dev = mt792x_hw_dev(hw);
112
113 mutex_lock(&dev->mt76.mutex);
114- mvif->mt76.ctx = NULL;
115+ mvif->ctx = NULL;
116 mutex_unlock(&dev->mt76.mutex);
117 }
118 EXPORT_SYMBOL_GPL(mt792x_unassign_vif_chanctx);
119--
1202.18.0
121