developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 1 | From c5df80abbbbcfe8b3845a03ca48fc7745ba0d972 Mon Sep 17 00:00:00 2001 |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Mon, 23 Oct 2023 10:25:25 +0800 |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 4 | Subject: [PATCH 73/76] Revert "wifi: mt76: move struct ieee80211_chanctx_conf |
| 5 | up to struct mt76_vif" |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 6 | |
| 7 | This 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 | |
| 15 | diff --git a/mt76.h b/mt76.h |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 16 | index d082b24..699d84e 100644 |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 17 | --- a/mt76.h |
| 18 | +++ b/mt76.h |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 19 | @@ -836,7 +836,6 @@ struct mt76_vif { |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 { |
| 27 | diff --git a/mt7921/main.c b/mt7921/main.c |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 28 | index aa0cd78..ffcad1e 100644 |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 29 | --- a/mt7921/main.c |
| 30 | +++ b/mt7921/main.c |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 31 | @@ -801,7 +801,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 | |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 40 | @@ -836,7 +836,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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); |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 49 | @@ -1255,7 +1255,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 | |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 58 | @@ -1287,7 +1287,7 @@ mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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); |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 67 | @@ -1312,7 +1312,7 @@ static void mt7921_ctx_iter(void *priv, u8 *mac, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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) |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 76 | @@ -1345,7 +1345,7 @@ static void mt7921_mgd_prepare_tx(struct ieee80211_hw *hw, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 | } |
| 85 | diff --git a/mt792x.h b/mt792x.h |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 86 | index 3c897b3..558753f 100644 |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 87 | --- a/mt792x.h |
| 88 | +++ b/mt792x.h |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 89 | @@ -106,6 +106,7 @@ struct mt792x_vif { |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 { |
| 97 | diff --git a/mt792x_core.c b/mt792x_core.c |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 98 | index 502be22..1228a8a 100644 |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 99 | --- a/mt792x_core.c |
| 100 | +++ b/mt792x_core.c |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 101 | @@ -265,7 +265,7 @@ int mt792x_assign_vif_chanctx(struct ieee80211_hw *hw, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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; |
developer | ade48b1 | 2023-12-12 10:37:24 +0800 | [diff] [blame] | 110 | @@ -281,7 +281,7 @@ void mt792x_unassign_vif_chanctx(struct ieee80211_hw *hw, |
developer | c83f1ac | 2023-10-23 10:30:11 +0800 | [diff] [blame] | 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 | -- |
| 120 | 2.18.0 |
| 121 | |