瀏覽代碼

qcacld-3.0: Fix to OEM sync and async event handle

Presently host don't know whether event is rsp to the command
or async event from FW.

Handling req and async events with new enum
wmi_oem_data_evt_cause added in FW to represent event causes,
WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED,
WMI_OEM_DATA_EVT_CAUSE_CMD_REQ,
WMI_OEM_DATA_EVT_CAUSE_ASYNC.

Change-Id: I31a3f415fed64dc6231ca0eb29de5b80c94493f3
CRs-Fixed: 3305281
Vinod Kumar Myadam 2 年之前
父節點
當前提交
58830e2f7b
共有 1 個文件被更改,包括 20 次插入5 次删除
  1. 20 5
      core/wma/src/wma_utils.c

+ 20 - 5
core/wma/src/wma_utils.c

@@ -5039,11 +5039,26 @@ int wma_oem_event_handler(void *wma_ctx, uint8_t *event_buff, uint32_t len)
 		oem_event_data.file_name_len = param_buf->num_file_name;
 	}
 
-	if (pmac->sme.oem_data_event_handler_cb)
-		pmac->sme.oem_data_event_handler_cb(&oem_event_data,
-						    pmac->sme.oem_data_vdev_id);
-	else if (pmac->sme.oem_data_async_event_handler_cb)
-		pmac->sme.oem_data_async_event_handler_cb(&oem_event_data);
+	if (event->event_cause == WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED) {
+		if (pmac->sme.oem_data_event_handler_cb)
+			pmac->sme.oem_data_event_handler_cb(
+					&oem_event_data,
+					pmac->sme.oem_data_vdev_id);
+		else if (pmac->sme.oem_data_async_event_handler_cb)
+			pmac->sme.oem_data_async_event_handler_cb(
+					&oem_event_data);
+	} else if (event->event_cause == WMI_OEM_DATA_EVT_CAUSE_CMD_REQ) {
+		if (pmac->sme.oem_data_event_handler_cb)
+			pmac->sme.oem_data_event_handler_cb(
+					&oem_event_data,
+					pmac->sme.oem_data_vdev_id);
+	} else if (event->event_cause == WMI_OEM_DATA_EVT_CAUSE_ASYNC) {
+		if (pmac->sme.oem_data_async_event_handler_cb)
+			pmac->sme.oem_data_async_event_handler_cb(
+					&oem_event_data);
+	} else {
+		return QDF_STATUS_E_FAILURE;
+	}
 
 	return QDF_STATUS_SUCCESS;
 }