qcacmn: Remove duplicate (ext)service ready structures from WMI

Object manager psoc service ready api provides host (ext)service ready
data structures hence remove duplicate copy from wmi_unified_param.h
and change WMI to use psoc service ready data structures.

Change-Id: Iaec20e9b818077ed1ca58754c4b1bc6deaedd761
CRs-Fixed: 2002016
diff --git a/wmi_unified_api.h b/wmi_unified_api.h
index f4fb89e..d37ac65 100644
--- a/wmi_unified_api.h
+++ b/wmi_unified_api.h
@@ -1065,10 +1065,11 @@
 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
 
 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
-				void *evt_buf, target_capability_info *ev);
+				void *evt_buf,
+				struct wlan_psoc_target_capability_info *ev);
 
 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
-				TARGET_HAL_REG_CAPABILITIES *hal_reg_cap);
+			struct wlan_psoc_hal_reg_capability *hal_reg_cap);
 
 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
 				void *evt_buf, uint8_t *num_entries);
@@ -1325,22 +1326,21 @@
 					struct rx_reorder_queue_remove_params *param);
 
 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
-		struct wmi_host_service_ext_param *param);
+		struct wlan_psoc_host_service_ext_param *param);
 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
 			void *wmi_hdl,
 			uint8_t *evt_buf, uint8_t hw_mode_idx,
-			struct wmi_host_hw_mode_caps *param);
+			struct wlan_psoc_host_hw_mode_caps *param);
 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
 			void *wmi_hdl,
 			uint8_t *evt_buf,
 			uint8_t hw_mode_id,
 			uint8_t phy_id,
-			struct wmi_host_mac_phy_caps *param);
+			struct wlan_psoc_host_mac_phy_caps *param);
 QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
 			void *wmi_hdl,
 			uint8_t *evt_buf, uint8_t phy_idx,
-			struct WMI_HOST_HAL_REG_CAPABILITIES_EXT *param);
-
+			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
 				      uint8_t *evt_buf,
 				      struct wmi_host_pdev_utf_event *param);
diff --git a/wmi_unified_param.h b/wmi_unified_param.h
index e1e71a4..d1de13c 100644
--- a/wmi_unified_param.h
+++ b/wmi_unified_param.h
@@ -3372,24 +3372,6 @@
 };
 
 /**
- * struct TARGET_HAL_REG_CAPABILITIES - This is replication of REG table
- *     structure defined by target. This is added here to remove dependency
- *     on FW headers so that host can be agnostic to different defintions in
- *     both the targets.
- */
-typedef struct {
-	uint32_t eeprom_rd;	/* regdomain value specified in EEPROM */
-	uint32_t eeprom_rd_ext;  /* regdomain */
-	uint32_t regcap1;	/* CAP1 capabilities bit map */
-	uint32_t regcap2;	/* REGDMN EEPROM CAP */
-	uint32_t wireless_modes; /* REGDMN MODE */
-	uint32_t low_2ghz_chan;
-	uint32_t high_2ghz_chan;
-	uint32_t low_5ghz_chan;
-	uint32_t high_5ghz_chan;
-} TARGET_HAL_REG_CAPABILITIES;
-
-/**
  * struct host_mem_req - Host memory request paramseters request by target
  * @req_id: Request id to identify the request.
  * @unit_size: Size of single unit requested.
@@ -5411,46 +5393,6 @@
 #define WMI_SERVICE_UNAVAILABLE 0xFFFF
 
 /**
- * struct target_capability_info - Target capabilities in service ready
- * @phy_capability: PHY capabilities
- * @max_frag_entry: Maximum frag entries
- * @num_rf_chains: Number of RF chains supported
- * @ht_cap_info: HT cap info
- * @vht_cap_info: VHT cap info
- * @vht_supp_mcs: VHT Supported MCS
- * @hw_min_tx_power: HW minimum tx power
- * @hw_max_tx_power: HW maximum tx power
- * @sys_cap_info: sys capability info
- * @min_pkt_size_enable: Enterprise mode short pkt enable
- * @max_bcn_ie_size: Max beacon and probe rsp IE offload size
- * @max_num_scan_channels: Max scan channels
- * @max_supported_macs: max supported MCS
- * @wmi_fw_sub_feat_caps: FW sub feature capabilities
- * @txrx_chainmask: TXRX chain mask
- * @default_dbs_hw_mode_index: DBS hw mode index
- * @num_msdu_desc: number of msdu desc
- */
-typedef struct {
-	uint32_t	phy_capability;
-	uint32_t	max_frag_entry;
-	uint32_t	num_rf_chains;
-	uint32_t	ht_cap_info;
-	uint32_t	vht_cap_info;
-	uint32_t	vht_supp_mcs;
-	uint32_t	hw_min_tx_power;
-	uint32_t	hw_max_tx_power;
-	uint32_t	sys_cap_info;
-	uint32_t	min_pkt_size_enable;
-	uint32_t	max_bcn_ie_size;
-	uint32_t	max_num_scan_channels;
-	uint32_t	max_supported_macs;
-	uint32_t	wmi_fw_sub_feat_caps;
-	uint32_t	txrx_chainmask;
-	uint32_t	default_dbs_hw_mode_index;
-	uint32_t	num_msdu_desc;
-} target_capability_info;
-
-/**
  * enum WMI_DBG_PARAM - Debug params
  * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel
  * @WMI_DBGLOG_VAP_ENABLE:  Enable VAP level debug
@@ -7049,155 +6991,6 @@
 	WMI_HOST_HW_MODE_MAX,
 };
 
-/**
- * struct wmi_host_service_ext_param - EXT service base params in event
- * @default_conc_scan_config_bits: Default concurrenct scan config
- * @default_fw_config_bits: Default HW config bits
- * @wmi_host_ppe_threshold ppet: Host PPE threshold struct
- * @he_cap_info: HE capabality info
- * @mpdu_density: units are microseconds
- * @max_bssid_rx_filters: Maximum no of BSSID based RX filters host can program
- *                        Value 0 means FW hasn't given any limit to host.
- * @num_hw_modes: Number of HW modes in event
- * @num_phy: Number of Phy mode.
- */
-struct wmi_host_service_ext_param {
-	uint32_t default_conc_scan_config_bits;
-	uint32_t default_fw_config_bits;
-	struct wmi_host_ppe_threshold ppet;
-	uint32_t he_cap_info;
-	uint32_t mpdu_density;
-	uint32_t max_bssid_rx_filters;
-	uint32_t num_hw_modes;
-	uint32_t num_phy;
-};
-
-/**
- * struct wmi_host_hw_mode_caps - HW mode capabilities in EXT event
- * @hw_mode_id: identify a particular set of HW characteristics,
- *              as specified by the subsequent fields
- * @phy_id_map: BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
- * @hw_mode_config_type: HW mode config type
- */
-struct wmi_host_hw_mode_caps {
-	uint32_t hw_mode_id;
-	uint32_t phy_id_map;
-	uint32_t hw_mode_config_type;
-};
-
-/**
- * struct wmi_host_mac_phy_caps - Phy caps recvd in EXT service
- *  @hw_mode_id: identify a particular set of HW characteristics,
- *        as specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES
- *        element must be mapped to its parent WMI_HW_MODE_CAPABILITIES
- *        element using hw_mode_id. No particular ordering of
- *        WMI_MAC_PHY_CAPABILITIES elements should be
- *        assumed, though in practice the elements may always be ordered
- *        by hw_mode_id.
- * @pdev_id: pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
- * @phy_id: Starts with 0
- * @bitmap of supported modulations
- * @supported_bands: supported bands, enum WLAN_BAND_CAPABILITY (mapped to
- *        enum WMI_HOST_WLAN_BAND_CAPABILITY within host)
- * @ampdu_density: ampdu density 0 for no restriction, 1 for 1/4 us,
- *        2 for 1/2 us, 3 for 1 us,4 for 2 us, 5 for 4 us,
- *        6 for 8 us,7 for 16 us
- * @max_bw_supported_2G: max bw supported 2G, enum wmi_channel_width (mapped to
- *        enum wmi_host_channel_width within host)
- * @ht_cap_info_2G: WMI HT Capability, WMI_HT_CAP defines
- * @vht_cap_info_2G: VHT capability info field of 802.11ac, WMI_VHT_CAP defines
- * @vht_supp_mcs_2G: VHT Supported MCS Set field Rx/Tx same
- *        The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
- *        follows
- *         - 0 indicates support for VHT-MCS 0-7 for n spatial streams
- *         - 1 indicates support for VHT-MCS 0-8 for n spatial streams
- *         - 2 indicates support for VHT-MCS 0-9 for n spatial streams
- *         - 3 indicates that n spatial streams is not supported
- * @he_cap_info_2G: HE capability info field of 802.11ax, WMI_HE_CAP defines
- * @he_supp_mcs_2G: HE Supported MCS Set field Rx/Tx same
- * @tx_chain_mask_2G: Valid Transmit chain mask
- * @rx_chain_mask_2G: Valid Receive chain mask
- * @max_bw_supported_5G: max bw supported 5G, enum wmi_channel_width (mapped to
- *        enum wmi_host_channel_width within host)
- * @ht_cap_info_5G: WMI HT Capability, WMI_HT_CAP defines
- * @vht_cap_info_5G: VHT capability info field of 802.11ac, WMI_VHT_CAP defines
- * @vht_supp_mcs_5G: VHT Supported MCS Set field Rx/Tx same
- *        The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
- *        follows
- *        - 0 indicates support for VHT-MCS 0-7 for n spatial streams
- *        - 1 indicates support for VHT-MCS 0-8 for n spatial streams
- *        - 2 indicates support for VHT-MCS 0-9 for n spatial streams
- *        - 3 indicates that n spatial streams is not supported
- * @he_cap_info_5G: HE capability info field of 802.11ax, WMI_HE_CAP defines
- * @he_supp_mcs_5G: HE Supported MCS Set field Rx/Tx same
- * @tx_chain_mask_5G: Valid Transmit chain mask
- * @rx_chain_mask_5G: Valid Receive chain mask
- * @he_cap_phy_info_2G: 2G HE capability phy field
- * @he_cap_phy_info_5G: 5G HE capability phy field
- * @he_ppet2G: 2G HE PPET info
- * @he_ppet5G: 5G HE PPET info
- */
-struct wmi_host_mac_phy_caps {
-	uint32_t hw_mode_id;
-	uint32_t pdev_id;
-	uint32_t phy_id;
-	uint32_t supports_11b:1,
-		 supports_11g:1,
-		 supports_11a:1,
-		 supports_11n:1,
-		 supports_11ac:1,
-		 supports_11ax:1;
-	uint32_t supported_bands;
-	uint32_t ampdu_density;
-	uint32_t max_bw_supported_2G;
-	uint32_t ht_cap_info_2G;
-	uint32_t vht_cap_info_2G;
-	uint32_t vht_supp_mcs_2G;
-	uint32_t he_cap_info_2G;
-	uint32_t he_supp_mcs_2G;
-	uint32_t tx_chain_mask_2G;
-	uint32_t rx_chain_mask_2G;
-	uint32_t max_bw_supported_5G;
-	uint32_t ht_cap_info_5G;
-	uint32_t vht_cap_info_5G;
-	uint32_t vht_supp_mcs_5G;
-	uint32_t he_cap_info_5G;
-	uint32_t he_supp_mcs_5G;
-	uint32_t tx_chain_mask_5G;
-	uint32_t rx_chain_mask_5G;
-	uint32_t he_cap_phy_info_2G[WMI_HOST_MAX_HECAP_PHY_SIZE];
-	uint32_t he_cap_phy_info_5G[WMI_HOST_MAX_HECAP_PHY_SIZE];
-	struct wmi_host_ppe_threshold he_ppet2G;
-	struct wmi_host_ppe_threshold he_ppet5G;
-};
-
-/**
- * struct WMI_HOST_HAL_REG_CAPABILITIES_EXT: Below are Reg caps per PHY.
- *                       Please note PHY ID starts with 0.
- * @phy_id: phy id starts with 0.
- * @eeprom_reg_domain: regdomain value specified in EEPROM
- * @eeprom_reg_domain_ext: regdomain
- * @regcap1: CAP1 capabilities bit map, see REGDMN_CAP1_ defines
- * @regcap2: REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines
- * @wireless_modes: REGDMN MODE, see REGDMN_MODE_ enum
- * @low_2ghz_chan: 2G channel low
- * @high_2ghz_chan: 2G channel High
- * @low_5ghz_chan: 5G channel low
- * @high_5ghz_chan: 5G channel High
- */
-struct WMI_HOST_HAL_REG_CAPABILITIES_EXT {
-	uint32_t phy_id;
-	uint32_t eeprom_reg_domain;
-	uint32_t eeprom_reg_domain_ext;
-	uint32_t regcap1;
-	uint32_t regcap2;
-	uint32_t wireless_modes;
-	uint32_t low_2ghz_chan;
-	uint32_t high_2ghz_chan;
-	uint32_t low_5ghz_chan;
-	uint32_t high_5ghz_chan;
-};
-
 /*
  * struct wmi_host_peer_txmu_cnt_event
  * @tx_mu_transmitted - MU-MIMO tx count
diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h
index 673972f..e214026 100644
--- a/wmi_unified_priv.h
+++ b/wmi_unified_priv.h
@@ -35,6 +35,7 @@
 #include "a_types.h"
 #include "wmi_unified_param.h"
 #include "qdf_atomic.h"
+#include "wlan_objmgr_psoc_service_ready_api.h"
 
 #define WMI_UNIFIED_MAX_EVENT 0x100
 #ifdef CONFIG_MCL
@@ -914,7 +915,7 @@
 bool (*is_service_enabled)(wmi_unified_t wmi_handle,
 	uint32_t service_id);
 QDF_STATUS (*get_target_cap_from_service_ready)(wmi_unified_t wmi_handle,
-	void *evt_buf, target_capability_info *ev);
+	void *evt_buf, struct wlan_psoc_target_capability_info *ev);
 
 QDF_STATUS (*extract_fw_version)(wmi_unified_t wmi_handle,
 				void *ev, struct wmi_host_fw_ver *fw_ver);
@@ -923,7 +924,7 @@
 				void *ev, struct wmi_host_fw_abi_ver *fw_ver);
 
 QDF_STATUS (*extract_hal_reg_cap)(wmi_unified_t wmi_handle, void *evt_buf,
-	TARGET_HAL_REG_CAPABILITIES *hal_reg_cap);
+	struct wlan_psoc_hal_reg_capability *hal_reg_cap);
 
 host_mem_req * (*extract_host_mem_req)(wmi_unified_t wmi_handle,
 	void *evt_buf, uint8_t *num_entries);
@@ -1205,24 +1206,24 @@
 
 QDF_STATUS (*extract_service_ready_ext)(wmi_unified_t wmi_handle,
 			uint8_t *evt_buf,
-			struct wmi_host_service_ext_param *param);
+			struct wlan_psoc_host_service_ext_param *param);
 
 QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
 			wmi_unified_t wmi_handle,
 			uint8_t *evt_buf, uint8_t hw_mode_idx,
-			struct wmi_host_hw_mode_caps *param);
+			struct wlan_psoc_host_hw_mode_caps *param);
 
 QDF_STATUS (*extract_mac_phy_cap_service_ready_ext)(
 			wmi_unified_t wmi_handle,
 			uint8_t *evt_buf,
 			uint8_t hw_mode_id,
 			uint8_t phy_id,
-			struct wmi_host_mac_phy_caps *param);
+			struct wlan_psoc_host_mac_phy_caps *param);
 
 QDF_STATUS (*extract_reg_cap_service_ready_ext)(
 			wmi_unified_t wmi_handle,
 			uint8_t *evt_buf, uint8_t phy_idx,
-			struct WMI_HOST_HAL_REG_CAPABILITIES_EXT *param);
+			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
 
 QDF_STATUS (*extract_pdev_utf_event)(wmi_unified_t wmi_hdl,
 				     uint8_t *evt_buf,