Просмотр исходного кода

qcacld-3.0: Allow firmware to auto detect tx bssid

In the case of of 5 GHz + non-tx 6 GHz MLO connection, the scan entry
generated from the ML-probe might not carry MBSSID information of the
non-tx partner. The RNR of the assoc link will also not be inherited.
Therefore, the mbssid info is not generated for this non-tx 6 GHz scan
entry. In such cases, if there is a vdev restart, host driver sends zero
mac address in trans bssid, leading to issues with connection.

To fix this:
1. Look up the RNR db for the 6 GHz link, and determine if the bss param
corresponding to the bssid is non-tx MBSSID.
2. If it is a non-tx MBSSID and there is no mbssid info in the scan cache,
then configure the tx-bssid as broadcast mac.
3. This allows the firmware to auto-detect the tx bssid from the upcoming
beacons.
4. Also, save the neighbor entries from the beacon/probes received from
the firmware during roam sync and other events to facilitate the look-up.
5. If there is no existing entry for the roamed non-tx link, then caching
the neighbor info from the assoc partner link would store the valid entry
into the rnr db.

Change-Id: Ie5ef03fc8504cd63f6db98d2ce4af7eb5c2d7e00
CRs-Fixed: 3789675
Surya Prakash Sivaraj 1 год назад
Родитель
Сommit
99ad149bb6

+ 3 - 2
components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -316,12 +316,13 @@ mlme_set_cac_required(struct wlan_objmgr_vdev *vdev, bool val);
  * mlme_set_mbssid_info() - save mbssid info
  * @vdev: vdev pointer
  * @mbssid_info: mbssid info
+ * @freq: current operating frequency
  *
  * Return: QDF_STATUS
  */
 QDF_STATUS
 mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev,
-		     struct scan_mbssid_info *mbssid_info);
+		     struct scan_mbssid_info *mbssid_info, qdf_freq_t freq);
 
 /**
  * mlme_get_mbssid_info() - get mbssid info

+ 32 - 2
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -1349,10 +1349,13 @@ bool mlme_get_cac_required(struct wlan_objmgr_vdev *vdev)
 }
 
 QDF_STATUS mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev,
-				struct scan_mbssid_info *mbssid_info)
+				struct scan_mbssid_info *mbssid_info,
+				qdf_freq_t freq)
 {
 	struct vdev_mlme_obj *vdev_mlme;
 	struct vdev_mlme_mbss_11ax *mbss_11ax;
+	struct qdf_mac_addr bssid;
+	struct qdf_mac_addr bcast_addr = QDF_MAC_ADDR_BCAST_INIT;
 
 	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
 	if (!vdev_mlme) {
@@ -1368,6 +1371,33 @@ QDF_STATUS mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev,
 	qdf_mem_copy(mbss_11ax->non_trans_bssid,
 		     mbssid_info->non_trans_bssid, QDF_MAC_ADDR_SIZE);
 
+	qdf_mem_copy(&bssid.bytes, vdev_mlme->mgmt.generic.bssid,
+		     QDF_MAC_ADDR_SIZE);
+
+	/*
+	 * Consider the case of 5 GHz + non-tx 6 GHz MLO candidate.
+	 * The scan entry might be generated from a ML-probe, which doesn't have
+	 * the MBSSID info for the non-tx partner link. In this case, host has
+	 * to identify if this link is MBSS or not. This is essential to receive
+	 * traffic over this link.
+	 *
+	 * The below logic looks into the rnr db for the 6 GHz bssid and
+	 * determines if the bssid is non-tx profile from the bss parameter
+	 * saved by its neighbor. If this is a non-tx bssid, but trans_bssid
+	 * info is not available from the scan entry, then set transmitted bssid
+	 * to bcast address. Upon sending this bcast tx bssid to firmware, the
+	 * firmware would auto-detect the tx bssid from the upcoming beacons
+	 * and tunes the interface to proper bssid.
+	 *
+	 * Note: Always send bcast mac in trans_bssid if the host is unable
+	 * to determine if a given BSS is part of an MBSS.
+	 */
+	if (freq != INVALID_CHANNEL_NUM && !mbss_11ax->profile_idx &&
+	    qdf_is_macaddr_zero((struct qdf_mac_addr *)&mbss_11ax->trans_bssid) &&
+	    util_is_bssid_non_tx(wlan_vdev_get_psoc(vdev), &bssid, freq))
+		qdf_mem_copy(mbss_11ax->trans_bssid,
+			     bcast_addr.bytes, QDF_MAC_ADDR_SIZE);
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 2 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -2858,7 +2858,8 @@ static void lim_set_mbssid_info(struct pe_session *pe_session)
 		mbssid_info =
 			&pe_session->pLimReAssocReq->bssDescription.mbssid_info;
 
-	mlme_set_mbssid_info(pe_session->vdev, mbssid_info);
+	mlme_set_mbssid_info(pe_session->vdev, mbssid_info,
+			     pe_session->curr_op_freq);
 }
 
 /**

+ 1 - 0
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -3165,6 +3165,7 @@ static void lim_process_switch_channel_join_req(
 	 * and wait for the probe response/ beacon to post JOIN CNF
 	 */
 	if (nontx_bss_id) {
+		pe_debug("Skip sending join probe for MBSS candidate");
 		session_entry->limMlmState = eLIM_MLM_JOINED_STATE;
 		join_cnf.sessionId = session_entry->peSessionId;
 		join_cnf.resultCode = eSIR_SME_SUCCESS;

+ 2 - 2
core/mac/src/pe/lim/lim_session.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -829,7 +829,7 @@ static void lim_clear_mbssid_info(struct wlan_objmgr_vdev *vdev)
 {
 	struct scan_mbssid_info mbssid_info = {0};
 
-	mlme_set_mbssid_info(vdev, &mbssid_info);
+	mlme_set_mbssid_info(vdev, &mbssid_info, INVALID_CHANNEL_NUM);
 }
 
 /**

+ 3 - 2
core/sme/src/csr/csr_api_roam.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -5528,7 +5528,8 @@ static void csr_fill_connected_profile(struct mac_context *mac_ctx,
 
 	if (rsp->connect_rsp.is_reassoc ||
 	    csr_is_link_switch_in_progress(vdev))
-		mlme_set_mbssid_info(vdev, &cur_node->entry->mbssid_info);
+		mlme_set_mbssid_info(vdev, &cur_node->entry->mbssid_info,
+				     bss_desc->chan_freq);
 
 	if (bcn_ies->Country.present)
 		qdf_mem_copy(country_code, bcn_ies->Country.country,