Explorar el Código

qcacmn: WMI service ready convergence changes

Converge on common WMI event handling for (ext)service ready
such that common PSOC object can be populated after common parsing.
Legacy (ext)service ready handlers continue to co-exist to support
legacy modules. Legacy service ready handlers can be removed once
legacy modules are also componentized and start using new object
model of PSOC, PDEV, VDEV and PEER.

To support multiple SoCs register for various psoc objects via legacy
callback registration routine during psoc probe and populate common
psoc object once WMI (ext)service ready event is parsed.

CRs-Fixed: 1110768
Change-Id: I966b8f7c775a19ac6e51ad5217a2dd0287acfada
Rajeev Kumar hace 8 años
padre
commit
7790147799
Se han modificado 3 ficheros con 28 adiciones y 7 borrados
  1. 4 2
      wmi_unified_api.c
  2. 7 1
      wmi_unified_non_tlv.c
  3. 17 4
      wmi_unified_tlv.c

+ 4 - 2
wmi_unified_api.c

@@ -4604,12 +4604,14 @@ QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf)
+QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
+				   void *bitmap_buf)
 {
 	struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
 
 	if (wmi_handle->ops->save_service_bitmap) {
-		wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf);
+		wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
+						     bitmap_buf);
 		return 0;
 	}
 	return QDF_STATUS_E_FAILURE;

+ 7 - 1
wmi_unified_non_tlv.c

@@ -5405,10 +5405,12 @@ static QDF_STATUS send_ext_resource_config_non_tlv(wmi_unified_t wmi_handle,
  * save_service_bitmap_non_tlv() - save service bitmap
  * @wmi_handle: wmi handle
  * @param evt_buf: pointer to event buffer
+ * @param bitmap_buf: bitmap buffer for converged legacy support
  *
  * Return: None
  */
-static void save_service_bitmap_non_tlv(wmi_unified_t wmi_handle, void *evt_buf)
+static void save_service_bitmap_non_tlv(wmi_unified_t wmi_handle,
+				 void *evt_buf, void *bitmap_buf)
 {
 	wmi_service_ready_event *ev;
 
@@ -5416,6 +5418,10 @@ static void save_service_bitmap_non_tlv(wmi_unified_t wmi_handle, void *evt_buf)
 
 	qdf_mem_copy(wmi_handle->wmi_service_bitmap, ev->wmi_service_bitmap,
 				(WMI_SERVICE_BM_SIZE * sizeof(uint32_t)));
+
+	if (bitmap_buf)
+		qdf_mem_copy(bitmap_buf, ev->wmi_service_bitmap,
+				(WMI_SERVICE_BM_SIZE * sizeof(uint32_t)));
 }
 
 /**

+ 17 - 4
wmi_unified_tlv.c

@@ -11920,12 +11920,14 @@ static QDF_STATUS init_cmd_send_tlv(wmi_unified_t wmi_handle,
  * save_service_bitmap_tlv() - save service bitmap
  * @wmi_handle: wmi handle
  * @param evt_buf: pointer to event buffer
+ * @param bitmap_buf: bitmap buffer, for converged legacy support
  *
  * Return: None
  */
 #ifndef CONFIG_MCL
 static
-void save_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf)
+void save_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf,
+			     void *bitmap_buf)
 {
 	WMI_SERVICE_READY_EVENTID_param_tlvs *param_buf;
 	param_buf = (WMI_SERVICE_READY_EVENTID_param_tlvs *) evt_buf;
@@ -11933,14 +11935,25 @@ void save_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf)
 	qdf_mem_copy(wmi_handle->wmi_service_bitmap,
 			param_buf->wmi_service_bitmap,
 			(WMI_SERVICE_BM_SIZE * sizeof(uint32_t)));
+
+	if (bitmap_buf)
+		qdf_mem_copy(bitmap_buf,
+			     param_buf->wmi_service_bitmap,
+			     (WMI_SERVICE_BM_SIZE * sizeof(uint32_t)));
 }
 #else
 static
-void save_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf)
+void save_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf,
+			     void *bitmap_buf)
 {
-	return;
-}
+	WMI_SERVICE_READY_EVENTID_param_tlvs *param_buf;
+	param_buf = (WMI_SERVICE_READY_EVENTID_param_tlvs *) evt_buf;
 
+	if (bitmap_buf)
+		qdf_mem_copy(bitmap_buf,
+			     param_buf->wmi_service_bitmap,
+			     (WMI_SERVICE_BM_SIZE * sizeof(uint32_t)));
+}
 #endif
 
 /**