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:
Srinivas Pitla
2018-07-09 12:07:59 +05:30
committed by nshrivas
parent 8afde5a83f
commit d898ceddfa
4 changed files with 11 additions and 43 deletions

View File

@@ -26,6 +26,7 @@
#include <qdf_trace.h>
#include <qdf_nbuf.h>
#include <qdf_mem.h>
#include <qdf_event.h>
MODULE_AUTHOR("Qualcomm Atheros Inc.");
MODULE_DESCRIPTION("Qualcomm Atheros Device Framework Module");
@@ -49,6 +50,7 @@ qdf_mod_init(void)
qdf_logging_init();
qdf_perfmod_init();
qdf_nbuf_mod_init();
qdf_event_list_init();
return 0;
}
module_init(qdf_mod_init);
@@ -61,6 +63,7 @@ module_init(qdf_mod_init);
static void __exit
qdf_mod_exit(void)
{
qdf_event_list_destroy();
qdf_nbuf_mod_exit();
qdf_perfmod_exit();
qdf_logging_exit();

View File

@@ -138,8 +138,7 @@ struct comp_hdls {
* @max_descs: Max descriptors
* @preferred_hw_mode: preferred hw mode
* @wmi_timeout: wait timeout for target events
* @wmi_timeout_unintr: wait timeout uninterruptedly
* @event_queue: wait queue for target events
* @event: qdf_event for target events
* @service_bitmap: WMI service bitmap
* @target_cap: target capabilities
* @service_ext_param: ext service params
@@ -161,8 +160,7 @@ struct tgt_info {
uint32_t max_descs;
uint32_t preferred_hw_mode;
uint32_t wmi_timeout;
uint32_t wmi_timeout_unintr;
qdf_wait_queue_head_t event_queue;
qdf_event_t event;
uint32_t service_bitmap[PSOC_SERVICE_BM_SIZE];
struct wlan_psoc_target_capability_info target_caps;
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;
}
/**
* 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
* @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
*/
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)
{
if (psoc_info == NULL)
return NULL;
return &psoc_info->info.event_queue;
return &psoc_info->info.event;
}
/**

View File

@@ -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);
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;
}
@@ -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_dbr_ring_cap_free(tgt_psoc_info);
qdf_event_destroy(&tgt_psoc_info->info.event);
wlan_psoc_set_tgt_if_handle(psoc, NULL);
qdf_mem_free(tgt_psoc_info);

View File

@@ -570,5 +570,5 @@ void init_deinit_wakeup_host_wait(
target_if_err("psoc target_psoc_info is null in target ready");
return;
}
qdf_wake_up(&tgt_hdl->info.event_queue);
qdf_event_set(&tgt_hdl->info.event);
}