Browse Source

qcacmn: Choose highest bw link as primary link

This change selects psoc with highest bw link as primary link
for first ML STA.

Change-Id: I7d71507df79070c7e975ed2f27cbadce707d9cd4
CRs-Fixed: 3509085
Srinivas Pitla 2 years ago
parent
commit
06ed8855eb
1 changed files with 8 additions and 3 deletions
  1. 8 3
      umac/mlo_mgr/src/wlan_mlo_mgr_primary_umac.c

+ 8 - 3
umac/mlo_mgr/src/wlan_mlo_mgr_primary_umac.c

@@ -236,13 +236,18 @@ mld_get_best_primary_umac_w_rssi(struct wlan_mlo_peer_context *ml_peer,
 				chwidth = mld_ch_width[i];
 				continue;
 			}
-
+			/* if bw is 320MHZ mark that link as primary link */
+			if (mld_ch_width[i] == CH_WIDTH_320MHZ) {
+				prim_link = i;
+				chwidth = mld_ch_width[i];
+				break;
+			}
 			/* If bw is less than or equal to 160 MHZ
-			 * and chwidth is less than other link
+			 * and chwidth is greater than than other link
 			 * Mark this link as primary link
 			 */
 			if ((mld_ch_width[i] <= CH_WIDTH_160MHZ) &&
-			    (chwidth > mld_ch_width[i])) {
+			    (chwidth < mld_ch_width[i])) {
 				prim_link = i;
 				chwidth = mld_ch_width[i];
 			}