Browse Source

qcacld-3.0: Stop roam timer when receiving deauth roam event

Stop roam timer when receiving deauth roam event as FW suggests,
otherwise roam timer will be timeout.

Change-Id: I5dad9cea21b4b1c701904ec1efdc39b9b6a34bd8
CRs-Fixed: 2497029
bings 5 years ago
parent
commit
fe33a7c071
3 changed files with 16 additions and 0 deletions
  1. 2 0
      core/mac/inc/sir_api.h
  2. 5 0
      core/sme/src/csr/csr_api_roam.c
  3. 9 0
      core/wma/src/wma_scan_roam.c

+ 2 - 0
core/mac/inc/sir_api.h

@@ -148,6 +148,7 @@ struct scheduler_msg;
  * @SIR_ROAMING_ABORT: Firmware aborted roaming operation, still connected.
  * @SIR_ROAM_SYNCH_COMPLETE: Roam sync propagation is complete.
  * @SIR_ROAMING_INVOKE_FAIL: Firmware roaming failed.
+ * @SIR_ROAMING_DEAUTH: Firmware indicates deauth.
  */
 enum sir_roam_op_code {
 	SIR_ROAM_SYNCH_PROPAGATION = 1,
@@ -157,6 +158,7 @@ enum sir_roam_op_code {
 	SIR_ROAM_SYNCH_COMPLETE,
 	SIR_ROAM_SYNCH_NAPI_OFF,
 	SIR_ROAMING_INVOKE_FAIL,
+	SIR_ROAMING_DEAUTH,
 };
 /**
  * Module ID definitions.

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

@@ -21447,6 +21447,11 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 				       eCSR_ROAM_RESULT_SUCCESS);
 		vdev_roam_params->roam_invoke_in_progress = false;
 		goto end;
+	case SIR_ROAMING_DEAUTH:
+		sme_debug("LFR3: callback reason %d", reason);
+		csr_roam_roaming_offload_timer_action(
+			mac_ctx, 0, session_id, ROAMING_OFFLOAD_TIMER_STOP);
+		goto end;
 	default:
 		sme_debug("LFR3: callback reason %d", reason);
 		status = QDF_STATUS_E_FAILURE;

+ 9 - 0
core/wma/src/wma_scan_roam.c

@@ -5408,6 +5408,15 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
 		wma_handle->pe_disconnect_cb(wma_handle->mac_context,
 					     wmi_event->vdev_id,
 					     frame, wmi_event->notif_params1);
+		roam_synch_data = qdf_mem_malloc(sizeof(*roam_synch_data));
+		if (!roam_synch_data)
+			return -ENOMEM;
+
+		roam_synch_data->roamed_vdev_id = wmi_event->vdev_id;
+		wma_handle->csr_roam_synch_cb(
+				wma_handle->mac_context,
+				roam_synch_data, NULL, SIR_ROAMING_DEAUTH);
+		qdf_mem_free(roam_synch_data);
 		break;
 	default:
 		WMA_LOGD("%s:Unhandled Roam Event %x for vdevid %x", __func__,