qcacmn: Change wmi ready wait to qdf_event
In current implementation, wait_queue is used for waiting on WMI ready event, it is now changed to event mechanism Change-Id: I08b4f088874b7c63e20b129f14dbac01851496e5 CRs-Fixed: 2276900
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include <qdf_trace.h>
|
#include <qdf_trace.h>
|
||||||
#include <qdf_nbuf.h>
|
#include <qdf_nbuf.h>
|
||||||
#include <qdf_mem.h>
|
#include <qdf_mem.h>
|
||||||
|
#include <qdf_event.h>
|
||||||
|
|
||||||
MODULE_AUTHOR("Qualcomm Atheros Inc.");
|
MODULE_AUTHOR("Qualcomm Atheros Inc.");
|
||||||
MODULE_DESCRIPTION("Qualcomm Atheros Device Framework Module");
|
MODULE_DESCRIPTION("Qualcomm Atheros Device Framework Module");
|
||||||
@@ -49,6 +50,7 @@ qdf_mod_init(void)
|
|||||||
qdf_logging_init();
|
qdf_logging_init();
|
||||||
qdf_perfmod_init();
|
qdf_perfmod_init();
|
||||||
qdf_nbuf_mod_init();
|
qdf_nbuf_mod_init();
|
||||||
|
qdf_event_list_init();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
module_init(qdf_mod_init);
|
module_init(qdf_mod_init);
|
||||||
@@ -61,6 +63,7 @@ module_init(qdf_mod_init);
|
|||||||
static void __exit
|
static void __exit
|
||||||
qdf_mod_exit(void)
|
qdf_mod_exit(void)
|
||||||
{
|
{
|
||||||
|
qdf_event_list_destroy();
|
||||||
qdf_nbuf_mod_exit();
|
qdf_nbuf_mod_exit();
|
||||||
qdf_perfmod_exit();
|
qdf_perfmod_exit();
|
||||||
qdf_logging_exit();
|
qdf_logging_exit();
|
||||||
|
@@ -138,8 +138,7 @@ struct comp_hdls {
|
|||||||
* @max_descs: Max descriptors
|
* @max_descs: Max descriptors
|
||||||
* @preferred_hw_mode: preferred hw mode
|
* @preferred_hw_mode: preferred hw mode
|
||||||
* @wmi_timeout: wait timeout for target events
|
* @wmi_timeout: wait timeout for target events
|
||||||
* @wmi_timeout_unintr: wait timeout uninterruptedly
|
* @event: qdf_event for target events
|
||||||
* @event_queue: wait queue for target events
|
|
||||||
* @service_bitmap: WMI service bitmap
|
* @service_bitmap: WMI service bitmap
|
||||||
* @target_cap: target capabilities
|
* @target_cap: target capabilities
|
||||||
* @service_ext_param: ext service params
|
* @service_ext_param: ext service params
|
||||||
@@ -161,8 +160,7 @@ struct tgt_info {
|
|||||||
uint32_t max_descs;
|
uint32_t max_descs;
|
||||||
uint32_t preferred_hw_mode;
|
uint32_t preferred_hw_mode;
|
||||||
uint32_t wmi_timeout;
|
uint32_t wmi_timeout;
|
||||||
uint32_t wmi_timeout_unintr;
|
qdf_event_t event;
|
||||||
qdf_wait_queue_head_t event_queue;
|
|
||||||
uint32_t service_bitmap[PSOC_SERVICE_BM_SIZE];
|
uint32_t service_bitmap[PSOC_SERVICE_BM_SIZE];
|
||||||
struct wlan_psoc_target_capability_info target_caps;
|
struct wlan_psoc_target_capability_info target_caps;
|
||||||
struct wlan_psoc_host_service_ext_param service_ext_param;
|
struct wlan_psoc_host_service_ext_param service_ext_param;
|
||||||
@@ -689,41 +687,6 @@ static inline uint32_t target_psoc_get_wmi_timeout
|
|||||||
return psoc_info->info.wmi_timeout;
|
return psoc_info->info.wmi_timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* target_psoc_set_wmi_timeout_unintr() - set wmi_timeout_unintr
|
|
||||||
* @psoc_info: pointer to structure target_psoc_info
|
|
||||||
* @wmi_timeout_unint: WMI timeout uninterrupted in sec
|
|
||||||
*
|
|
||||||
* API to set wmi_timeout_unintr
|
|
||||||
*
|
|
||||||
* Return: void
|
|
||||||
*/
|
|
||||||
static inline void target_psoc_set_wmi_timeout_unintr
|
|
||||||
(struct target_psoc_info *psoc_info, uint32_t wmi_timeout_unint)
|
|
||||||
{
|
|
||||||
if (psoc_info == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
psoc_info->info.wmi_timeout_unintr = wmi_timeout_unint;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* target_psoc_get_wmi_timeout_unintr() - get wmi_timeout_unintr
|
|
||||||
* @psoc_info: pointer to structure target_psoc_info
|
|
||||||
*
|
|
||||||
* API to get wmi_timeout_unintr
|
|
||||||
*
|
|
||||||
* Return: unint32_t
|
|
||||||
*/
|
|
||||||
static inline uint32_t target_psoc_get_wmi_timeout_unintr
|
|
||||||
(struct target_psoc_info *psoc_info)
|
|
||||||
{
|
|
||||||
if (psoc_info == NULL)
|
|
||||||
return (uint32_t)-1;
|
|
||||||
|
|
||||||
return psoc_info->info.wmi_timeout_unintr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* target_psoc_set_total_mac_phy_cnt() - set total_mac_phy
|
* target_psoc_set_total_mac_phy_cnt() - set total_mac_phy
|
||||||
* @psoc_info: pointer to structure target_psoc_infoa
|
* @psoc_info: pointer to structure target_psoc_infoa
|
||||||
@@ -1192,13 +1155,13 @@ static inline wmi_host_ext_resource_config *target_psoc_get_wlan_ext_res_cfg
|
|||||||
*
|
*
|
||||||
* Return: structure pointer to qdf_wait_queue_head_t
|
* Return: structure pointer to qdf_wait_queue_head_t
|
||||||
*/
|
*/
|
||||||
static inline qdf_wait_queue_head_t *target_psoc_get_event_queue
|
static inline qdf_event_t *target_psoc_get_event
|
||||||
(struct target_psoc_info *psoc_info)
|
(struct target_psoc_info *psoc_info)
|
||||||
{
|
{
|
||||||
if (psoc_info == NULL)
|
if (psoc_info == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return &psoc_info->info.event_queue;
|
return &psoc_info->info.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -522,7 +522,7 @@ QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
|||||||
wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
|
wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
|
||||||
target_psoc_set_preferred_hw_mode(tgt_psoc_info, WMI_HOST_HW_MODE_MAX);
|
target_psoc_set_preferred_hw_mode(tgt_psoc_info, WMI_HOST_HW_MODE_MAX);
|
||||||
|
|
||||||
qdf_init_waitqueue_head(&tgt_psoc_info->info.event_queue);
|
qdf_event_create(&tgt_psoc_info->info.event);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -547,6 +547,8 @@ QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
|||||||
init_deinit_chainmask_table_free(ext_param);
|
init_deinit_chainmask_table_free(ext_param);
|
||||||
init_deinit_dbr_ring_cap_free(tgt_psoc_info);
|
init_deinit_dbr_ring_cap_free(tgt_psoc_info);
|
||||||
|
|
||||||
|
qdf_event_destroy(&tgt_psoc_info->info.event);
|
||||||
|
|
||||||
wlan_psoc_set_tgt_if_handle(psoc, NULL);
|
wlan_psoc_set_tgt_if_handle(psoc, NULL);
|
||||||
|
|
||||||
qdf_mem_free(tgt_psoc_info);
|
qdf_mem_free(tgt_psoc_info);
|
||||||
|
@@ -570,5 +570,5 @@ void init_deinit_wakeup_host_wait(
|
|||||||
target_if_err("psoc target_psoc_info is null in target ready");
|
target_if_err("psoc target_psoc_info is null in target ready");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qdf_wake_up(&tgt_hdl->info.event_queue);
|
qdf_event_set(&tgt_hdl->info.event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user