aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/eap_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/ks7010/eap_packet.h')
-rw-r--r--drivers/staging/ks7010/eap_packet.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h
index 16a392abdaec..df7f760e4110 100644
--- a/drivers/staging/ks7010/eap_packet.h
+++ b/drivers/staging/ks7010/eap_packet.h
@@ -1,6 +1,8 @@
#ifndef EAP_PACKET_H
#define EAP_PACKET_H
+#include <linux/compiler.h>
+
#define WBIT(n) (1 << (n))
#ifndef ETH_ALEN
@@ -19,14 +21,14 @@ struct ether_hdr {
#define ETHER_PROTOCOL_TYPE_IP 0x0800
#define ETHER_PROTOCOL_TYPE_ARP 0x0806
/* followed by length octets of data */
-} __attribute__ ((packed));
+} __packed;
struct ieee802_1x_hdr {
unsigned char version;
unsigned char type;
unsigned short length;
/* followed by length octets of data */
-} __attribute__ ((packed));
+} __packed;
#define EAPOL_VERSION 2
@@ -51,25 +53,33 @@ enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
struct ieee802_1x_eapol_key {
unsigned char type;
unsigned short key_length;
- /* does not repeat within the life of the keying material used to
- * encrypt the Key field; 64-bit NTP timestamp MAY be used here */
+ /*
+ * does not repeat within the life of the keying material used to
+ * encrypt the Key field; 64-bit NTP timestamp MAY be used here
+ */
unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
unsigned char key_iv[IEEE8021X_KEY_IV_LEN]; /* cryptographically random number */
- unsigned char key_index; /* key flag in the most significant bit:
+ unsigned char key_index; /*
+ * key flag in the most significant bit:
* 0 = broadcast (default key),
* 1 = unicast (key mapping key); key index is in the
- * 7 least significant bits */
- /* HMAC-MD5 message integrity check computed with MS-MPPE-Send-Key as
- * the key */
+ * 7 least significant bits
+ */
+ /*
+ * HMAC-MD5 message integrity check computed with MS-MPPE-Send-Key as
+ * the key
+ */
unsigned char key_signature[IEEE8021X_KEY_SIGN_LEN];
- /* followed by key: if packet body length = 44 + key length, then the
+ /*
+ * followed by key: if packet body length = 44 + key length, then the
* key field (of key_length bytes) contains the key in encrypted form;
* if packet body length = 44, key field is absent and key_length
* represents the number of least significant octets from
* MS-MPPE-Send-Key attribute to be used as the keying material;
- * RC4 key used in encryption = Key-IV + MS-MPPE-Recv-Key */
-} __attribute__ ((packed));
+ * RC4 key used in encryption = Key-IV + MS-MPPE-Recv-Key
+ */
+} __packed;
#define WPA_NONCE_LEN 32
#define WPA_REPLAY_COUNTER_LEN 8
@@ -86,7 +96,7 @@ struct wpa_eapol_key {
unsigned char key_mic[16];
unsigned short key_data_length;
/* followed by key_data_length bytes of key_data */
-} __attribute__ ((packed));
+} __packed;
#define WPA_KEY_INFO_TYPE_MASK (WBIT(0) | WBIT(1) | WBIT(2))
#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 WBIT(0)