Commit ce7c93d1 authored by Rameshkumar Sundaram's avatar Rameshkumar Sundaram Committed by Jeff Johnson
Browse files

wifi: ath12k: Fix beacon reception for sta associated to Non-TX AP



Currently, when a station is associated with a Non-Transmitting BSS of an
MBSSID set, beacons are not frequently received from the firmware. This
results in missing events via beacons, such as channel switches, leading
to the station not switching to new channel as the AP does, eventually
causing a kick out event from the firmware. This issue arises due to
missing configuration of Non-Transmitting BSS information in station's
vdev up command.

Fix this by filling information such as the Transmitting BSSID, profile index
and profile count in vdev up command of station.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1

Signed-off-by: default avatarRameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: default avatarVasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250530035615.3178480-3-rameshkumar.sundaram@oss.qualcomm.com


Signed-off-by: default avatarJeff Johnson <jeff.johnson@oss.qualcomm.com>
parent 70eeacc1
Loading
Loading
Loading
Loading
+37 −19
Original line number Diff line number Diff line
@@ -602,6 +602,33 @@ ath12k_mac_get_tx_arvif(struct ath12k_link_vif *arvif,
	return NULL;
}

static const u8 *ath12k_mac_get_tx_bssid(struct ath12k_link_vif *arvif)
{
	struct ieee80211_bss_conf *link_conf;
	struct ath12k_link_vif *tx_arvif;
	struct ath12k *ar = arvif->ar;

	lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);

	link_conf = ath12k_mac_get_link_bss_conf(arvif);
	if (!link_conf) {
		ath12k_warn(ar->ab,
			    "unable to access bss link conf for link %u required to retrieve transmitting link conf\n",
			    arvif->link_id);
		return NULL;
	}
	if (link_conf->vif->type == NL80211_IFTYPE_STATION) {
		if (link_conf->nontransmitted)
			return link_conf->transmitter_bssid;
	} else {
		tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf);
		if (tx_arvif)
			return tx_arvif->bssid;
	}

	return NULL;
}

struct ieee80211_bss_conf *
ath12k_mac_get_link_bss_conf(struct ath12k_link_vif *arvif)
{
@@ -1691,8 +1718,6 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif,
{
	struct ath12k_wmi_vdev_up_params params = {};
	struct ath12k_vif *ahvif = arvif->ahvif;
	struct ieee80211_bss_conf *link_conf;
	struct ath12k_link_vif *tx_arvif;
	struct ath12k *ar = arvif->ar;
	int ret;

@@ -1723,18 +1748,8 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif,
	params.vdev_id = arvif->vdev_id;
	params.aid = ahvif->aid;
	params.bssid = arvif->bssid;

	link_conf = ath12k_mac_get_link_bss_conf(arvif);
	if (!link_conf) {
		ath12k_warn(ar->ab,
			    "unable to access bss link conf for link %u required to retrieve transmitting link conf\n",
			    arvif->link_id);
		return;
	}

	tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf);
	if (tx_arvif) {
		params.tx_bssid = tx_arvif->bssid;
	params.tx_bssid = ath12k_mac_get_tx_bssid(arvif);
	if (params.tx_bssid) {
		params.nontx_profile_idx = info->bssid_index;
		params.nontx_profile_cnt = 1 << info->bssid_indicator;
	}
@@ -3264,6 +3279,11 @@ static void ath12k_bss_assoc(struct ath12k *ar,
	params.vdev_id = arvif->vdev_id;
	params.aid = ahvif->aid;
	params.bssid = arvif->bssid;
	params.tx_bssid = ath12k_mac_get_tx_bssid(arvif);
	if (params.tx_bssid) {
		params.nontx_profile_idx = bss_conf->bssid_index;
		params.nontx_profile_cnt = 1 << bss_conf->bssid_indicator;
	}
	ret = ath12k_wmi_vdev_up(ar, &params);
	if (ret) {
		ath12k_warn(ar->ab, "failed to set vdev %d up: %d\n",
@@ -10132,7 +10152,7 @@ ath12k_mac_update_vif_chan(struct ath12k *ar,
			   int n_vifs)
{
	struct ath12k_wmi_vdev_up_params params = {};
	struct ath12k_link_vif *arvif, *tx_arvif;
	struct ath12k_link_vif *arvif;
	struct ieee80211_bss_conf *link_conf;
	struct ath12k_base *ab = ar->ab;
	struct ieee80211_vif *vif;
@@ -10204,10 +10224,8 @@ ath12k_mac_update_vif_chan(struct ath12k *ar,
		params.vdev_id = arvif->vdev_id;
		params.aid = ahvif->aid;
		params.bssid = arvif->bssid;

		tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf);
		if (tx_arvif) {
			params.tx_bssid = tx_arvif->bssid;
		params.tx_bssid = ath12k_mac_get_tx_bssid(arvif);
		if (params.tx_bssid) {
			params.nontx_profile_idx = link_conf->bssid_index;
			params.nontx_profile_cnt = 1 << link_conf->bssid_indicator;
		}