mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
ie: Use static inline functions in favor of macros
This commit is contained in:
parent
2552ec26b7
commit
86f34a394b
48
src/ie.h
48
src/ie.h
@ -336,29 +336,37 @@ enum ie_rsn_akm_suite {
|
|||||||
IE_RSN_AKM_SUITE_OSEN = 0x40000,
|
IE_RSN_AKM_SUITE_OSEN = 0x40000,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IE_AKM_IS_SAE(akm) \
|
static inline bool IE_AKM_IS_SAE(uint32_t akm)
|
||||||
(akm & (IE_RSN_AKM_SUITE_SAE_SHA256 | \
|
{
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256))
|
return akm & (IE_RSN_AKM_SUITE_SAE_SHA256 |
|
||||||
|
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256);
|
||||||
|
}
|
||||||
|
|
||||||
#define IE_AKM_IS_FT(akm) \
|
static inline bool IE_AKM_IS_FT(uint32_t akm)
|
||||||
(akm & (IE_RSN_AKM_SUITE_FT_OVER_8021X | \
|
{
|
||||||
IE_RSN_AKM_SUITE_FT_USING_PSK | \
|
return akm & (IE_RSN_AKM_SUITE_FT_OVER_8021X |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 | \
|
IE_RSN_AKM_SUITE_FT_USING_PSK |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 | \
|
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 | \
|
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384))
|
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
|
||||||
|
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384);
|
||||||
|
}
|
||||||
|
|
||||||
#define IE_AKM_IS_FILS(akm) \
|
static inline bool IE_AKM_IS_FILS(uint32_t akm)
|
||||||
(akm & (IE_RSN_AKM_SUITE_FILS_SHA256 | \
|
{
|
||||||
IE_RSN_AKM_SUITE_FILS_SHA384 | \
|
return (akm) & (IE_RSN_AKM_SUITE_FILS_SHA256 |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 | \
|
IE_RSN_AKM_SUITE_FILS_SHA384 |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384))
|
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
|
||||||
|
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384);
|
||||||
|
}
|
||||||
|
|
||||||
#define IE_AKM_IS_8021X(akm) \
|
static inline bool IE_AKM_IS_8021X(uint32_t akm)
|
||||||
(akm & (IE_RSN_AKM_SUITE_8021X | \
|
{
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_8021X | \
|
return akm & (IE_RSN_AKM_SUITE_8021X |
|
||||||
IE_RSN_AKM_SUITE_8021X_SHA256 | \
|
IE_RSN_AKM_SUITE_FT_OVER_8021X |
|
||||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384))
|
IE_RSN_AKM_SUITE_8021X_SHA256 |
|
||||||
|
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384);
|
||||||
|
}
|
||||||
|
|
||||||
#define IE_LEN(ie) \
|
#define IE_LEN(ie) \
|
||||||
((ie) ? (ie)[1] + 2 : 0)
|
((ie) ? (ie)[1] + 2 : 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user