Skip to content

Commit 8c21437

Browse files
committed
wifi: ath12k: ath12k_mac_op_sta_rc_update(): use mac80211 provided link id
There's a todo comment to use mac80211 provided link id. As mac80211 now provides it use it in ath12k and remove the comment. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent ad969bc commit 8c21437

File tree

1 file changed

+9
-13
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+9
-13
lines changed

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5696,10 +5696,10 @@ static int ath12k_mac_op_sta_set_txpwr(struct ieee80211_hw *hw,
56965696
return ret;
56975697
}
56985698

5699-
static void ath12k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
5700-
struct ieee80211_vif *vif,
5701-
struct ieee80211_link_sta *link_sta,
5702-
u32 changed)
5699+
static void ath12k_mac_op_link_sta_rc_update(struct ieee80211_hw *hw,
5700+
struct ieee80211_vif *vif,
5701+
struct ieee80211_link_sta *link_sta,
5702+
u32 changed)
57035703
{
57045704
struct ieee80211_sta *sta = link_sta->sta;
57055705
struct ath12k *ar;
@@ -5710,27 +5710,23 @@ static void ath12k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
57105710
struct ath12k_link_vif *arvif;
57115711
struct ath12k_peer *peer;
57125712
u32 bw, smps;
5713-
/* TODO: use proper link id once link sta specific rc update support is
5714-
* available in mac80211.
5715-
*/
5716-
u8 link_id = ATH12K_DEFAULT_LINK_ID;
57175713

57185714
rcu_read_lock();
5719-
arvif = rcu_dereference(ahvif->link[link_id]);
5715+
arvif = rcu_dereference(ahvif->link[link_sta->link_id]);
57205716
if (!arvif) {
57215717
ath12k_hw_warn(ah, "mac sta rc update failed to fetch link vif on link id %u for peer %pM\n",
5722-
link_id, sta->addr);
5718+
link_sta->link_id, sta->addr);
57235719
rcu_read_unlock();
57245720
return;
57255721
}
57265722

57275723
ar = arvif->ar;
57285724

5729-
arsta = rcu_dereference(ahsta->link[link_id]);
5725+
arsta = rcu_dereference(ahsta->link[link_sta->link_id]);
57305726
if (!arsta) {
57315727
rcu_read_unlock();
57325728
ath12k_warn(ar->ab, "mac sta rc update failed to fetch link sta on link id %u for peer %pM\n",
5733-
link_id, sta->addr);
5729+
link_sta->link_id, sta->addr);
57345730
return;
57355731
}
57365732
spin_lock_bh(&ar->ab->base_lock);
@@ -10165,7 +10161,7 @@ static const struct ieee80211_ops ath12k_ops = {
1016510161
.set_rekey_data = ath12k_mac_op_set_rekey_data,
1016610162
.sta_state = ath12k_mac_op_sta_state,
1016710163
.sta_set_txpwr = ath12k_mac_op_sta_set_txpwr,
10168-
.link_sta_rc_update = ath12k_mac_op_sta_rc_update,
10164+
.link_sta_rc_update = ath12k_mac_op_link_sta_rc_update,
1016910165
.conf_tx = ath12k_mac_op_conf_tx,
1017010166
.set_antenna = ath12k_mac_op_set_antenna,
1017110167
.get_antenna = ath12k_mac_op_get_antenna,

0 commit comments

Comments
 (0)