qcacmn: Add qdf_status_from_os_return()

It is sometimes useful to reverse map an errno into a QDF_STATUS. For
this purpose, introduce qdf_status_from_os_return(), the logical inverse
operation of qdf_status_to_os_return().

Change-Id: I053f43867ef603c2654eca64fe76c7bd313e14e4
CRs-Fixed: 2242664
此提交包含在:
Dustin Brown
2018-05-15 16:31:38 -07:00
提交者 nshrivas
父節點 a487539d7d
當前提交 b7871f64ad
共有 2 個檔案被更改,包括 61 行新增0 行删除

查看文件

@@ -128,6 +128,17 @@ static inline int qdf_status_to_os_return(QDF_STATUS status)
return __qdf_status_to_os_return(status);
}
/**
* qdf_status_from_os_return() - map OS specific return code to a QDF_STATUS
* @rc: the input return code to map
*
* Return: QDF_STATUS
*/
static inline QDF_STATUS qdf_status_from_os_return(int rc)
{
return __qdf_status_from_os_return(rc);
}
/**
* qdf_set_bit() - set bit in address
* @nr: bit number to be set