mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Define QDF API to check if driver unload is in progress
Define a QDF API to check if driver unload is in progress such that driver unload can be checked from CMN components. Change-Id: I397b0b6252ed8fd9558f04802cf55fdc61a39d83 CRs-Fixed: 2605656
This commit is contained in:
parent
c1aeb35c3c
commit
4e1154ac78
2 changed files with 45 additions and 2 deletions
|
|
@ -106,6 +106,23 @@ void qdf_register_wmi_send_recv_qmi_callback(qdf_wmi_send_over_qmi_callback
|
|||
QDF_STATUS qdf_wmi_send_recv_qmi(void *buf, uint32_t len, void *cb_ctx,
|
||||
qdf_wmi_recv_qmi_cb wmi_rx_cb);
|
||||
|
||||
/**
|
||||
* qdf_is_driver_unloading_callback() - callback to get driver unloading in progress
|
||||
* or not
|
||||
*
|
||||
* Return: true if driver is unloading else false
|
||||
*/
|
||||
typedef bool (*qdf_is_driver_unloading_callback)(void);
|
||||
|
||||
/**
|
||||
* qdf_register_is_driver_unloading_callback() - driver unloading callback
|
||||
* @callback: driver unloading callback
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void qdf_register_is_driver_unloading_callback(
|
||||
qdf_is_driver_unloading_callback callback);
|
||||
|
||||
/**
|
||||
* qdf_register_self_recovery_callback() - register self recovery callback
|
||||
* @callback: self recovery callback
|
||||
|
|
@ -130,8 +147,8 @@ void __qdf_trigger_self_recovery(enum qdf_hang_reason reason,
|
|||
const char *func, const uint32_t line);
|
||||
|
||||
/**
|
||||
* qdf_is_recovering_callback() - callback to get driver recovering in progress
|
||||
* or not
|
||||
* qdf_is_recovering_callback() - callback to get driver recovering in
|
||||
* progress or not
|
||||
*
|
||||
* Return: true if driver is doing recovering else false
|
||||
*/
|
||||
|
|
@ -146,6 +163,14 @@ typedef bool (*qdf_is_recovering_callback)(void);
|
|||
void qdf_register_recovering_state_query_callback(
|
||||
qdf_is_recovering_callback is_recovering);
|
||||
|
||||
/**
|
||||
* qdf_is_driver_unloading() - get driver unloading in progress status
|
||||
* or not
|
||||
*
|
||||
* Return: true if driver is unloading else false
|
||||
*/
|
||||
bool qdf_is_driver_unloading(void);
|
||||
|
||||
/**
|
||||
* qdf_is_recovering() - get driver recovering in progress status
|
||||
* or not
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
static qdf_self_recovery_callback self_recovery_cb;
|
||||
static qdf_is_fw_down_callback is_fw_down_cb;
|
||||
static qdf_is_driver_unloading_callback is_driver_unloading_cb;
|
||||
static qdf_is_recovering_callback is_recovering_cb;
|
||||
static qdf_is_drv_connected_callback is_drv_connected_cb;
|
||||
static qdf_wmi_send_over_qmi_callback _wmi_send_recv_qmi_cb;
|
||||
|
|
@ -71,6 +72,14 @@ QDF_STATUS qdf_wmi_send_recv_qmi(void *buf, uint32_t len, void *cb_ctx,
|
|||
|
||||
qdf_export_symbol(qdf_wmi_send_recv_qmi);
|
||||
|
||||
void qdf_register_is_driver_unloading_callback(
|
||||
qdf_is_driver_unloading_callback callback)
|
||||
{
|
||||
is_driver_unloading_cb = callback;
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_register_is_driver_unloading_callback);
|
||||
|
||||
void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback)
|
||||
{
|
||||
self_recovery_cb = callback;
|
||||
|
|
@ -95,6 +104,15 @@ void qdf_register_recovering_state_query_callback(
|
|||
is_recovering_cb = is_recovering;
|
||||
}
|
||||
|
||||
bool qdf_is_driver_unloading(void)
|
||||
{
|
||||
if (is_driver_unloading_cb)
|
||||
return is_driver_unloading_cb();
|
||||
return false;
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_is_driver_unloading);
|
||||
|
||||
bool qdf_is_recovering(void)
|
||||
{
|
||||
if (is_recovering_cb)
|
||||
|
|
|
|||
Loading…
Reference in a new issue