소스 검색

qcacld-3.0: Init 5G SAP mandatory list with 2G+5G band

When SAP starts on 5G, initialize SAP mandatory list with
2G and 5G mandatory list. And also select same band channel
SCC channel firstly in the intersection of PCL and mandatory
channel list.

Change-Id: Iac86b5caf38bf72f143be81122f8378fc61b29e2
CRs-Fixed: 3039268
Liangwei Dong 3 년 전
부모
커밋
4370350179
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 3
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c
  2. 3 1
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

+ 2 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -3845,9 +3845,8 @@ void  policy_mgr_init_sap_mandatory_chan(struct wlan_objmgr_psoc *psoc,
 	if (WLAN_REG_IS_5GHZ_CH_FREQ(org_ch_freq)) {
 		policy_mgr_debug("channel %hu, sap mandatory chan list enabled",
 				 org_ch_freq);
-		if (!policy_mgr_get_sap_mandatory_chan_list_len(psoc))
-			policy_mgr_init_sap_mandatory_chan_by_band(
-				psoc, BIT(REG_BAND_2G));
+		policy_mgr_init_sap_mandatory_chan_by_band(
+			psoc, BIT(REG_BAND_2G) | BIT(REG_BAND_5G));
 		policy_mgr_add_sap_mandatory_chan(
 			psoc, org_ch_freq);
 	} else if (WLAN_REG_IS_6GHZ_CHAN_FREQ(org_ch_freq)) {

+ 3 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -2521,7 +2521,9 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
 	}
 
 	sap_new_freq = pcl.pcl_list[0];
-	if (WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ch_freq)) {
+	if (WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ch_freq) ||
+	    (WLAN_REG_IS_5GHZ_CH_FREQ(sap_ch_freq) &&
+	     WLAN_REG_IS_5GHZ_CH_FREQ(*intf_ch_freq))) {
 		for (i = 0; i < pcl.pcl_len; i++) {
 			if (pcl.pcl_list[i] == *intf_ch_freq) {
 				sap_new_freq = pcl.pcl_list[i];