staging: ks7010: review custom bit defines using macros from bitops header file
This commit reviews custom definitions using custom bit macros changing them for the ones defined in the bitops header file. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
38fc31e73c
Коммит
5fa7ed322b
|
@ -3,10 +3,9 @@
|
|||
#define EAP_PACKET_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <uapi/linux/if_ether.h>
|
||||
|
||||
#define WBIT(n) (1 << (n))
|
||||
|
||||
#define ETHER_HDR_SIZE 20
|
||||
|
||||
struct ether_hdr {
|
||||
|
@ -98,23 +97,23 @@ struct wpa_eapol_key {
|
|||
/* followed by key_data_length bytes of key_data */
|
||||
} __packed;
|
||||
|
||||
#define WPA_KEY_INFO_TYPE_MASK (WBIT(0) | WBIT(1) | WBIT(2))
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 WBIT(0)
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES WBIT(1)
|
||||
#define WPA_KEY_INFO_KEY_TYPE WBIT(3) /* 1 = Pairwise, 0 = Group key */
|
||||
#define WPA_KEY_INFO_TYPE_MASK GENMASK(2, 0)
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 BIT(0)
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES BIT(1)
|
||||
#define WPA_KEY_INFO_KEY_TYPE BIT(3) /* 1 = Pairwise, 0 = Group key */
|
||||
/* bit4..5 is used in WPA, but is reserved in IEEE 802.11i/RSN */
|
||||
#define WPA_KEY_INFO_KEY_INDEX_MASK (WBIT(4) | WBIT(5))
|
||||
#define WPA_KEY_INFO_KEY_INDEX_MASK GENMASK(5, 4)
|
||||
#define WPA_KEY_INFO_KEY_INDEX_SHIFT 4
|
||||
#define WPA_KEY_INFO_INSTALL WBIT(6) /* pairwise */
|
||||
#define WPA_KEY_INFO_TXRX WBIT(6) /* group */
|
||||
#define WPA_KEY_INFO_ACK WBIT(7)
|
||||
#define WPA_KEY_INFO_MIC WBIT(8)
|
||||
#define WPA_KEY_INFO_SECURE WBIT(9)
|
||||
#define WPA_KEY_INFO_ERROR WBIT(10)
|
||||
#define WPA_KEY_INFO_REQUEST WBIT(11)
|
||||
#define WPA_KEY_INFO_ENCR_KEY_DATA WBIT(12) /* IEEE 802.11i/RSN only */
|
||||
#define WPA_KEY_INFO_INSTALL BIT(6) /* pairwise */
|
||||
#define WPA_KEY_INFO_TXRX BIT(6) /* group */
|
||||
#define WPA_KEY_INFO_ACK BIT(7)
|
||||
#define WPA_KEY_INFO_MIC BIT(8)
|
||||
#define WPA_KEY_INFO_SECURE BIT(9)
|
||||
#define WPA_KEY_INFO_ERROR BIT(10)
|
||||
#define WPA_KEY_INFO_REQUEST BIT(11)
|
||||
#define WPA_KEY_INFO_ENCR_KEY_DATA BIT(12) /* IEEE 802.11i/RSN only */
|
||||
|
||||
#define WPA_CAPABILITY_PREAUTH WBIT(0)
|
||||
#define WPA_CAPABILITY_PREAUTH BIT(0)
|
||||
|
||||
#define GENERIC_INFO_ELEM 0xdd
|
||||
#define RSN_INFO_ELEM 0x30
|
||||
|
|
Загрузка…
Ссылка в новой задаче