summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath12k/mac.c
diff options
context:
space:
mode:
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>2023-11-21 02:58:11 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2023-12-01 19:04:45 +0300
commit842addae02089fce4731be1c8d7d539449d4d009 (patch)
treec41190e2ae97990814cb71dd61f8d0db5d2ac097 /drivers/net/wireless/ath/ath12k/mac.c
parent37a0dd6137ecfbd25d6ce84b65ad23de4f06b779 (diff)
downloadlinux-842addae02089fce4731be1c8d7d539449d4d009.tar.xz
wifi: ath12k: Optimize the mac80211 hw data access
Currently mac80211 hw data is accessed by convert the hw to radio (ar) structure and then radio to hw structure which is not necessary in some places where mac80211 hw data is already present. So in that kind of places avoid the conversion and directly access the mac80211 hw data. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20231120235812.2602198-2-quic_periyasa@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/mac.c')
-rw-r--r--drivers/net/wireless/ath/ath12k/mac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index b0d594d2fc90..d6728103c58e 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -4995,7 +4995,7 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
if (ret) {
ath12k_warn(ar->ab, "failed to queue management frame %d\n",
ret);
- ieee80211_free_txskb(ar->hw, skb);
+ ieee80211_free_txskb(hw, skb);
}
return;
}
@@ -5003,7 +5003,7 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
ret = ath12k_dp_tx(ar, arvif, skb);
if (ret) {
ath12k_warn(ar->ab, "failed to transmit frame %d\n", ret);
- ieee80211_free_txskb(ar->hw, skb);
+ ieee80211_free_txskb(hw, skb);
}
}
@@ -5604,7 +5604,7 @@ static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,
goto err_peer_del;
param_id = WMI_VDEV_PARAM_RTS_THRESHOLD;
- param_value = ar->hw->wiphy->rts_threshold;
+ param_value = hw->wiphy->rts_threshold;
ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
param_id, param_value);
if (ret) {
@@ -6844,7 +6844,7 @@ ath12k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
arvif->vdev_id, ret);
return ret;
}
- ieee80211_iterate_stations_atomic(ar->hw,
+ ieee80211_iterate_stations_atomic(hw,
ath12k_mac_disable_peer_fixed_rate,
arvif);
} else if (ath12k_mac_bitrate_mask_get_single_nss(ar, band, mask,
@@ -6890,14 +6890,14 @@ ath12k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
return -EINVAL;
}
- ieee80211_iterate_stations_atomic(ar->hw,
+ ieee80211_iterate_stations_atomic(hw,
ath12k_mac_disable_peer_fixed_rate,
arvif);
mutex_lock(&ar->conf_mutex);
arvif->bitrate_mask = *mask;
- ieee80211_iterate_stations_atomic(ar->hw,
+ ieee80211_iterate_stations_atomic(hw,
ath12k_mac_set_bitrate_mask_iter,
arvif);
@@ -6935,7 +6935,7 @@ ath12k_mac_op_reconfig_complete(struct ieee80211_hw *hw,
ath12k_warn(ar->ab, "pdev %d successfully recovered\n",
ar->pdev->pdev_id);
ar->state = ATH12K_STATE_ON;
- ieee80211_wake_queues(ar->hw);
+ ieee80211_wake_queues(hw);
if (ab->is_reset) {
recovery_count = atomic_inc_return(&ab->recovery_count);