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:
@@ -1243,7 +1243,7 @@ cdp_soc_detach(ol_txrx_soc_handle soc)
|
||||
*/
|
||||
static inline ol_txrx_soc_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)
|
||||
{
|
||||
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 */
|
||||
|
||||
static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
|
||||
void *hif_handle, void *psoc, void *htc_handle,
|
||||
qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops)
|
||||
static inline ol_txrx_soc_handle cdp_soc_attach(
|
||||
u_int16_t devid, void *hif_handle, void *psoc,
|
||||
HTC_HANDLE htc_handle, qdf_device_t qdf_dev,
|
||||
struct ol_if_ops *dp_ol_if_ops)
|
||||
{
|
||||
switch (devid) {
|
||||
case LITHIUM_DP: /*FIXME Add lithium devide IDs */
|
||||
|
@@ -38,7 +38,13 @@ extern "C" {
|
||||
|
||||
#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;
|
||||
|
||||
@@ -691,7 +697,7 @@ struct ol_ath_htc_stats *ieee80211_ioctl_get_htc_stats(HTC_HANDLE
|
||||
*
|
||||
* 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
|
||||
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));
|
||||
}
|
||||
|
||||
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_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);
|
||||
#else
|
||||
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
|
||||
htc_try_send(target, pEndpoint, NULL);
|
||||
#endif
|
||||
|
@@ -111,7 +111,6 @@ struct host_fw_ver {
|
||||
|
||||
struct common_dbglog_handle;
|
||||
struct common_hif_handle;
|
||||
struct common_htc_handle;
|
||||
struct common_accelerator_handle;
|
||||
|
||||
/**
|
||||
@@ -125,7 +124,7 @@ struct common_accelerator_handle;
|
||||
*/
|
||||
struct comp_hdls {
|
||||
struct common_hif_handle *hif_hdl;
|
||||
struct common_htc_handle *htc_hdl;
|
||||
HTC_HANDLE htc_hdl;
|
||||
struct wmi_unified *wmi_hdl;
|
||||
struct common_accelerator_handle *accelerator_hdl;
|
||||
struct common_dbglog_handle *dbglog_hdl;
|
||||
@@ -910,9 +909,9 @@ static inline struct common_hif_handle *target_psoc_get_hif_hdl
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void target_psoc_set_htc_hdl
|
||||
(struct target_psoc_info *psoc_info,
|
||||
struct common_htc_handle *htc_hdl)
|
||||
static inline void target_psoc_set_htc_hdl(
|
||||
struct target_psoc_info *psoc_info,
|
||||
HTC_HANDLE htc_hdl)
|
||||
{
|
||||
if (!psoc_info)
|
||||
return;
|
||||
@@ -928,7 +927,7 @@ static inline void target_psoc_set_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)
|
||||
{
|
||||
if (!psoc_info)
|
||||
|
@@ -137,7 +137,7 @@ wmi_unified_t lmac_get_wmi_unified_hdl(struct wlan_objmgr_psoc *psoc);
|
||||
*
|
||||
* 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
|
||||
@@ -149,7 +149,7 @@ struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc);
|
||||
* Return: void
|
||||
*/
|
||||
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
|
||||
|
@@ -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);
|
||||
|
||||
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;
|
||||
|
||||
@@ -232,7 +232,7 @@ struct common_htc_handle *lmac_get_htc_hdl(struct wlan_objmgr_psoc *psoc)
|
||||
qdf_export_symbol(lmac_get_htc_hdl);
|
||||
|
||||
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;
|
||||
|
||||
|
@@ -337,14 +337,15 @@ wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
|
||||
wmi_conv_event_id event_id);
|
||||
|
||||
/**
|
||||
* request wmi to connet its htc service.
|
||||
* @param wmi_handle : handle to WMI.
|
||||
* @param htc_handle : handle to HTC.
|
||||
* @return void
|
||||
* wmi_unified_connect_htc_service() - WMI API to get connect to HTC service
|
||||
* @wmi_handle: handle to WMI.
|
||||
* @htc_handle: handle to HTC.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
|
||||
*/
|
||||
QDF_STATUS
|
||||
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
|
||||
|
@@ -2029,7 +2029,7 @@ struct wmi_unified {
|
||||
uint32_t *event_id;
|
||||
wmi_unified_event_handler *event_handler;
|
||||
enum wmi_rx_exec_ctx *ctx;
|
||||
void *htc_handle;
|
||||
HTC_HANDLE htc_handle;
|
||||
qdf_spinlock_t eventq_lock;
|
||||
qdf_nbuf_queue_t event_queue;
|
||||
qdf_work_t rx_event_work;
|
||||
@@ -2081,7 +2081,7 @@ struct wmi_soc {
|
||||
qdf_atomic_t num_pdevs;
|
||||
enum wmi_target_type target_type;
|
||||
bool is_async_ep;
|
||||
void *htc_handle;
|
||||
HTC_HANDLE htc_handle;
|
||||
uint32_t event_id[WMI_UNIFIED_MAX_EVENT];
|
||||
wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_unified_connect_htc_service() - WMI API to get connect to HTC service
|
||||
*
|
||||
* @wmi_handle: handle to WMI.
|
||||
*
|
||||
* @Return: status.
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
|
||||
void *htc_handle)
|
||||
HTC_HANDLE htc_handle)
|
||||
{
|
||||
uint32_t i;
|
||||
uint8_t wmi_ep_count;
|
||||
|
Reference in New Issue
Block a user