blob: db3e36cf3caea410431c877e92b2274445e4ae68 [file] [log] [blame]
developer8928e842023-11-01 08:10:30 +08001From 7ff6353fd667964cc3e814dce1d79859e07fbdf4 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
developer8928e842023-11-01 08:10:30 +08004Subject: [PATCH 4/6] Revert "wifi: mt76: move struct ieee80211_chanctx_conf up
5 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
developer8928e842023-11-01 08:10:30 +080016index 05144b2..3ff348f 100644
developerc83f1ac2023-10-23 10:30:11 +080017--- a/mt76.h
18+++ b/mt76.h
19@@ -798,7 +798,6 @@ struct mt76_vif {
20 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
developer8928e842023-11-01 08:10:30 +080028index 6a5c2ca..28c7e04 100644
developerc83f1ac2023-10-23 10:30:11 +080029--- a/mt7921/main.c
30+++ b/mt7921/main.c
31@@ -756,7 +756,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
32
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
40@@ -791,7 +791,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
41 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);
49@@ -1208,7 +1208,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
50 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
58@@ -1240,7 +1240,7 @@ mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
59 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);
67@@ -1265,7 +1265,7 @@ static void mt7921_ctx_iter(void *priv, u8 *mac,
68 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)
76@@ -1298,7 +1298,7 @@ static void mt7921_mgd_prepare_tx(struct ieee80211_hw *hw,
77 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
developer8928e842023-11-01 08:10:30 +080086index 548e89f..39cbd13 100644
developerc83f1ac2023-10-23 10:30:11 +080087--- a/mt792x.h
88+++ b/mt792x.h
89@@ -93,6 +93,7 @@ struct mt792x_vif {
90 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
developer8928e842023-11-01 08:10:30 +080098index 7c4a74f..8c97ac0 100644
developerc83f1ac2023-10-23 10:30:11 +080099--- a/mt792x_core.c
100+++ b/mt792x_core.c
101@@ -243,7 +243,7 @@ int mt792x_assign_vif_chanctx(struct ieee80211_hw *hw,
102 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;
110@@ -259,7 +259,7 @@ void mt792x_unassign_vif_chanctx(struct ieee80211_hw *hw,
111 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