Skip to content

Commit 88b67e9

Browse files
committed
wifi: mac80211: call rate_control_rate_update() for link STA
In order to update the right link information, call the update rate_control_rate_update() with the right link_sta, and then pass that through to the driver's sta_rc_update() method. The software rate control still doesn't support it, but that'll be skipped by not having a rate control ref. Since it now operates on a link sta, rename the driver method. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241007144851.5851b6b5fd41.Ibdf50d96afa4b761dd9b9dfd54a1147e77a75329@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent f828deb commit 88b67e9

File tree

25 files changed

+80
-62
lines changed

25 files changed

+80
-62
lines changed

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8507,9 +8507,10 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
85078507

85088508
static void ath10k_sta_rc_update(struct ieee80211_hw *hw,
85098509
struct ieee80211_vif *vif,
8510-
struct ieee80211_sta *sta,
8510+
struct ieee80211_link_sta *link_sta,
85118511
u32 changed)
85128512
{
8513+
struct ieee80211_sta *sta = link_sta->sta;
85138514
struct ath10k *ar = hw->priv;
85148515
struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
85158516
struct ath10k_vif *arvif = (void *)vif->drv_priv;
@@ -9450,7 +9451,7 @@ static const struct ieee80211_ops ath10k_ops = {
94509451
.reconfig_complete = ath10k_reconfig_complete,
94519452
.get_survey = ath10k_get_survey,
94529453
.set_bitrate_mask = ath10k_mac_op_set_bitrate_mask,
9453-
.sta_rc_update = ath10k_sta_rc_update,
9454+
.link_sta_rc_update = ath10k_sta_rc_update,
94549455
.offset_tsf = ath10k_offset_tsf,
94559456
.ampdu_action = ath10k_ampdu_action,
94569457
.get_et_sset_count = ath10k_debug_get_et_sset_count,

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5079,9 +5079,10 @@ static void ath11k_mac_op_sta_set_4addr(struct ieee80211_hw *hw,
50795079

50805080
static void ath11k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
50815081
struct ieee80211_vif *vif,
5082-
struct ieee80211_sta *sta,
5082+
struct ieee80211_link_sta *link_sta,
50835083
u32 changed)
50845084
{
5085+
struct ieee80211_sta *sta = link_sta->sta;
50855086
struct ath11k *ar = hw->priv;
50865087
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
50875088
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
@@ -9708,7 +9709,7 @@ static const struct ieee80211_ops ath11k_ops = {
97089709
.sta_state = ath11k_mac_op_sta_state,
97099710
.sta_set_4addr = ath11k_mac_op_sta_set_4addr,
97109711
.sta_set_txpwr = ath11k_mac_op_sta_set_txpwr,
9711-
.sta_rc_update = ath11k_mac_op_sta_rc_update,
9712+
.link_sta_rc_update = ath11k_mac_op_sta_rc_update,
97129713
.conf_tx = ath11k_mac_op_conf_tx,
97139714
.set_antenna = ath11k_mac_op_set_antenna,
97149715
.get_antenna = ath11k_mac_op_get_antenna,

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4737,9 +4737,10 @@ static int ath12k_mac_op_sta_set_txpwr(struct ieee80211_hw *hw,
47374737

47384738
static void ath12k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
47394739
struct ieee80211_vif *vif,
4740-
struct ieee80211_sta *sta,
4740+
struct ieee80211_link_sta *link_sta,
47414741
u32 changed)
47424742
{
4743+
struct ieee80211_sta *sta = link_sta->sta;
47434744
struct ath12k *ar;
47444745
struct ath12k_sta *arsta = ath12k_sta_to_arsta(sta);
47454746
struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
@@ -8681,7 +8682,7 @@ static const struct ieee80211_ops ath12k_ops = {
86818682
.set_rekey_data = ath12k_mac_op_set_rekey_data,
86828683
.sta_state = ath12k_mac_op_sta_state,
86838684
.sta_set_txpwr = ath12k_mac_op_sta_set_txpwr,
8684-
.sta_rc_update = ath12k_mac_op_sta_rc_update,
8685+
.link_sta_rc_update = ath12k_mac_op_sta_rc_update,
86858686
.conf_tx = ath12k_mac_op_conf_tx,
86868687
.set_antenna = ath12k_mac_op_set_antenna,
86878688
.get_antenna = ath12k_mac_op_get_antenna,

drivers/net/wireless/ath/ath9k/htc_drv_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,8 +1357,10 @@ static int ath9k_htc_sta_remove(struct ieee80211_hw *hw,
13571357

13581358
static void ath9k_htc_sta_rc_update(struct ieee80211_hw *hw,
13591359
struct ieee80211_vif *vif,
1360-
struct ieee80211_sta *sta, u32 changed)
1360+
struct ieee80211_link_sta *link_sta,
1361+
u32 changed)
13611362
{
1363+
struct ieee80211_sta *sta = link_sta->sta;
13621364
struct ath9k_htc_sta *ista = (struct ath9k_htc_sta *) sta->drv_priv;
13631365

13641366
if (!(changed & IEEE80211_RC_SUPP_RATES_CHANGED))
@@ -1883,7 +1885,7 @@ struct ieee80211_ops ath9k_htc_ops = {
18831885
.sta_add = ath9k_htc_sta_add,
18841886
.sta_remove = ath9k_htc_sta_remove,
18851887
.conf_tx = ath9k_htc_conf_tx,
1886-
.sta_rc_update = ath9k_htc_sta_rc_update,
1888+
.link_sta_rc_update = ath9k_htc_sta_rc_update,
18871889
.bss_info_changed = ath9k_htc_bss_info_changed,
18881890
.set_key = ath9k_htc_set_key,
18891891
.get_tsf = ath9k_htc_get_tsf,

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,8 +4236,9 @@ int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
42364236
}
42374237

42384238
void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
4239-
struct ieee80211_sta *sta, u32 changed)
4239+
struct ieee80211_link_sta *link_sta, u32 changed)
42404240
{
4241+
struct ieee80211_sta *sta = link_sta->sta;
42414242
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
42424243

42434244
if (changed & (IEEE80211_RC_BW_CHANGED |
@@ -6562,7 +6563,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
65626563
.allow_buffered_frames = iwl_mvm_mac_allow_buffered_frames,
65636564
.release_buffered_frames = iwl_mvm_mac_release_buffered_frames,
65646565
.set_rts_threshold = iwl_mvm_mac_set_rts_threshold,
6565-
.sta_rc_update = iwl_mvm_sta_rc_update,
6566+
.link_sta_rc_update = iwl_mvm_sta_rc_update,
65666567
.conf_tx = iwl_mvm_mac_conf_tx,
65676568
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
65686569
.mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx,

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
14011401
.allow_buffered_frames = iwl_mvm_mac_allow_buffered_frames,
14021402
.release_buffered_frames = iwl_mvm_mac_release_buffered_frames,
14031403
.set_rts_threshold = iwl_mvm_mac_set_rts_threshold,
1404-
.sta_rc_update = iwl_mvm_sta_rc_update,
1404+
.link_sta_rc_update = iwl_mvm_sta_rc_update,
14051405
.conf_tx = iwl_mvm_mld_mac_conf_tx,
14061406
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
14071407
.mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx,

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,7 @@ iwl_mvm_mac_release_buffered_frames(struct ieee80211_hw *hw,
29142914
bool more_data);
29152915
int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
29162916
void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2917-
struct ieee80211_sta *sta, u32 changed);
2917+
struct ieee80211_link_sta *link_sta, u32 changed);
29182918
void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
29192919
struct ieee80211_vif *vif,
29202920
struct ieee80211_prep_tx_info *info);

drivers/net/wireless/mediatek/mt76/mt7915/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,10 @@ static void mt7915_sta_rc_work(void *data, struct ieee80211_sta *sta)
11631163

11641164
static void mt7915_sta_rc_update(struct ieee80211_hw *hw,
11651165
struct ieee80211_vif *vif,
1166-
struct ieee80211_sta *sta,
1166+
struct ieee80211_link_sta *link_sta,
11671167
u32 changed)
11681168
{
1169+
struct ieee80211_sta *sta = link_sta->sta;
11691170
struct mt7915_phy *phy = mt7915_hw_phy(hw);
11701171
struct mt7915_dev *dev = phy->dev;
11711172
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
@@ -1709,7 +1710,7 @@ const struct ieee80211_ops mt7915_ops = {
17091710
.stop_ap = mt7915_stop_ap,
17101711
.sta_state = mt76_sta_state,
17111712
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
1712-
.sta_rc_update = mt7915_sta_rc_update,
1713+
.link_sta_rc_update = mt7915_sta_rc_update,
17131714
.set_key = mt7915_set_key,
17141715
.ampdu_action = mt7915_ampdu_action,
17151716
.set_rts_threshold = mt7915_set_rts_threshold,

drivers/net/wireless/mediatek/mt76/mt7996/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,10 @@ static void mt7996_sta_rc_work(void *data, struct ieee80211_sta *sta)
10601060

10611061
static void mt7996_sta_rc_update(struct ieee80211_hw *hw,
10621062
struct ieee80211_vif *vif,
1063-
struct ieee80211_sta *sta,
1063+
struct ieee80211_link_sta *link_sta,
10641064
u32 changed)
10651065
{
1066+
struct ieee80211_sta *sta = link_sta->sta;
10661067
struct mt7996_phy *phy = mt7996_hw_phy(hw);
10671068
struct mt7996_dev *dev = phy->dev;
10681069

@@ -1472,7 +1473,7 @@ const struct ieee80211_ops mt7996_ops = {
14721473
.sta_add = mt7996_sta_add,
14731474
.sta_remove = mt7996_sta_remove,
14741475
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
1475-
.sta_rc_update = mt7996_sta_rc_update,
1476+
.link_sta_rc_update = mt7996_sta_rc_update,
14761477
.set_key = mt7996_set_key,
14771478
.ampdu_action = mt7996_ampdu_action,
14781479
.set_rts_threshold = mt7996_set_rts_threshold,

drivers/net/wireless/realtek/rtw88/mac80211.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,10 @@ static int rtw_ops_set_sar_specs(struct ieee80211_hw *hw,
928928

929929
static void rtw_ops_sta_rc_update(struct ieee80211_hw *hw,
930930
struct ieee80211_vif *vif,
931-
struct ieee80211_sta *sta, u32 changed)
931+
struct ieee80211_link_sta *link_sta,
932+
u32 changed)
932933
{
934+
struct ieee80211_sta *sta = link_sta->sta;
933935
struct rtw_dev *rtwdev = hw->priv;
934936
struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv;
935937

@@ -973,7 +975,7 @@ const struct ieee80211_ops rtw_ops = {
973975
.reconfig_complete = rtw_reconfig_complete,
974976
.hw_scan = rtw_ops_hw_scan,
975977
.cancel_hw_scan = rtw_ops_cancel_hw_scan,
976-
.sta_rc_update = rtw_ops_sta_rc_update,
978+
.link_sta_rc_update = rtw_ops_sta_rc_update,
977979
.set_sar_specs = rtw_ops_set_sar_specs,
978980
#ifdef CONFIG_PM
979981
.suspend = rtw_ops_suspend,

0 commit comments

Comments
 (0)