Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Aloka Dixit and committed by
Jeff Johnson
f4f5ee5e 5f1e9f2c

+6 -14
+6 -14
drivers/net/wireless/ath/ath12k/mac.c
··· 1644 1644 } 1645 1645 1646 1646 static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif, 1647 - struct ath12k_link_vif *tx_arvif) 1647 + struct ath12k_link_vif *tx_arvif, 1648 + u8 bssid_index) 1648 1649 { 1649 - struct ath12k_vif *ahvif = arvif->ahvif; 1650 - struct ieee80211_bss_conf *bss_conf; 1651 1650 struct ath12k_wmi_bcn_tmpl_ema_arg ema_args; 1652 1651 struct ieee80211_ema_beacons *beacons; 1653 1652 bool nontx_profile_found = false; 1654 1653 int ret = 0; 1655 1654 u8 i; 1656 - 1657 - bss_conf = ath12k_mac_get_link_bss_conf(arvif); 1658 - if (!bss_conf) { 1659 - ath12k_warn(arvif->ar->ab, 1660 - "failed to get link bss conf to update bcn tmpl for vif %pM link %u\n", 1661 - ahvif->vif->addr, arvif->link_id); 1662 - return -ENOLINK; 1663 - } 1664 1655 1665 1656 beacons = ieee80211_beacon_get_template_ema_list(ath12k_ar_to_hw(tx_arvif->ar), 1666 1657 tx_arvif->ahvif->vif, ··· 1668 1677 for (i = 0; i < beacons->cnt; i++) { 1669 1678 if (tx_arvif != arvif && !nontx_profile_found) 1670 1679 ath12k_mac_set_arvif_ies(arvif, beacons->bcn[i].skb, 1671 - bss_conf->bssid_index, 1680 + bssid_index, 1672 1681 &nontx_profile_found); 1673 1682 1674 1683 ema_args.bcn_cnt = beacons->cnt; ··· 1686 1695 if (tx_arvif != arvif && !nontx_profile_found) 1687 1696 ath12k_warn(arvif->ar->ab, 1688 1697 "nontransmitted bssid index %u not found in beacon template\n", 1689 - bss_conf->bssid_index); 1698 + bssid_index); 1690 1699 1691 1700 ieee80211_beacon_free_ema_list(beacons); 1692 1701 return ret; ··· 1721 1730 return 0; 1722 1731 1723 1732 if (link_conf->ema_ap) 1724 - return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif); 1733 + return ath12k_mac_setup_bcn_tmpl_ema(arvif, tx_arvif, 1734 + link_conf->bssid_index); 1725 1735 } else { 1726 1736 tx_arvif = arvif; 1727 1737 }