瀏覽代碼

qcacld-3.0: fix sap not restart when on unsafe channel

In LTE Coex test, firmware will report the unsafe channels, and if sap
runs on these channels, driver goes through channel select process and
restart. There are some situation, in channel select process, SAP can't
find the proper PCL channel lists, and fail to restart.

This fix is to let SAP continue to pick up a safe channel from ACS
range when fail to get pcl.

Change-Id: I54145547d2b161aec09caa2dabd4d4b52aa15f03
CRs-Fixed: 2064534
Frank Liu 8 年之前
父節點
當前提交
dc2cefb153
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      core/hdd/src/wlan_hdd_main.c

+ 7 - 4
core/hdd/src/wlan_hdd_main.c

@@ -6869,10 +6869,13 @@ static uint8_t hdd_get_safe_channel_from_pcl_and_acs_range(
 		return INVALID_CHANNEL_ID;
 	}
 
-	if (!pcl.pcl_len) {
-		hdd_err("pcl length is zero. this is not expected");
-		return INVALID_CHANNEL_ID;
-	}
+	/*
+	 * In some scenarios, like hw dbs disabled, sap+sap case, if operating
+	 * channel is unsafe channel, the pcl may be empty, instead of return,
+	 * try to choose a safe channel from acs range.
+	 */
+	if (!pcl.pcl_len)
+		hdd_debug("pcl length is zero!");
 
 	hdd_debug("start:%d end:%d",
 		adapter->sessionCtx.ap.sapConfig.acs_cfg.start_ch,