qcacmn: Add qdf_opmode_str()

It is often useful to print the human readable version of an operating
mode in a log message or some other user-facing string. Add a function
for mapping QDF_OPMODE to human readable strings, qdf_opmode_str(), in
QDF such that various consumers do not have to implement it themselves.

Change-Id: I8756fb2ea97b3b8c7af2633b07694ad1e74d6d3e
CRs-Fixed: 2331888
This commit is contained in:
Dustin Brown
2018-10-10 17:08:31 -07:00
committed by nshrivas
父節點 b13d3af59f
當前提交 90556671c5
共有 2 個文件被更改,包括 49 次插入0 次删除

查看文件

@@ -553,9 +553,20 @@ enum QDF_OPMODE {
QDF_WDS_MODE,
QDF_BTAMP_MODE,
QDF_AHDEMO_MODE,
/* Add new OP Modes to qdf_opmode_str as well */
QDF_MAX_NO_OF_MODE
};
/**
* qdf_opmode_str() - Return a human readable string representation of @opmode
* @opmode: The opmode to convert
*
* Return: string representation of @opmode
*/
const char *qdf_opmode_str(const enum QDF_OPMODE opmode);
/**
* enum QDF_GLOBAL_MODE - global mode when driver is loaded.
*