瀏覽代碼

qcacld-3.0: Fix SBS PCL freq list to handle 3 SCC freqs

If there are 3 or more 5/6Ghz SCC freq, avoid filling SBS freq in
PCL as due to 3 home freq limitation, 3rd freq will always be
leading to SBS.

So add SBS freqs in PCL, only if number of SCC are 1 OR 2 with 5Ghz
MCC/SCC.

Change-Id: Ib97589df50bbacafa56766dd4b8af6d9f5d1419b
CRs-Fixed: 3178339
Abhishek Singh 3 年之前
父節點
當前提交
2b79efb8d2
共有 1 個文件被更改,包括 19 次插入16 次删除
  1. 19 16
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

+ 19 - 16
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -2251,26 +2251,29 @@ get_sub_channels(struct wlan_objmgr_psoc *psoc,
 	}
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
 
+	*sbs_num = 0;
 	if (policy_mgr_is_hw_sbs_capable(psoc)) {
-		if (*scc_num > 1) {
-			if (policy_mgr_are_sbs_chan(psoc, scc_freqs[0],
-						    scc_freqs[1])) {
-				/* 2/3 home channels with SBS separation */
-				*sbs_num = 0;
-			} else {
-				/* SCC or MCC (not SBS separation) */
-				get_sbs_chlist(psoc, sbs_freqs, sbs_num,
-					       scc_freqs[0],
-					       chlist1, chlist1_len,
-					       chlist2, chlist2_len);
-			}
-		} else if (*scc_num > 0) {
+		/*
+		 * scc_num is number of existing 5Ghz or 6Ghz connection freqs.
+		 * So check if they are all on same mac in SBS, to get SBS
+		 * freq list.
+		 *
+		 * For scc_num > 2, it will always be with freq across
+		 * both mac, as all 3 cannot be on same mac.
+		 *
+		 * For scc_num == 0, i.e no freq on 5/6Ghz there is no need to
+		 * check for SBS freq.
+		 *
+		 * So check only if scc_num == 1 or 2, with both freq
+		 * on same mac in SBS mode (non-SBS) in case of 2.
+		 */
+		if (*scc_num == 1 ||
+		    (*scc_num == 2 &&
+		     !policy_mgr_are_sbs_chan(psoc, scc_freqs[0],
+					      scc_freqs[1])))
 			get_sbs_chlist(psoc, sbs_freqs, sbs_num, scc_freqs[0],
 				       chlist1, chlist1_len,
 				       chlist2, chlist2_len);
-		}
-	} else {
-		*sbs_num = 0;
 	}
 
 	get_rest_chlist(rest_freqs, rest_num, scc_freqs, *scc_num,