Просмотр исходного кода

qcacld-3.0: Send 11k offload disable to FW during RSO Stop

Currently 11k offload command is sent to FW as part of RSO Start and
not explicit 11k offload disable command is sent to the FW. In case of
STA+STA concurrency cases, while 11k offload is enabled for the 2nd
STA after STA 1 is disconnected, the FW asserts because it has 11k
offload enabled for STA 1 and has not deconfigured it yet.

Send 11k offload disable command as part of RSO Stop during disconnect
to the FW so that it deconfigures 11k for the currently enabled STA
and re-configures for the second STA without assertion.

Change-Id: I8a1bcb8906c809f451f7ab3df3e4c671cef062fd
CRs-Fixed: 2208649
Vignesh Viswanathan 7 лет назад
Родитель
Сommit
e25af7882c
2 измененных файлов с 47 добавлено и 7 удалено
  1. 24 5
      core/sme/src/csr/csr_api_roam.c
  2. 23 2
      core/wma/src/wma_scan_roam.c

+ 24 - 5
core/sme/src/csr/csr_api_roam.c

@@ -18474,6 +18474,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
  * @mac_ctx: MAC context
  * @session: Pointer to the CSR Roam Session
  * @req_buffer: Pointer to the RSO Request buffer
+ * @enabled: 11k offload enabled/disabled.
  *
  * API to update 11k offload params to Roam Scan Offload request buffer
  *
@@ -18481,7 +18482,8 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
  */
 static void csr_update_11k_offload_params(tpAniSirGlobal mac_ctx,
 					  struct csr_roam_session *session,
-					  tSirRoamOffloadScanReq *req_buffer)
+					  tSirRoamOffloadScanReq *req_buffer,
+					  bool enabled)
 {
 	struct wmi_11k_offload_params *params = &req_buffer->offload_11k_params;
 	struct csr_config *csr_config = &mac_ctx->roam.configParam;
@@ -18489,7 +18491,15 @@ static void csr_update_11k_offload_params(tpAniSirGlobal mac_ctx,
 		&csr_config->neighbor_report_offload;
 
 	params->vdev_id = session->sessionId;
-	params->offload_11k_bitmask = csr_config->offload_11k_enable_bitmask;
+
+	if (enabled) {
+		params->offload_11k_bitmask =
+				csr_config->offload_11k_enable_bitmask;
+	} else {
+		params->offload_11k_bitmask = 0;
+		sme_debug("11k offload disabled in RSO");
+		return;
+	}
 
 	/*
 	 * If none of the parameters are enabled, then set the
@@ -18501,6 +18511,7 @@ static void csr_update_11k_offload_params(tpAniSirGlobal mac_ctx,
 		sme_err("No valid neighbor report offload params %x",
 			neighbor_report_offload->params_bitmask);
 		params->offload_11k_bitmask = 0;
+		return;
 	}
 
 	/*
@@ -19538,11 +19549,19 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id,
 		csr_update_driver_assoc_ies(mac_ctx, session, req_buf);
 		csr_update_score_params(mac_ctx, req_buf);
 		csr_update_fils_params_rso(mac_ctx, session, req_buf);
-		if (reason == REASON_CTX_INIT)
-			csr_update_11k_offload_params(mac_ctx, session,
-						      req_buf);
 	}
 
+	/*
+	 * 11k offload is enabled during RSO Start after connect indication and
+	 * 11k offload is disabled during RSO Stop after disconnect indication
+	 */
+	if (command == ROAM_SCAN_OFFLOAD_START &&
+	    reason == REASON_CTX_INIT)
+		csr_update_11k_offload_params(mac_ctx, session, req_buf, TRUE);
+	else if (command == ROAM_SCAN_OFFLOAD_STOP &&
+		 reason == REASON_DISCONNECTED)
+		csr_update_11k_offload_params(mac_ctx, session, req_buf, FALSE);
+
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			"Assoc IE buffer:");
 	QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,

+ 23 - 2
core/wma/src/wma_scan_roam.c

@@ -1378,7 +1378,11 @@ QDF_STATUS wma_send_offload_11k_params(WMA_HANDLE handle,
 		return QDF_STATUS_E_NOSUPPORT;
 	}
 
-	if (!params->neighbor_report_params.ssid.length) {
+	/*
+	 * If 11k enable command and ssid length is 0, drop it
+	 */
+	if (params->offload_11k_bitmask &&
+	    !params->neighbor_report_params.ssid.length) {
 		WMA_LOGD("%s: SSID Len 0", __func__);
 		return QDF_STATUS_E_INVAL;
 	}
@@ -1534,11 +1538,14 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 			break;
 		}
 
+		/*
+		 * Send 11k offload enable to FW as part of RSO Start
+		 */
 		if (roam_req->reason == REASON_CTX_INIT) {
 			qdf_status = wma_send_offload_11k_params(wma_handle,
 						&roam_req->offload_11k_params);
 			if (qdf_status != QDF_STATUS_SUCCESS) {
-				WMA_LOGE("11k offload params not sent, status %d",
+				WMA_LOGE("11k offload enable not sent, status %d",
 					 qdf_status);
 				break;
 			}
@@ -1573,6 +1580,20 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 				WMA_LOGD("Dont send RSO stop during roam sync");
 				break;
 		}
+
+		/*
+		 * Send 11k offload disable command to FW as part of RSO Stop
+		 */
+		if (roam_req->reason == REASON_DISCONNECTED) {
+			qdf_status = wma_send_offload_11k_params(wma_handle,
+						&roam_req->offload_11k_params);
+			if (qdf_status != QDF_STATUS_SUCCESS) {
+				WMA_LOGE("11k offload disable not sent, status %d",
+					 qdf_status);
+				break;
+			}
+		}
+
 		wma_handle->suitable_ap_hb_failure = false;
 		if (wma_handle->roam_offload_enabled) {
 			uint32_t mode;