mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +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,
|
||||
};
|
||||
|
||||
#define IE_AKM_IS_SAE(akm) \
|
||||
(akm & (IE_RSN_AKM_SUITE_SAE_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256))
|
||||
static inline bool IE_AKM_IS_SAE(uint32_t akm)
|
||||
{
|
||||
return akm & (IE_RSN_AKM_SUITE_SAE_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256);
|
||||
}
|
||||
|
||||
#define IE_AKM_IS_FT(akm) \
|
||||
(akm & (IE_RSN_AKM_SUITE_FT_OVER_8021X | \
|
||||
IE_RSN_AKM_SUITE_FT_USING_PSK | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384))
|
||||
static inline bool IE_AKM_IS_FT(uint32_t akm)
|
||||
{
|
||||
return akm & (IE_RSN_AKM_SUITE_FT_OVER_8021X |
|
||||
IE_RSN_AKM_SUITE_FT_USING_PSK |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384);
|
||||
}
|
||||
|
||||
#define IE_AKM_IS_FILS(akm) \
|
||||
(akm & (IE_RSN_AKM_SUITE_FILS_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FILS_SHA384 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384))
|
||||
static inline bool IE_AKM_IS_FILS(uint32_t akm)
|
||||
{
|
||||
return (akm) & (IE_RSN_AKM_SUITE_FILS_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FILS_SHA384 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384);
|
||||
}
|
||||
|
||||
#define IE_AKM_IS_8021X(akm) \
|
||||
(akm & (IE_RSN_AKM_SUITE_8021X | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X | \
|
||||
IE_RSN_AKM_SUITE_8021X_SHA256 | \
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384))
|
||||
static inline bool IE_AKM_IS_8021X(uint32_t akm)
|
||||
{
|
||||
return akm & (IE_RSN_AKM_SUITE_8021X |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X |
|
||||
IE_RSN_AKM_SUITE_8021X_SHA256 |
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384);
|
||||
}
|
||||
|
||||
#define IE_LEN(ie) \
|
||||
((ie) ? (ie)[1] + 2 : 0)
|
||||
|
Loading…
Reference in New Issue
Block a user