Sfoglia il codice sorgente

qcacld-3.0: Add check for mlo ie present

Process link specific probe response only if mlo ie is present
and ml probe request is sent.

Change-Id: Id958c342a714e98ae3e08f7806bc72da2baaa274
CRs-Fixed: 3225652
Amruta Kulkarni 2 anni fa
parent
commit
25e0f5067e

+ 1 - 0
core/mac/inc/sir_api.h

@@ -992,6 +992,7 @@ struct join_req {
 #ifdef WLAN_FEATURE_11BE_MLO
 	struct mlo_partner_info partner_info;
 	uint8_t assoc_link_id;
+	bool is_ml_probe_req_sent;
 #endif
 	/* Warning:::::::::::: Do not add any new param in this struct */
 	/* Pls make this as last variable in struct */

+ 1 - 0
core/mac/src/include/parser_api.h

@@ -201,6 +201,7 @@ enum operating_extension_identifier {
 #ifdef WLAN_FEATURE_11BE_MLO
 struct sir_multi_link_ie {
 	uint8_t num_of_mlo_ie;
+	bool mlo_ie_present;
 	struct wlan_mlo_ie mlo_ie;
 };
 #endif

+ 16 - 0
core/mac/src/pe/include/lim_api.h

@@ -567,9 +567,24 @@ lim_fill_pe_session(struct mac_context *mac_ctx,
 		    struct bss_description *bss_desc);
 
 #ifdef WLAN_FEATURE_11BE_MLO
+/**
+ * lim_gen_link_specific_probe_rsp() - Generate link specific prb response
+ * @mac_ctx: Pointer to mac context
+ * @session_entry: pe session
+ * @rcvd_probe_resp: Pointer to received prb resp from AP.
+ * @probe_rsp: ptr to prb rsp
+ * @probe_rsp_len: length of prb rsp
+ * @rssi : rssi for link
+ *
+ * This api will generate link specific probe response
+ * and save in scan database.
+ *
+ * Return: qdf status
+ */
 QDF_STATUS
 lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 				struct pe_session *session_entry,
+				tpSirProbeRespBeacon rcvd_probe_resp,
 				uint8_t *probe_rsp,
 				uint32_t probe_rsp_len,
 				int32_t rssi);
@@ -577,6 +592,7 @@ lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 static inline QDF_STATUS
 lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 				struct pe_session *session_entry,
+				tpSirProbeRespBeacon rcvd_probe_resp,
 				uint8_t *probe_rsp,
 				uint32_t probe_rsp_len,
 				int32_t rssi)

+ 5 - 0
core/mac/src/pe/lim/lim_api.c

@@ -3519,6 +3519,7 @@ lim_add_bcn_probe(struct wlan_objmgr_vdev *vdev, uint8_t *bcn_probe,
 QDF_STATUS
 lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 				struct pe_session *session_entry,
+				tpSirProbeRespBeacon rcvd_probe_resp,
 				uint8_t *probe_rsp,
 				uint32_t probe_rsp_len,
 				int32_t rssi)
@@ -3532,6 +3533,10 @@ lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 	uint8_t op_class;
 	uint16_t chan_freq;
 
+	if (!rcvd_probe_resp->mlo_ie.mlo_ie_present ||
+	    !session_entry->lim_join_req->is_ml_probe_req_sent)
+		return QDF_STATUS_SUCCESS;
+
 	link_probe_rsp.ptr = qdf_mem_malloc(probe_rsp_len);
 	if (!link_probe_rsp.ptr)
 		return QDF_STATUS_E_NOMEM;

+ 6 - 3
core/mac/src/pe/lim/lim_process_probe_rsp_frame.c

@@ -110,6 +110,7 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info
 	uint8_t qos_enabled = false;
 	uint8_t wme_enabled = false;
 	uint32_t chan_freq = 0;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	if (!session_entry) {
 		pe_err("session_entry is NULL");
@@ -155,9 +156,11 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info
 		return;
 	}
 
-	lim_gen_link_specific_probe_rsp(mac_ctx, session_entry, body,
-					frame_len,
-					mac_ctx->lim.bss_rssi);
+	status = lim_gen_link_specific_probe_rsp(mac_ctx, session_entry,
+						 probe_rsp,
+						 body,
+						 frame_len,
+						 mac_ctx->lim.bss_rssi);
 
 	if (session_entry->limMlmState ==
 			eLIM_MLM_WT_JOIN_BEACON_STATE) {

+ 2 - 0
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -227,6 +227,8 @@ lim_populate_ml_probe_req(struct mac_context *mac,
 	QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
 			   ml_probe, ml_probe_len);
 
+	session->lim_join_req->is_ml_probe_req_sent = true;
+
 	return QDF_STATUS_SUCCESS;
 }
 #else

+ 1 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -9794,6 +9794,7 @@ sir_convert_mlo_probe_rsp_frame2_struct(uint8_t *ml_ie,
 	mlo_ie_ptr->mlo_ie.bss_param_change_cnt_present =
 						bss_param_change_cnt_found;
 	mlo_ie_ptr->mlo_ie.bss_param_change_count = bss_param_change_cnt;
+	mlo_ie_ptr->mlo_ie_present = true;
 
 	return QDF_STATUS_SUCCESS;
 }