mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Introduce sap_get_mac_context()
Currently the macro CDS_GET_HAL_CB() is used throughout the SAP to retrieve an opaque handle for the MAC context. This name is an anachronism given that the HAL layer was moved to firmware many generations ago. In addition, since the SAP module is internal to the UMAC, it should normally not be dealing with the opaque handle but should instead be dealing directly with the MAC context. Finally, per the coding style, "inline functions are preferable to macros resembling functions." To address these issues introduce sap_get_mac_context(), a new inline function, to replace the current usage of CDS_GET_HAL_CB(). Subsequent changes will actually perform the replacement. Change-Id: I53160f7f5a315516f5348baea8cc7945483431bd CRs-Fixed: 2346181
This commit is contained in:
parent
3d07edaed5
commit
03d1e2c428
1 changed files with 12 additions and 0 deletions
|
|
@ -279,6 +279,18 @@ typedef struct sWLAN_SAPEvent {
|
|||
/*----------------------------------------------------------------------------
|
||||
* Function Declarations and Documentation
|
||||
* -------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* sap_get_mac_context() - Get a pointer to the global MAC context
|
||||
*
|
||||
* Return: pointer to the global MAC context, or NULL if the MAC
|
||||
* context is no longer registered
|
||||
*/
|
||||
static inline struct mac_context *sap_get_mac_context(void)
|
||||
{
|
||||
return cds_get_context(QDF_MODULE_ID_PE);
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_context_get(struct sap_context *ctx);
|
||||
void wlansap_context_put(struct sap_context *ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue