Bladeren bron

qcacmn: Replace mac_id with pdev_id in WMI PDEV commands

Replace mac_id with pdev_id for WMI pdev commands and
vdev start response handler to support multi-radio in
converged firmware. In order to maintain backward
compatibility with old fw, host needs to check
WMI_SERVICE_DEPRECATED_REPLACE service id in service
bitmap and needs to fill pdev id or mac id accordingly.

Change-Id: I7e6b40b4c0bd20e967dc0a383b480068e256486f
CRs-Fixed: 994415
Govind Singh 9 jaren geleden
bovenliggende
commit
01d950eb71
5 gewijzigde bestanden met toevoegingen van 17 en 8 verwijderingen
  1. 2 1
      wmi/inc/wmi_unified_api.h
  2. 2 1
      wmi/inc/wmi_unified_priv.h
  3. 2 1
      wmi/inc/wmi_unified_tlv.h
  4. 3 2
      wmi/src/wmi_unified_api.c
  5. 8 3
      wmi/src/wmi_unified_tlv.c

+ 2 - 1
wmi/inc/wmi_unified_api.h

@@ -448,7 +448,8 @@ QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd
 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
 
 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
-		   void *wmi_hdl, uint32_t mcc_adaptive_scheduler);
+		   void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
+		   uint32_t pdev_id);
 
 #ifndef WMI_NON_TLV_SUPPORT
 QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,

+ 2 - 1
wmi/inc/wmi_unified_priv.h

@@ -249,7 +249,8 @@ QDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
 
 QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
-		   wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler);
+		  wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
+		  uint32_t pdev_id);
 
 QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
 				    A_UINT32 vdev_id, uint8_t *p2p_ie);

+ 2 - 1
wmi/inc/wmi_unified_tlv.h

@@ -200,7 +200,8 @@ QDF_STATUS send_set_mcc_channel_time_latency_cmd_tlv
 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
 
 QDF_STATUS send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
-		   wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler);
+		wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
+		uint32_t pdev_id);
 
 QDF_STATUS send_p2p_go_set_beacon_ie_cmd_tlv(wmi_unified_t wmi_handle,
 				    A_UINT32 vdev_id, uint8_t *p2p_ie);

+ 3 - 2
wmi/src/wmi_unified_api.c

@@ -1099,13 +1099,14 @@ QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
  * Return: QDF_STATUS_SUCCESS for sucess or error code
  */
 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
-		void *wmi_hdl, uint32_t mcc_adaptive_scheduler)
+		void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
+		uint32_t pdev_id)
 {
 	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
 
 	if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
 		return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
-					mcc_adaptive_scheduler);
+					mcc_adaptive_scheduler, pdev_id);
 
 	return QDF_STATUS_E_FAILURE;
 }

+ 8 - 3
wmi/src/wmi_unified_tlv.c

@@ -63,6 +63,7 @@ QDF_STATUS send_vdev_create_cmd_tlv(wmi_unified_t wmi_handle,
 	cmd->vdev_id = param->if_id;
 	cmd->vdev_type = param->type;
 	cmd->vdev_subtype = param->subtype;
+	cmd->pdev_id = WMI_PDEV_ID_SOC;
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->vdev_macaddr);
 	WMI_LOGD("%s: ID = %d VAP Addr = %02x:%02x:%02x:%02x:%02x:%02x",
 		 __func__, param->if_id,
@@ -806,7 +807,7 @@ QDF_STATUS send_resume_cmd_tlv(wmi_unified_t wmi_handle,
 		       WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param,
 		       WMITLV_GET_STRUCT_TLVLEN
 			       (wmi_pdev_resume_cmd_fixed_param));
-	cmd->pdev_id = 0;
+	cmd->pdev_id = WMI_PDEV_ID_SOC;
 	ret = wmi_unified_cmd_send(wmi_handle, wmibuf, sizeof(*cmd),
 				   WMI_PDEV_RESUME_CMDID);
 	if (QDF_IS_STATUS_ERROR(ret)) {
@@ -2693,7 +2694,8 @@ QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
  * Return: QDF_STATUS_SUCCESS for sucess or error code
  */
 QDF_STATUS send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
-		   wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler)
+		wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
+		uint32_t pdev_id)
 {
 	QDF_STATUS ret;
 	wmi_buf_t buf = 0;
@@ -2714,6 +2716,7 @@ QDF_STATUS send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
 		       WMITLV_GET_STRUCT_TLVLEN
 			       (wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param));
 	cmd->enable = mcc_adaptive_scheduler;
+	cmd->pdev_id = pdev_id;
 
 	ret = wmi_unified_cmd_send(wmi_handle, buf, len,
 				   WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
@@ -6789,6 +6792,7 @@ QDF_STATUS send_pktlog_wmi_send_cmd_tlv(wmi_unified_t wmi_handle,
 		       WMITLV_GET_STRUCT_TLVLEN
 		       (wmi_pdev_pktlog_enable_cmd_fixed_param));
 		cmd->evlist = PKTLOG_EVENT;
+		cmd->pdev_id = WMI_PDEV_ID_SOC;
 		if (wmi_unified_cmd_send(wmi_handle, buf, len,
 					 WMI_PDEV_PKTLOG_ENABLE_CMDID)) {
 			WMI_LOGE("failed to send pktlog enable cmdid");
@@ -6808,7 +6812,7 @@ QDF_STATUS send_pktlog_wmi_send_cmd_tlv(wmi_unified_t wmi_handle,
 		     WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param,
 		     WMITLV_GET_STRUCT_TLVLEN
 		     (wmi_pdev_pktlog_disable_cmd_fixed_param));
-		disable_cmd->pdev_id = 0;
+		disable_cmd->pdev_id = WMI_PDEV_ID_SOC;
 		if (wmi_unified_cmd_send(wmi_handle, buf, len,
 					 WMI_PDEV_PKTLOG_DISABLE_CMDID)) {
 			WMI_LOGE("failed to send pktlog disable cmdid");
@@ -8969,6 +8973,7 @@ QDF_STATUS send_set_base_macaddr_indicate_cmd_tlv(wmi_unified_t wmi_handle,
 		       WMITLV_GET_STRUCT_TLVLEN
 			       (wmi_pdev_set_base_macaddr_cmd_fixed_param));
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(custom_addr, &cmd->base_macaddr);
+	cmd->pdev_id = WMI_PDEV_ID_SOC;
 	err = wmi_unified_cmd_send(wmi_handle, buf,
 				   sizeof(*cmd),
 				   WMI_PDEV_SET_BASE_MACADDR_CMDID);