Przeglądaj źródła

qcacld-3.0: Allow MLO sta connetion with single link

It is MLO single link connection if MLO sta does not include
partner link information in mlo IE in MLO assoc request.
Make MLO single link connection work.

Change-Id: Ib0de4a79be794c53327241fe7be5af88f9a055e6
CRs-Fixed: 3168615
Bing Sun 3 lat temu
rodzic
commit
361ceba4e4

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

@@ -2331,7 +2331,7 @@ lim_add_sta(struct mac_context *mac_ctx,
 
 	lim_update_sta_eht_capable(mac_ctx, add_sta_params, sta_ds,
 				   session_entry);
-	lim_update_sta_mlo_info(add_sta_params, sta_ds);
+	lim_update_sta_mlo_info(session_entry, add_sta_params, sta_ds);
 
 	add_sta_params->maxAmpduDensity = sta_ds->htAMpduDensity;
 	add_sta_params->maxAmpduSize = sta_ds->htMaxRxAMpduFactor;

+ 1 - 1
core/mac/src/pe/lim/lim_mlo.c

@@ -778,6 +778,7 @@ QDF_STATUS lim_mlo_assoc_ind_upper_layer(struct mac_context *mac,
 		return status;
 	}
 
+	status = QDF_STATUS_SUCCESS;
 	for (link = 0; link < mlo_info->num_partner_links; link++) {
 		link_id = mlo_info->partner_link_info[link].link_id;
 		link_addr = &mlo_info->partner_link_info[link].link_addr;
@@ -846,7 +847,6 @@ QDF_STATUS lim_mlo_assoc_ind_upper_layer(struct mac_context *mac,
 				lk_session->parsedAssocReq[sta->assocId]);
 		qdf_mem_free(lk_session->parsedAssocReq[sta->assocId]);
 		lk_session->parsedAssocReq[sta->assocId] = NULL;
-		status = QDF_STATUS_SUCCESS;
 		lim_mlo_release_vdev_ref(lk_session->vdev);
 	}
 

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

@@ -2184,7 +2184,8 @@ bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx,
 	if (wlan_vdev_mlme_is_mlo_ap(session->vdev) &&
 	    assoc_req->eht_cap.present &&
 	    IS_DOT11_MODE_EHT(session->dot11mode) &&
-	    (partner_peer_idx || assoc_req->mlo_info.num_partner_links))
+	    (partner_peer_idx ||
+	     !qdf_is_macaddr_zero((struct qdf_mac_addr *)assoc_req->mld_mac)))
 		peer_idx = lim_assign_mlo_conn_idx(mac_ctx, session,
 						   partner_peer_idx);
 	else

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

@@ -1677,6 +1677,7 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
 					true);
 
 	if (sta && lim_is_sta_eht_capable(sta) &&
+	    lim_is_mlo_conn(pe_session, sta) &&
 	    lim_is_session_eht_capable(pe_session) &&
 	    wlan_vdev_mlme_is_mlo_ap(pe_session->vdev)) {
 		pe_debug("Populate mlo IEs");

+ 5 - 4
core/mac/src/pe/lim/lim_utils.c

@@ -7977,15 +7977,16 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx,
 #endif
 
 #ifdef WLAN_FEATURE_11BE_MLO
-void lim_update_sta_mlo_info(tpAddStaParams add_sta_params,
+void lim_update_sta_mlo_info(struct pe_session *session,
+			     tpAddStaParams add_sta_params,
 			     tpDphHashNode sta_ds)
 {
-	if (add_sta_params->eht_capable) {
+	if (lim_is_mlo_conn(session, sta_ds)) {
 		WLAN_ADDR_COPY(add_sta_params->mld_mac_addr, sta_ds->mld_addr);
 		add_sta_params->is_assoc_peer = lim_is_mlo_recv_assoc(sta_ds);
 	}
-	pe_debug("eht_capable: %d mld mac " QDF_MAC_ADDR_FMT " assoc peer %d",
-		 add_sta_params->eht_capable,
+	pe_debug("is mlo connection: %d mld mac " QDF_MAC_ADDR_FMT " assoc peer %d",
+		 lim_is_mlo_conn(session, sta_ds),
 		 QDF_MAC_ADDR_REF(add_sta_params->mld_mac_addr),
 		 add_sta_params->is_assoc_peer);
 }

+ 5 - 2
core/mac/src/pe/lim/lim_utils.h

@@ -265,12 +265,14 @@ lim_release_mlo_conn_idx(struct mac_context *mac, uint16_t peer_idx,
 
 /**
  * lim_update_sta_mlo_info() - update sta mlo information
+ * @pe_session: session entry
  * @add_sta_params: pointer to tpAddStaParams
  * @sta_ds: pointer tpDphHashNode
  *
  * Return: Void
  */
-void lim_update_sta_mlo_info(tpAddStaParams add_sta_params,
+void lim_update_sta_mlo_info(struct pe_session *pe_session,
+			     tpAddStaParams add_sta_params,
 			     tpDphHashNode sta_ds);
 
 void lim_set_mlo_caps(struct mac_context *mac, struct pe_session *session,
@@ -294,7 +296,8 @@ lim_release_mlo_conn_idx(struct mac_context *mac, uint16_t peer_idx,
 {
 }
 
-static inline void lim_update_sta_mlo_info(tpAddStaParams add_sta_params,
+static inline void lim_update_sta_mlo_info(struct pe_session *session,
+					   tpAddStaParams add_sta_params,
 					   tpDphHashNode sta_ds)
 {
 }