소스 검색

qcacld-3.0: Stop opportunistic timer while starting new SAP

If DBS opportunistic timer is still running while starting new SAP on
some DFS channel when STA is already present on some 2.4Ghz channel,
wrong hw mode will be set when timer expires as concurrency will only
be updated when VDEV_UP happens which will happen after at least 60
seconds in case of DFS channel. So, while starting SAP, hw mode was set
to DBS mode but on DBS opportunistic timer expiration, as VDEV_UP doesn't
happen yet, concurrency has not been updated till now causing hw mode to
reset to SINGLE_MAC resulting in DFS MCC which is not allowed.

Stop DBS opportunistic timer if running while starting new SAP to avoid
hw mode reset.

Change-Id: I9cef0ab5f6208e1822aff4a68c442d61a3f8a20e
CRs-Fixed: 2222386
Himanshu Agarwal 7 년 전
부모
커밋
5597208ded
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      core/hdd/src/wlan_hdd_hostapd.c

+ 13 - 1
core/hdd/src/wlan_hdd_hostapd.c

@@ -8609,10 +8609,22 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("ERR: clear event failed");
 
+	/*
+	 * Stop opportunistic timer here if running as we are already doing
+	 * hw mode change before vdev start based on the new concurrency
+	 * situation. If timer is not stopped and if it gets triggered before
+	 * VDEV_UP, it will reset the hw mode to some wrong value.
+	 */
+	status = policy_mgr_stop_opportunistic_timer(hdd_ctx->hdd_psoc);
+	if (status != QDF_STATUS_SUCCESS) {
+		hdd_err("Failed to stop DBS opportunistic timer");
+		return -EINVAL;
+	}
+
 	status = policy_mgr_current_connections_update(hdd_ctx->hdd_psoc,
 			adapter->session_id, channel,
 			POLICY_MGR_UPDATE_REASON_START_AP);
-	if (QDF_STATUS_E_FAILURE == status) {
+	if (status == QDF_STATUS_E_FAILURE) {
 		hdd_err("ERROR: connections update failed!!");
 		return -EINVAL;
 	}