qcacmn: add new qdf wrapper to update reason code
Whenever driver does a recovery because of the bus failure the reason for the recovery is not known until the reason code is read in the hif layer. So, update the recovery reason if there is a bus id read failure in the hif. Change-Id: I5ed6adc92ef2a94a031f682e5ffd17af9ac6893d CRs-Fixed: 2833247
This commit is contained in:
parent
0e8f8132c2
commit
0cb4658b79
@ -281,5 +281,26 @@ bool qdf_is_drv_supported(void);
|
||||
*/
|
||||
void qdf_register_drv_supported_callback(qdf_is_drv_supported_callback
|
||||
is_drv_supported);
|
||||
#endif /*_QDF_PLATFORM_H*/
|
||||
|
||||
typedef void (*qdf_recovery_reason_update_callback)(enum qdf_hang_reason
|
||||
reason);
|
||||
|
||||
/**
|
||||
* qdf_register_recovery_reason_update() - Register callback to update recovery
|
||||
* reason
|
||||
* @qdf_recovery_reason_update_callback: callback to update recovery reason
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void qdf_register_recovery_reason_update(qdf_recovery_reason_update_callback
|
||||
callback);
|
||||
|
||||
/**
|
||||
* qdf_recovery_reason_update() - update recovery reason
|
||||
* @reason: recovery reason
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void qdf_recovery_reason_update(enum qdf_hang_reason reason);
|
||||
|
||||
#endif /*_QDF_PLATFORM_H*/
|
||||
|
@ -31,6 +31,8 @@ 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;
|
||||
static qdf_is_drv_supported_callback is_drv_supported_cb;
|
||||
static qdf_recovery_reason_update_callback update_recovery_reason_cb;
|
||||
|
||||
|
||||
void qdf_register_fw_down_callback(qdf_is_fw_down_callback is_fw_down)
|
||||
{
|
||||
@ -195,3 +197,21 @@ bool qdf_is_drv_supported(void)
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_is_drv_supported);
|
||||
|
||||
void qdf_register_recovery_reason_update(qdf_recovery_reason_update_callback
|
||||
callback)
|
||||
{
|
||||
update_recovery_reason_cb = callback;
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_register_recovery_reason_update);
|
||||
|
||||
void qdf_recovery_reason_update(enum qdf_hang_reason reason)
|
||||
{
|
||||
if (!update_recovery_reason_cb)
|
||||
return;
|
||||
|
||||
update_recovery_reason_cb(reason);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_recovery_reason_update);
|
||||
|
Loading…
Reference in New Issue
Block a user