qcacld-3.0: Remove obselete wma_needShutdown code
wma_needShutdown related code is now obselete, during the cds_preenable failure, this is obselete code is being invoked which is setting wma->needShutdown. If the same is set the wma_close will not be inokved resulting in the reference leak of of pdev object. Remove obselete wma_needShutdown code. Change-Id: Ia1463c9197593165eb5844e154f78fe3fe278fbd CRs-Fixed: 2947133
Цей коміт міститься в:

зафіксовано
Madan Koyyalamudi

джерело
077006a020
коміт
add1f46a2b
@@ -183,8 +183,6 @@ struct cds_context {
|
|||||||
|
|
||||||
uint32_t driver_state;
|
uint32_t driver_state;
|
||||||
|
|
||||||
qdf_event_t wma_complete_event;
|
|
||||||
|
|
||||||
/* WMA Context */
|
/* WMA Context */
|
||||||
void *wma_context;
|
void *wma_context;
|
||||||
|
|
||||||
|
@@ -665,24 +665,18 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
|
|||||||
/* Initialize bug reporting structure */
|
/* Initialize bug reporting structure */
|
||||||
cds_init_log_completion();
|
cds_init_log_completion();
|
||||||
|
|
||||||
status = qdf_event_create(&gp_cds_context->wma_complete_event);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
cds_alert("Unable to init wma_complete_event");
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
hdd_ctx = gp_cds_context->hdd_context;
|
hdd_ctx = gp_cds_context->hdd_context;
|
||||||
if (!hdd_ctx || !hdd_ctx->config) {
|
if (!hdd_ctx || !hdd_ctx->config) {
|
||||||
cds_err("Hdd Context is Null");
|
cds_err("Hdd Context is Null");
|
||||||
|
|
||||||
status = QDF_STATUS_E_FAILURE;
|
status = QDF_STATUS_E_FAILURE;
|
||||||
goto err_wma_complete_event;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = dispatcher_enable();
|
status = dispatcher_enable();
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
cds_err("Failed to enable dispatcher; status:%d", status);
|
cds_err("Failed to enable dispatcher; status:%d", status);
|
||||||
goto err_wma_complete_event;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now Open the CDS Scheduler */
|
/* Now Open the CDS Scheduler */
|
||||||
@@ -903,9 +897,6 @@ err_dispatcher_disable:
|
|||||||
if (QDF_IS_STATUS_ERROR(dispatcher_disable()))
|
if (QDF_IS_STATUS_ERROR(dispatcher_disable()))
|
||||||
QDF_DEBUG_PANIC("Failed to disable dispatcher");
|
QDF_DEBUG_PANIC("Failed to disable dispatcher");
|
||||||
|
|
||||||
err_wma_complete_event:
|
|
||||||
qdf_event_destroy(&gp_cds_context->wma_complete_event);
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
} /* cds_open() */
|
} /* cds_open() */
|
||||||
|
|
||||||
@@ -1220,26 +1211,10 @@ err_mac_stop:
|
|||||||
mac_stop(gp_cds_context->mac_context);
|
mac_stop(gp_cds_context->mac_context);
|
||||||
|
|
||||||
err_wma_stop:
|
err_wma_stop:
|
||||||
qdf_event_reset(&gp_cds_context->wma_complete_event);
|
|
||||||
qdf_status = wma_stop();
|
qdf_status = wma_stop();
|
||||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||||
cds_err("Failed to stop wma");
|
cds_err("Failed to stop wma");
|
||||||
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
||||||
wma_setneedshutdown();
|
|
||||||
} else {
|
|
||||||
qdf_status =
|
|
||||||
qdf_wait_for_event_completion(
|
|
||||||
&gp_cds_context->wma_complete_event,
|
|
||||||
CDS_WMA_TIMEOUT);
|
|
||||||
if (qdf_status != QDF_STATUS_SUCCESS) {
|
|
||||||
if (qdf_status == QDF_STATUS_E_TIMEOUT) {
|
|
||||||
cds_alert("Timeout occurred before WMA_stop complete");
|
|
||||||
} else {
|
|
||||||
cds_alert("WMA_stop reporting other error");
|
|
||||||
}
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
wma_setneedshutdown();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
@@ -1273,7 +1248,6 @@ QDF_STATUS cds_disable(struct wlan_objmgr_psoc *psoc)
|
|||||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||||
cds_err("Failed to stop wma");
|
cds_err("Failed to stop wma");
|
||||||
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
||||||
wma_setneedshutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = cds_get_context(QDF_MODULE_ID_PE);
|
handle = cds_get_context(QDF_MODULE_ID_PE);
|
||||||
@@ -1405,14 +1379,11 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc)
|
|||||||
ucfg_pmo_psoc_update_dp_handle(psoc, NULL);
|
ucfg_pmo_psoc_update_dp_handle(psoc, NULL);
|
||||||
wlan_psoc_set_dp_handle(psoc, NULL);
|
wlan_psoc_set_dp_handle(psoc, NULL);
|
||||||
|
|
||||||
if (true == wma_needshutdown()) {
|
|
||||||
cds_err("Failed to shutdown wma");
|
qdf_status = wma_close();
|
||||||
} else {
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||||
qdf_status = wma_close();
|
cds_err("Failed to close wma");
|
||||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
||||||
cds_err("Failed to close wma");
|
|
||||||
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_status = wma_wmi_service_close();
|
qdf_status = wma_wmi_service_close();
|
||||||
@@ -1421,12 +1392,6 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc)
|
|||||||
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_status = qdf_event_destroy(&gp_cds_context->wma_complete_event);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
||||||
cds_err("failed to destroy wma_complete_event");
|
|
||||||
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
|
||||||
}
|
|
||||||
|
|
||||||
cds_deinit_ini_config();
|
cds_deinit_ini_config();
|
||||||
qdf_timer_module_deinit();
|
qdf_timer_module_deinit();
|
||||||
|
|
||||||
|
@@ -826,7 +826,6 @@ struct wma_wlm_stats_data {
|
|||||||
* @last_umac_data_ota_timestamp: timestamp when OTA of last umac data
|
* @last_umac_data_ota_timestamp: timestamp when OTA of last umac data
|
||||||
* was done
|
* was done
|
||||||
* @last_umac_data_nbuf: cache nbuf ptr for the last umac data buf
|
* @last_umac_data_nbuf: cache nbuf ptr for the last umac data buf
|
||||||
* @needShutdown: is shutdown needed or not
|
|
||||||
* @tgt_cfg_update_cb: configuration update callback
|
* @tgt_cfg_update_cb: configuration update callback
|
||||||
* @reg_cap: regulatory capablities
|
* @reg_cap: regulatory capablities
|
||||||
* @scan_id: scan id
|
* @scan_id: scan id
|
||||||
@@ -949,7 +948,6 @@ typedef struct {
|
|||||||
wma_tx_ota_comp_callback umac_data_ota_ack_cb;
|
wma_tx_ota_comp_callback umac_data_ota_ack_cb;
|
||||||
unsigned long last_umac_data_ota_timestamp;
|
unsigned long last_umac_data_ota_timestamp;
|
||||||
qdf_nbuf_t last_umac_data_nbuf;
|
qdf_nbuf_t last_umac_data_nbuf;
|
||||||
bool needShutdown;
|
|
||||||
wma_tgt_cfg_cb tgt_cfg_update_cb;
|
wma_tgt_cfg_cb tgt_cfg_update_cb;
|
||||||
HAL_REG_CAPABILITIES reg_cap;
|
HAL_REG_CAPABILITIES reg_cap;
|
||||||
uint32_t scan_id;
|
uint32_t scan_id;
|
||||||
|
@@ -129,10 +129,6 @@ int wma_rx_service_ready_event(void *handle, uint8_t *ev, uint32_t len);
|
|||||||
|
|
||||||
int wma_rx_service_ready_ext_event(void *handle, uint8_t *ev, uint32_t len);
|
int wma_rx_service_ready_ext_event(void *handle, uint8_t *ev, uint32_t len);
|
||||||
|
|
||||||
void wma_setneedshutdown(void);
|
|
||||||
|
|
||||||
bool wma_needshutdown(void);
|
|
||||||
|
|
||||||
QDF_STATUS wma_wait_for_ready_event(WMA_HANDLE handle);
|
QDF_STATUS wma_wait_for_ready_event(WMA_HANDLE handle);
|
||||||
|
|
||||||
int wma_cli_get_command(int vdev_id, int param_id, int vpdev);
|
int wma_cli_get_command(int vdev_id, int param_id, int vpdev);
|
||||||
|
@@ -6961,50 +6961,6 @@ int wma_rx_ready_event(void *handle, uint8_t *cmd_param_info,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_setneedshutdown() - setting wma needshutdown flag
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void wma_setneedshutdown(void)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma_handle;
|
|
||||||
|
|
||||||
wma_debug("Enter");
|
|
||||||
|
|
||||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
|
||||||
|
|
||||||
if (!wma_handle) {
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wma_handle->needShutdown = true;
|
|
||||||
wma_debug("Exit");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_needshutdown() - Is wma needs shutdown?
|
|
||||||
*
|
|
||||||
* Return: returns true/false
|
|
||||||
*/
|
|
||||||
bool wma_needshutdown(void)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma_handle;
|
|
||||||
|
|
||||||
wma_debug("Enter");
|
|
||||||
|
|
||||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
|
||||||
|
|
||||||
if (!wma_handle) {
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wma_debug("Exit");
|
|
||||||
return wma_handle->needShutdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_wait_for_ready_event() - wait for wma ready event
|
* wma_wait_for_ready_event() - wait for wma ready event
|
||||||
* @handle: wma handle
|
* @handle: wma handle
|
||||||
|
Посилання в новій задачі
Заблокувати користувача