diff options
author | Matt Kilgore <mattkilgore12@gmail.com> | 2016-09-27 02:05:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-27 13:03:58 +0200 |
commit | 2460563fb490b8061d614f99b1ce1a470fde4913 (patch) | |
tree | 100cf7d65d352e4e7f991d03705744faee093a41 /drivers/staging/ks7010/eap_packet.h | |
parent | 9887b5e51fafaf919601ccb8bdae1e0ad749032f (diff) |
staging: ks7010: Use __packed over __attribute__((packed))
This replaces uses of __attribute__((packed)) with __packed, which is
recommended to be used over the direct __attribute__. This patch then
includes <linux/compiler.h> as necessary to use __packed.
Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/eap_packet.h')
-rw-r--r-- | drivers/staging/ks7010/eap_packet.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h index 16a392abdaec..373c0fe66fc6 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 @@ -69,7 +71,7 @@ struct ieee802_1x_eapol_key { * 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)); +} __packed; #define WPA_NONCE_LEN 32 #define WPA_REPLAY_COUNTER_LEN 8 @@ -86,7 +88,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) |