Browse Source

qcacld-3.0: Use link address to find channel from RNR

Link id may not be unique in RNR if the APs are not in
same MLD (different MLD id).
Use link address to find channel firstly, fallback to
link id if find failed.

Change-Id: I6c328b6077be4966270a129ecbeb4f6cb2576e0f
CRs-Fixed: 3516659
Liangwei Dong 1 year ago
parent
commit
f6f1777b3c
1 changed files with 11 additions and 4 deletions
  1. 11 4
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 11 - 4
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -481,7 +481,7 @@ static void lim_copy_ml_partner_info(struct cm_vdev_join_rsp *rsp,
 	int i;
 	struct mlo_partner_info *partner_info;
 	struct mlo_partner_info *rsp_partner_info;
-	uint8_t chan, op_class, link_id;
+	uint8_t chan = 0, op_class, link_id;
 
 	partner_info = &pe_session->ml_partner_info;
 	rsp_partner_info = &rsp->connect_rsp.ml_parnter_info;
@@ -495,9 +495,16 @@ static void lim_copy_ml_partner_info(struct cm_vdev_join_rsp *rsp,
 			&rsp_partner_info->partner_link_info[i].link_addr,
 			&partner_info->partner_link_info[i].link_addr);
 
-		wlan_get_chan_by_link_id_from_rnr(pe_session->vdev,
-						  pe_session->cm_id,
-						  link_id, &chan, &op_class);
+		wlan_get_chan_by_bssid_from_rnr(
+			pe_session->vdev,
+			pe_session->cm_id,
+			&partner_info->partner_link_info[i].link_addr,
+			&chan, &op_class);
+		if (!chan)
+			wlan_get_chan_by_link_id_from_rnr(
+						pe_session->vdev,
+						pe_session->cm_id,
+						link_id, &chan, &op_class);
 		if (chan) {
 			rsp_partner_info->partner_link_info[i].chan_freq =
 				wlan_reg_chan_opclass_to_freq_auto(chan,