summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAloka Dixit <aloka.dixit@oss.qualcomm.com>2025-02-10 10:27:18 -0800
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>2025-02-28 11:53:13 -0800
commitf4f5ee5e3a21830c3c4f1925108dbc7c3c070574 (patch)
treedc1190ec1da8b2dfaadf0764fbffb05e90d1d475
parent5f1e9f2cbc2b8aff6a2bef9b67c09c8ac8923285 (diff)
downloadlinux-f4f5ee5e3a21830c3c4f1925108dbc7c3c070574.tar.gz
linux-f4f5ee5e3a21830c3c4f1925108dbc7c3c070574.zip
wifi: ath12k: pass BSSID index as input for EMA
Function ath12k_mac_setup_bcn_tmpl_ema() retrieves 'bss_conf' only to get BSSID index which is an overhead because the caller ath12k_mac_setup_bcn_tmpl() has already stored this locally. Pass the index as an input instead. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250210182718.408891-6-aloka.dixit@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath12k/mac.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index cdf40d68e43d..dfa05f0ee6c9 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1644,24 +1644,15 @@ static void ath12k_mac_set_arvif_ies(struct ath12k_link_vif *arvif, struct sk_bu
}
static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif,
- struct ath12k_link_vif *tx_arvif)
+ struct ath12k_link_vif *tx_arvif,
+ u8 bssid_index)
{
- struct ath12k_vif *ahvif = arvif->ahvif;
- struct ieee80211_bss_conf *bss_conf;
struct ath12k_wmi_bcn_tmpl_ema_arg ema_args;
struct ieee80211_ema_beacons *beacons;
bool nontx_profile_found = false;
int ret = 0;
u8 i;
- bss_conf = ath12k_mac_get_link_bss_conf(arvif);
- if (!bss_conf) {
- ath12k_warn(arvif->ar->ab,
- "failed to get link bss conf to update bcn tmpl for vif %pM link %u\n",
- ahvif->vif->addr, arvif->link_id);
- return -ENOLINK;
- }
-
beacons = ieee80211_beacon_get_template_ema_list(ath12k_ar_to_hw(tx_arvif->ar),
tx_arvif->ahvif->vif,
tx_arvif->link_id);
@@ -1677,7 +1668,7 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif,
for (i = 0; i < beacons->cnt; i++) {
if (tx_arvif != arvif && !nontx_profile_found)
ath12k_mac_set_arvif_ies(arvif, beacons->bcn[i].skb,
- bss_conf->bssid_index,
+ bssid_index,
&nontx_profile_found);
ema_args.bcn_cnt = beacons->cnt;
@@ -1695,7 +1686,7 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif,
if (tx_arvif != arvif && !nontx_profile_found)
ath12k_warn(arvif->ar->ab,
"nontransmitted bssid index %u not found in beacon template\n",
- bss_conf->bssid_index);
+ bssid_index);
ieee80211_beacon_free_ema_list(beacons);
return ret;
@@ -1730,7 +1721,8 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif)
return 0;
if (link_conf->ema_ap)
- return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif);
+ return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif,
+ link_conf->bssid_index);
} else {
tx_arvif = arvif;
}