qcacmn: Add host initiated self recovery callback in qdf
Add host initiated self recovery callback in qdf such that self recovery can be invoked from all layers. Change-Id: Ied2a468019a2e27039686a4acb0e4c8b4577ba8f CRs-Fixed: 2083099
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -47,6 +47,10 @@ extern "C" {
|
|||||||
typedef __qdf_event_t qdf_event_t;
|
typedef __qdf_event_t qdf_event_t;
|
||||||
/* Function declarations and documenation */
|
/* Function declarations and documenation */
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
|
typedef void (*qdf_self_recovery_callback)(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS qdf_event_create(qdf_event_t *event);
|
QDF_STATUS qdf_event_create(qdf_event_t *event);
|
||||||
|
|
||||||
QDF_STATUS qdf_event_set(qdf_event_t *event);
|
QDF_STATUS qdf_event_set(qdf_event_t *event);
|
||||||
@@ -65,6 +69,23 @@ QDF_STATUS qdf_wait_single_event(qdf_event_t *event,
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_exit_thread(QDF_STATUS status);
|
QDF_STATUS qdf_exit_thread(QDF_STATUS status);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
|
/**
|
||||||
|
* qdf_register_self_recovery_callback () - register self recovery callback
|
||||||
|
* @callback: self recovery callback
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trigger_self_recovery () - tirgger self recovery
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_trigger_self_recovery(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
@@ -39,6 +39,10 @@
|
|||||||
#include "qdf_mc_timer.h"
|
#include "qdf_mc_timer.h"
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
|
static qdf_self_recovery_callback self_recovery_cb;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Function Definitions and Documentation */
|
/* Function Definitions and Documentation */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -273,3 +277,20 @@ QDF_STATUS qdf_exit_thread(QDF_STATUS status)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(qdf_exit_thread);
|
EXPORT_SYMBOL(qdf_exit_thread);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MCL
|
||||||
|
void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback)
|
||||||
|
{
|
||||||
|
self_recovery_cb = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
void qdf_trigger_self_recovery(void)
|
||||||
|
{
|
||||||
|
if (!self_recovery_cb) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
|
||||||
|
"No self recovery callback registered %s", __func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self_recovery_cb();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user