|
@@ -273,14 +273,14 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
#define RSN_CIPHER_SUITE_BIP_CMAC_256 WLAN_RSN_SEL(WLAN_CSE_BIP_CMAC_256)
|
|
#define RSN_CIPHER_SUITE_BIP_CMAC_256 WLAN_RSN_SEL(WLAN_CSE_BIP_CMAC_256)
|
|
|
|
|
|
#define RESET_PARAM(__param) ((__param) = 0)
|
|
#define RESET_PARAM(__param) ((__param) = 0)
|
|
-#define SET_PARAM(__param, __val) ((__param) |= (1<<(__val)))
|
|
|
|
-#define HAS_PARAM(__param, __val) ((__param) & (1<<(__val)))
|
|
|
|
|
|
+#define SET_PARAM(__param, __val) ((__param) |= (1 << (__val)))
|
|
|
|
+#define HAS_PARAM(__param, __val) ((__param) & (1 << (__val)))
|
|
#define CLEAR_PARAM(__param, __val) ((__param) &= ((~1) << (__val)))
|
|
#define CLEAR_PARAM(__param, __val) ((__param) &= ((~1) << (__val)))
|
|
|
|
|
|
|
|
|
|
#define RESET_AUTHMODE(_param) ((_param)->authmodeset = 0)
|
|
#define RESET_AUTHMODE(_param) ((_param)->authmodeset = 0)
|
|
-#define SET_AUTHMODE(_param, _mode) ((_param)->authmodeset |= (1<<(_mode)))
|
|
|
|
-#define HAS_AUTHMODE(_param, _mode) ((_param)->authmodeset & (1<<(_mode)))
|
|
|
|
|
|
+#define SET_AUTHMODE(_param, _mode) ((_param)->authmodeset |= (1 << (_mode)))
|
|
|
|
+#define HAS_AUTHMODE(_param, _mode) ((_param)->authmodeset & (1 << (_mode)))
|
|
|
|
|
|
#define AUTH_IS_OPEN(_param) HAS_AUTHMODE((_param), WLAN_CRYPTO_AUTH_OPEN)
|
|
#define AUTH_IS_OPEN(_param) HAS_AUTHMODE((_param), WLAN_CRYPTO_AUTH_OPEN)
|
|
#define AUTH_IS_SHARED_KEY(_param) \
|
|
#define AUTH_IS_SHARED_KEY(_param) \
|
|
@@ -297,8 +297,8 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
|
|
|
|
|
|
|
|
#define RESET_UCAST_CIPHERS(_param) ((_param)->ucastcipherset = 0)
|
|
#define RESET_UCAST_CIPHERS(_param) ((_param)->ucastcipherset = 0)
|
|
-#define SET_UCAST_CIPHER(_param, _c) ((_param)->ucastcipherset |= (1<<(_c)))
|
|
|
|
-#define HAS_UCAST_CIPHER(_param, _c) ((_param)->ucastcipherset & (1<<(_c)))
|
|
|
|
|
|
+#define SET_UCAST_CIPHER(_param, _c) ((_param)->ucastcipherset |= (1 << (_c)))
|
|
|
|
+#define HAS_UCAST_CIPHER(_param, _c) ((_param)->ucastcipherset & (1 << (_c)))
|
|
|
|
|
|
#define UCIPHER_IS_CLEAR(_param) \
|
|
#define UCIPHER_IS_CLEAR(_param) \
|
|
HAS_UCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_NONE)
|
|
HAS_UCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_NONE)
|
|
@@ -318,8 +318,8 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
HAS_UCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
|
HAS_UCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
|
|
|
|
|
#define RESET_MCAST_CIPHERS(_param) ((_param)->mcastcipherset = 0)
|
|
#define RESET_MCAST_CIPHERS(_param) ((_param)->mcastcipherset = 0)
|
|
-#define SET_MCAST_CIPHER(_param, _c) ((_param)->mcastcipherset |= (1<<(_c)))
|
|
|
|
-#define HAS_MCAST_CIPHER(_param, _c) ((_param)->mcastcipherset & (1<<(_c)))
|
|
|
|
|
|
+#define SET_MCAST_CIPHER(_param, _c) ((_param)->mcastcipherset |= (1 << (_c)))
|
|
|
|
+#define HAS_MCAST_CIPHER(_param, _c) ((_param)->mcastcipherset & (1 << (_c)))
|
|
#define HAS_ANY_MCAST_CIPHER(_param) ((_param)->mcastcipherset)
|
|
#define HAS_ANY_MCAST_CIPHER(_param) ((_param)->mcastcipherset)
|
|
#define CLEAR_MCAST_CIPHER(_param, _c) \
|
|
#define CLEAR_MCAST_CIPHER(_param, _c) \
|
|
((_param)->mcastcipherset &= (~(1)<<(_c)))
|
|
((_param)->mcastcipherset &= (~(1)<<(_c)))
|
|
@@ -342,8 +342,8 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
HAS_MCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
|
HAS_MCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
|
|
|
|
|
#define RESET_MGMT_CIPHERS(_param) ((_param)->mgmtcipherset = 0)
|
|
#define RESET_MGMT_CIPHERS(_param) ((_param)->mgmtcipherset = 0)
|
|
-#define SET_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset = (1<<(_c)))
|
|
|
|
-#define HAS_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset & (1<<(_c)))
|
|
|
|
|
|
+#define SET_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset |= (1 << (_c)))
|
|
|
|
+#define HAS_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset & (1 << (_c)))
|
|
#define IS_MGMT_CIPHER(_c) ((_c == WLAN_CRYPTO_CIPHER_AES_CMAC) || \
|
|
#define IS_MGMT_CIPHER(_c) ((_c == WLAN_CRYPTO_CIPHER_AES_CMAC) || \
|
|
(_c == WLAN_CRYPTO_CIPHER_AES_CMAC_256) || \
|
|
(_c == WLAN_CRYPTO_CIPHER_AES_CMAC_256) || \
|
|
(_c == WLAN_CRYPTO_CIPHER_AES_GMAC) || \
|
|
(_c == WLAN_CRYPTO_CIPHER_AES_GMAC) || \
|
|
@@ -361,8 +361,8 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
HAS_MGMT_CIPHER((_param), WLAN_CRYPTO_CIPHER_AES_GMAC_256)
|
|
HAS_MGMT_CIPHER((_param), WLAN_CRYPTO_CIPHER_AES_GMAC_256)
|
|
|
|
|
|
#define RESET_KEY_MGMT(_param) ((_param)->key_mgmt = 0)
|
|
#define RESET_KEY_MGMT(_param) ((_param)->key_mgmt = 0)
|
|
-#define SET_KEY_MGMT(_param, _c) ((_param)->key_mgmt |= (1<<(_c)))
|
|
|
|
-#define HAS_KEY_MGMT(_param, _c) ((_param)->key_mgmt & (1<<(_c)))
|
|
|
|
|
|
+#define SET_KEY_MGMT(_param, _c) ((_param)->key_mgmt |= (1 << (_c + 1)))
|
|
|
|
+#define HAS_KEY_MGMT(_param, _c) ((_param)->key_mgmt & (1 << (_c + 1)))
|
|
|
|
|
|
#define UCAST_CIPHER_MATCH(_param1, _param2) \
|
|
#define UCAST_CIPHER_MATCH(_param1, _param2) \
|
|
(((_param1)->ucastcipherset & (_param2)->ucastcipherset) != 0)
|
|
(((_param1)->ucastcipherset & (_param2)->ucastcipherset) != 0)
|
|
@@ -378,8 +378,8 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|
(!(_param1)->key_mgmt && !(_param2)->key_mgmt))
|
|
(!(_param1)->key_mgmt && !(_param2)->key_mgmt))
|
|
|
|
|
|
#define RESET_CIPHER_CAP(_param) ((_param)->cipher_caps = 0)
|
|
#define RESET_CIPHER_CAP(_param) ((_param)->cipher_caps = 0)
|
|
-#define SET_CIPHER_CAP(_param, _c) ((_param)->cipher_caps |= (1<<(_c)))
|
|
|
|
-#define HAS_CIPHER_CAP(_param, _c) ((_param)->cipher_caps & (1<<(_c)))
|
|
|
|
|
|
+#define SET_CIPHER_CAP(_param, _c) ((_param)->cipher_caps |= (1 << (_c)))
|
|
|
|
+#define HAS_CIPHER_CAP(_param, _c) ((_param)->cipher_caps & (1 << (_c)))
|
|
#define HAS_ANY_CIPHER_CAP(_param) ((_param)->cipher_caps)
|
|
#define HAS_ANY_CIPHER_CAP(_param) ((_param)->cipher_caps)
|
|
|
|
|
|
/**
|
|
/**
|