qcacmn: Replace void * Host Target Communications handle with abstract type

Replace void * Host Target Communications handle with abstract type handles
provided by Host Target Communications component

Change-Id: I16ca87e4f9716791d340da2fda0a8a640fa2ec34
CRs-Fixed: 2487151
This commit is contained in:
Himanshu Batra
2019-07-10 12:36:06 +05:30
committed by nshrivas
父節點 115309a008
當前提交 032d352263
共有 10 個文件被更改,包括 33 次插入33 次删除

查看文件

@@ -1243,7 +1243,7 @@ cdp_soc_detach(ol_txrx_soc_handle soc)
*/ */
static inline ol_txrx_soc_handle static inline ol_txrx_soc_handle
cdp_soc_init(ol_txrx_soc_handle soc, u_int16_t devid, void *hif_handle, cdp_soc_init(ol_txrx_soc_handle soc, u_int16_t devid, void *hif_handle,
void *psoc, void *htc_handle, qdf_device_t qdf_dev, void *psoc, HTC_HANDLE htc_handle, qdf_device_t qdf_dev,
struct ol_if_ops *dp_ol_if_ops) struct ol_if_ops *dp_ol_if_ops)
{ {
if (!soc || !soc->ops) { if (!soc || !soc->ops) {

查看文件

@@ -82,9 +82,10 @@ void *dp_soc_init_wifi3(void *soc, void *ctrl_psoc, void *hif_handle,
} }
#endif /* QCA_WIFI_QCA8074 */ #endif /* QCA_WIFI_QCA8074 */
static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid, static inline ol_txrx_soc_handle cdp_soc_attach(
void *hif_handle, void *psoc, void *htc_handle, u_int16_t devid, void *hif_handle, void *psoc,
qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops) HTC_HANDLE htc_handle, qdf_device_t qdf_dev,
struct ol_if_ops *dp_ol_if_ops)
{ {
switch (devid) { switch (devid) {
case LITHIUM_DP: /*FIXME Add lithium devide IDs */ case LITHIUM_DP: /*FIXME Add lithium devide IDs */

查看文件

@@ -38,7 +38,13 @@ extern "C" {
#define HTC_HTT_TRANSFER_HDRSIZE 24 #define HTC_HTT_TRANSFER_HDRSIZE 24
typedef void *HTC_HANDLE; /*
* NOTE WELL: struct opaque_htc_handle is not defined anywhere. This
* reference is used to help ensure that a HTC_HANDLE is never used
* where a different handle type is expected
*/
struct opaque_htc_handle;
typedef struct opaque_htc_handle *HTC_HANDLE;
typedef uint16_t HTC_SERVICE_ID; typedef uint16_t HTC_SERVICE_ID;
@@ -691,7 +697,7 @@ struct ol_ath_htc_stats *ieee80211_ioctl_get_htc_stats(HTC_HANDLE
* *
* Return: htc_handle tx queue depth * Return: htc_handle tx queue depth
*/ */
int htc_get_tx_queue_depth(HTC_HANDLE *htc_handle, HTC_ENDPOINT_ID endpoint_id); int htc_get_tx_queue_depth(HTC_HANDLE htc_handle, HTC_ENDPOINT_ID endpoint_id);
#ifdef WLAN_FEATURE_FASTPATH #ifdef WLAN_FEATURE_FASTPATH
void htc_ctrl_msg_cmpl(HTC_HANDLE htc_pdev, HTC_ENDPOINT_ID htc_ep_id); void htc_ctrl_msg_cmpl(HTC_HANDLE htc_pdev, HTC_ENDPOINT_ID htc_ep_id);

查看文件

@@ -71,7 +71,7 @@ void htc_dump_counter_info(HTC_HANDLE HTCHandle)
__func__, target->ce_send_cnt, target->TX_comp_cnt)); __func__, target->ce_send_cnt, target->TX_comp_cnt));
} }
int htc_get_tx_queue_depth(HTC_HANDLE *htc_handle, HTC_ENDPOINT_ID endpoint_id) int htc_get_tx_queue_depth(HTC_HANDLE htc_handle, HTC_ENDPOINT_ID endpoint_id)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(htc_handle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(htc_handle);
HTC_ENDPOINT *endpoint = &target->endpoint[endpoint_id]; HTC_ENDPOINT *endpoint = &target->endpoint[endpoint_id];
@@ -2263,7 +2263,7 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,
htc_try_send(target, pEndpoint, NULL); htc_try_send(target, pEndpoint, NULL);
#else #else
if (pEndpoint->service_id == HTT_DATA_MSG_SVC) if (pEndpoint->service_id == HTT_DATA_MSG_SVC)
htc_send_data_pkt(target, NULL, 0); htc_send_data_pkt((HTC_HANDLE)target, NULL, 0);
else else
htc_try_send(target, pEndpoint, NULL); htc_try_send(target, pEndpoint, NULL);
#endif #endif

查看文件

@@ -111,7 +111,6 @@ struct host_fw_ver {
struct common_dbglog_handle; struct common_dbglog_handle;
struct common_hif_handle; struct common_hif_handle;
struct common_htc_handle;
struct common_accelerator_handle; struct common_accelerator_handle;
/** /**
@@ -125,7 +124,7 @@ struct common_accelerator_handle;
*/ */
struct comp_hdls { struct comp_hdls {
struct common_hif_handle *hif_hdl; struct common_hif_handle *hif_hdl;
struct common_htc_handle *htc_hdl; HTC_HANDLE htc_hdl;
struct wmi_unified *wmi_hdl; struct wmi_unified *wmi_hdl;
struct common_accelerator_handle *accelerator_hdl; struct common_accelerator_handle *accelerator_hdl;
struct common_dbglog_handle *dbglog_hdl; struct common_dbglog_handle *dbglog_hdl;
@@ -910,9 +909,9 @@ static inline struct common_hif_handle *target_psoc_get_hif_hdl
* *
* Return: void * Return: void
*/ */
static inline void target_psoc_set_htc_hdl static inline void target_psoc_set_htc_hdl(
(struct target_psoc_info *psoc_info, struct target_psoc_info *psoc_info,
struct common_htc_handle *htc_hdl) HTC_HANDLE htc_hdl)
{ {
if (!psoc_info) if (!psoc_info)
return; return;
@@ -928,7 +927,7 @@ static inline void target_psoc_set_htc_hdl
* *
* Return: htc_hdl * Return: htc_hdl
*/ */
static inline struct common_htc_handle *target_psoc_get_htc_hdl static inline HTC_HANDLE target_psoc_get_htc_hdl
(struct target_psoc_info *psoc_info) (struct target_psoc_info *psoc_info)
{ {
if (!psoc_info) if (!psoc_info)

查看文件

@@ -137,7 +137,7 @@ wmi_unified_t lmac_get_wmi_unified_hdl(struct wlan_objmgr_psoc *psoc);
* *
* Return: htc handler * Return: htc handler
*/ */
struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc); HTC_HANDLE lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc);
/** /**
* lmac_set_htc_hdl() - set htc handle * lmac_set_htc_hdl() - set htc handle
@@ -149,7 +149,7 @@ struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc);
* Return: void * Return: void
*/ */
void lmac_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void lmac_set_htc_hdl(struct wlan_objmgr_psoc *psoc,
struct common_htc_handle *htc_hdl); HTC_HANDLE htc_hdl);
/** /**
* lmac_get_hif_hdl() - get hif handle * lmac_get_hif_hdl() - get hif handle

查看文件

@@ -212,7 +212,7 @@ wmi_unified_t lmac_get_wmi_unified_hdl(struct wlan_objmgr_psoc *psoc)
} }
qdf_export_symbol(lmac_get_wmi_unified_hdl); qdf_export_symbol(lmac_get_wmi_unified_hdl);
struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc) HTC_HANDLE lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc)
{ {
struct target_psoc_info *tgt_hdl; struct target_psoc_info *tgt_hdl;
@@ -232,7 +232,7 @@ struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc)
qdf_export_symbol(lmac_get_htc_hdl); qdf_export_symbol(lmac_get_htc_hdl);
void lmac_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void lmac_set_htc_hdl(struct wlan_objmgr_psoc *psoc,
struct common_htc_handle *htc_hdl) HTC_HANDLE htc_hdl)
{ {
struct target_psoc_info *tgt_hdl; struct target_psoc_info *tgt_hdl;

查看文件

@@ -337,14 +337,15 @@ wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
wmi_conv_event_id event_id); wmi_conv_event_id event_id);
/** /**
* request wmi to connet its htc service. * wmi_unified_connect_htc_service() - WMI API to get connect to HTC service
* @param wmi_handle : handle to WMI. * @wmi_handle: handle to WMI.
* @param htc_handle : handle to HTC. * @htc_handle: handle to HTC.
* @return void *
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
*/ */
QDF_STATUS QDF_STATUS
wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
void *htc_handle); HTC_HANDLE htc_handle);
/* /*
* WMI API to verify the host has enough credits to suspend * WMI API to verify the host has enough credits to suspend

查看文件

@@ -2029,7 +2029,7 @@ struct wmi_unified {
uint32_t *event_id; uint32_t *event_id;
wmi_unified_event_handler *event_handler; wmi_unified_event_handler *event_handler;
enum wmi_rx_exec_ctx *ctx; enum wmi_rx_exec_ctx *ctx;
void *htc_handle; HTC_HANDLE htc_handle;
qdf_spinlock_t eventq_lock; qdf_spinlock_t eventq_lock;
qdf_nbuf_queue_t event_queue; qdf_nbuf_queue_t event_queue;
qdf_work_t rx_event_work; qdf_work_t rx_event_work;
@@ -2081,7 +2081,7 @@ struct wmi_soc {
qdf_atomic_t num_pdevs; qdf_atomic_t num_pdevs;
enum wmi_target_type target_type; enum wmi_target_type target_type;
bool is_async_ep; bool is_async_ep;
void *htc_handle; HTC_HANDLE htc_handle;
uint32_t event_id[WMI_UNIFIED_MAX_EVENT]; uint32_t event_id[WMI_UNIFIED_MAX_EVENT];
wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT]; wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
uint32_t max_event_idx; uint32_t max_event_idx;

查看文件

@@ -2814,16 +2814,9 @@ static QDF_STATUS wmi_connect_pdev_htc_service(struct wmi_soc *soc,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
/**
* wmi_unified_connect_htc_service() - WMI API to get connect to HTC service
*
* @wmi_handle: handle to WMI.
*
* @Return: status.
*/
QDF_STATUS QDF_STATUS
wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
void *htc_handle) HTC_HANDLE htc_handle)
{ {
uint32_t i; uint32_t i;
uint8_t wmi_ep_count; uint8_t wmi_ep_count;