aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-06-03 06:21:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-03 06:21:52 -0400
commitbc10502dba37d3b210efd9f3867212298f13b78e (patch)
treeaf4542eaab79cd509244578f839167f16f3ab02d /include/linux
parentba2d3587912f82d1ab4367975b1df460db60fb1e (diff)
net: use __packed annotation
cleanup patch. Use new __packed annotation in net/ and include/ (except netfilter) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_ether.h2
-rw-r--r--include/linux/if_fddi.h8
-rw-r--r--include/linux/if_frad.h2
-rw-r--r--include/linux/if_hippi.h8
-rw-r--r--include/linux/if_pppox.h8
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/isdnif.h2
-rw-r--r--include/linux/mISDNif.h2
-rw-r--r--include/linux/nbd.h2
-rw-r--r--include/linux/ncp.h10
-rw-r--r--include/linux/ncp_fs_sb.h14
-rw-r--r--include/linux/phonet.h4
-rw-r--r--include/linux/rds.h12
-rw-r--r--include/linux/sctp.h80
-rw-r--r--include/linux/wlp.h22
15 files changed, 90 insertions, 90 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index bed7a4682b90..c831467774d0 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -119,7 +119,7 @@ struct ethhdr {
119 unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ 119 unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
120 unsigned char h_source[ETH_ALEN]; /* source ether addr */ 120 unsigned char h_source[ETH_ALEN]; /* source ether addr */
121 __be16 h_proto; /* packet type ID field */ 121 __be16 h_proto; /* packet type ID field */
122} __attribute__((packed)); 122} __packed;
123 123
124#ifdef __KERNEL__ 124#ifdef __KERNEL__
125#include <linux/skbuff.h> 125#include <linux/skbuff.h>
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h
index 5459c5c09930..9947c39e62f6 100644
--- a/include/linux/if_fddi.h
+++ b/include/linux/if_fddi.h
@@ -67,7 +67,7 @@ struct fddi_8022_1_hdr {
67 __u8 dsap; /* destination service access point */ 67 __u8 dsap; /* destination service access point */
68 __u8 ssap; /* source service access point */ 68 __u8 ssap; /* source service access point */
69 __u8 ctrl; /* control byte #1 */ 69 __u8 ctrl; /* control byte #1 */
70} __attribute__ ((packed)); 70} __packed;
71 71
72/* Define 802.2 Type 2 header */ 72/* Define 802.2 Type 2 header */
73struct fddi_8022_2_hdr { 73struct fddi_8022_2_hdr {
@@ -75,7 +75,7 @@ struct fddi_8022_2_hdr {
75 __u8 ssap; /* source service access point */ 75 __u8 ssap; /* source service access point */
76 __u8 ctrl_1; /* control byte #1 */ 76 __u8 ctrl_1; /* control byte #1 */
77 __u8 ctrl_2; /* control byte #2 */ 77 __u8 ctrl_2; /* control byte #2 */
78} __attribute__ ((packed)); 78} __packed;
79 79
80/* Define 802.2 SNAP header */ 80/* Define 802.2 SNAP header */
81#define FDDI_K_OUI_LEN 3 81#define FDDI_K_OUI_LEN 3
@@ -85,7 +85,7 @@ struct fddi_snap_hdr {
85 __u8 ctrl; /* always 0x03 */ 85 __u8 ctrl; /* always 0x03 */
86 __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ 86 __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */
87 __be16 ethertype; /* packet type ID field */ 87 __be16 ethertype; /* packet type ID field */
88} __attribute__ ((packed)); 88} __packed;
89 89
90/* Define FDDI LLC frame header */ 90/* Define FDDI LLC frame header */
91struct fddihdr { 91struct fddihdr {
@@ -98,7 +98,7 @@ struct fddihdr {
98 struct fddi_8022_2_hdr llc_8022_2; 98 struct fddi_8022_2_hdr llc_8022_2;
99 struct fddi_snap_hdr llc_snap; 99 struct fddi_snap_hdr llc_snap;
100 } hdr; 100 } hdr;
101} __attribute__ ((packed)); 101} __packed;
102 102
103#ifdef __KERNEL__ 103#ifdef __KERNEL__
104#include <linux/netdevice.h> 104#include <linux/netdevice.h>
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 80b3a1056a5f..191ee0869bc1 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -135,7 +135,7 @@ struct frhdr
135 __be16 PID; 135 __be16 PID;
136 136
137#define IP_NLPID pad 137#define IP_NLPID pad
138} __attribute__((packed)); 138} __packed;
139 139
140/* see RFC 1490 for the definition of the following */ 140/* see RFC 1490 for the definition of the following */
141#define FRAD_I_UI 0x03 141#define FRAD_I_UI 0x03
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h
index 8d038eb8db5c..5fe5f307c6f5 100644
--- a/include/linux/if_hippi.h
+++ b/include/linux/if_hippi.h
@@ -104,7 +104,7 @@ struct hippi_fp_hdr {
104 __be32 fixed; 104 __be32 fixed;
105#endif 105#endif
106 __be32 d2_size; 106 __be32 d2_size;
107} __attribute__ ((packed)); 107} __packed;
108 108
109struct hippi_le_hdr { 109struct hippi_le_hdr {
110#if defined (__BIG_ENDIAN_BITFIELD) 110#if defined (__BIG_ENDIAN_BITFIELD)
@@ -129,7 +129,7 @@ struct hippi_le_hdr {
129 __u8 daddr[HIPPI_ALEN]; 129 __u8 daddr[HIPPI_ALEN];
130 __u16 locally_administered; 130 __u16 locally_administered;
131 __u8 saddr[HIPPI_ALEN]; 131 __u8 saddr[HIPPI_ALEN];
132} __attribute__ ((packed)); 132} __packed;
133 133
134#define HIPPI_OUI_LEN 3 134#define HIPPI_OUI_LEN 3
135/* 135/*
@@ -142,12 +142,12 @@ struct hippi_snap_hdr {
142 __u8 ctrl; /* always 0x03 */ 142 __u8 ctrl; /* always 0x03 */
143 __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ 143 __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/
144 __be16 ethertype; /* packet type ID field */ 144 __be16 ethertype; /* packet type ID field */
145} __attribute__ ((packed)); 145} __packed;
146 146
147struct hippi_hdr { 147struct hippi_hdr {
148 struct hippi_fp_hdr fp; 148 struct hippi_fp_hdr fp;
149 struct hippi_le_hdr le; 149 struct hippi_le_hdr le;
150 struct hippi_snap_hdr snap; 150 struct hippi_snap_hdr snap;
151} __attribute__ ((packed)); 151} __packed;
152 152
153#endif /* _LINUX_IF_HIPPI_H */ 153#endif /* _LINUX_IF_HIPPI_H */
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index a6577af0c4e6..1925e0c3f162 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -59,7 +59,7 @@ struct sockaddr_pppox {
59 union{ 59 union{
60 struct pppoe_addr pppoe; 60 struct pppoe_addr pppoe;
61 }sa_addr; 61 }sa_addr;
62}__attribute__ ((packed)); 62} __packed;
63 63
64/* The use of the above union isn't viable because the size of this 64/* The use of the above union isn't viable because the size of this
65 * struct must stay fixed over time -- applications use sizeof(struct 65 * struct must stay fixed over time -- applications use sizeof(struct
@@ -70,7 +70,7 @@ struct sockaddr_pppol2tp {
70 sa_family_t sa_family; /* address family, AF_PPPOX */ 70 sa_family_t sa_family; /* address family, AF_PPPOX */
71 unsigned int sa_protocol; /* protocol identifier */ 71 unsigned int sa_protocol; /* protocol identifier */
72 struct pppol2tp_addr pppol2tp; 72 struct pppol2tp_addr pppol2tp;
73}__attribute__ ((packed)); 73} __packed;
74 74
75/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 75/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
76 * bits. So we need a different sockaddr structure. 76 * bits. So we need a different sockaddr structure.
@@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 {
79 sa_family_t sa_family; /* address family, AF_PPPOX */ 79 sa_family_t sa_family; /* address family, AF_PPPOX */
80 unsigned int sa_protocol; /* protocol identifier */ 80 unsigned int sa_protocol; /* protocol identifier */
81 struct pppol2tpv3_addr pppol2tp; 81 struct pppol2tpv3_addr pppol2tp;
82} __attribute__ ((packed)); 82} __packed;
83 83
84/********************************************************************* 84/*********************************************************************
85 * 85 *
@@ -129,7 +129,7 @@ struct pppoe_hdr {
129 __be16 sid; 129 __be16 sid;
130 __be16 length; 130 __be16 length;
131 struct pppoe_tag tag[0]; 131 struct pppoe_tag tag[0];
132} __attribute__ ((packed)); 132} __packed;
133 133
134/* Length of entire PPPoE + PPP header */ 134/* Length of entire PPPoE + PPP header */
135#define PPPOE_SES_HLEN 8 135#define PPPOE_SES_HLEN 8
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 99e1ab7e3eec..940e21595351 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -58,7 +58,7 @@ struct ipv6_opt_hdr {
58 /* 58 /*
59 * TLV encoded option data follows. 59 * TLV encoded option data follows.
60 */ 60 */
61} __attribute__ ((packed)); /* required for some archs */ 61} __packed; /* required for some archs */
62 62
63#define ipv6_destopt_hdr ipv6_opt_hdr 63#define ipv6_destopt_hdr ipv6_opt_hdr
64#define ipv6_hopopt_hdr ipv6_opt_hdr 64#define ipv6_hopopt_hdr ipv6_opt_hdr
@@ -99,7 +99,7 @@ struct ipv6_destopt_hao {
99 __u8 type; 99 __u8 type;
100 __u8 length; 100 __u8 length;
101 struct in6_addr addr; 101 struct in6_addr addr;
102} __attribute__ ((__packed__)); 102} __packed;
103 103
104/* 104/*
105 * IPv6 fixed header 105 * IPv6 fixed header
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h
index b9b5a684ed69..b8c23f88dd54 100644
--- a/include/linux/isdnif.h
+++ b/include/linux/isdnif.h
@@ -317,7 +317,7 @@ typedef struct T30_s {
317 __u8 r_scantime; 317 __u8 r_scantime;
318 __u8 r_id[FAXIDLEN]; 318 __u8 r_id[FAXIDLEN];
319 __u8 r_code; 319 __u8 r_code;
320} __attribute__((packed)) T30_s; 320} __packed T30_s;
321 321
322#define ISDN_TTY_FAX_CONN_IN 0 322#define ISDN_TTY_FAX_CONN_IN 0
323#define ISDN_TTY_FAX_CONN_OUT 1 323#define ISDN_TTY_FAX_CONN_OUT 1
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index 78c3bed1c3f5..b5e7f2202484 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -251,7 +251,7 @@
251struct mISDNhead { 251struct mISDNhead {
252 unsigned int prim; 252 unsigned int prim;
253 unsigned int id; 253 unsigned int id;
254} __attribute__((packed)); 254} __packed;
255 255
256#define MISDN_HEADER_LEN sizeof(struct mISDNhead) 256#define MISDN_HEADER_LEN sizeof(struct mISDNhead)
257#define MAX_DATA_SIZE 2048 257#define MAX_DATA_SIZE 2048
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
index 155719dab813..bb58854a8061 100644
--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -88,7 +88,7 @@ struct nbd_request {
88 char handle[8]; 88 char handle[8];
89 __be64 from; 89 __be64 from;
90 __be32 len; 90 __be32 len;
91} __attribute__ ((packed)); 91} __packed;
92 92
93/* 93/*
94 * This is the reply packet that nbd-server sends back to the client after 94 * This is the reply packet that nbd-server sends back to the client after
diff --git a/include/linux/ncp.h b/include/linux/ncp.h
index 99f0adeeb3f3..3ace8370e61e 100644
--- a/include/linux/ncp.h
+++ b/include/linux/ncp.h
@@ -27,7 +27,7 @@ struct ncp_request_header {
27 __u8 conn_high; 27 __u8 conn_high;
28 __u8 function; 28 __u8 function;
29 __u8 data[0]; 29 __u8 data[0];
30} __attribute__((packed)); 30} __packed;
31 31
32#define NCP_REPLY (0x3333) 32#define NCP_REPLY (0x3333)
33#define NCP_WATCHDOG (0x3E3E) 33#define NCP_WATCHDOG (0x3E3E)
@@ -42,7 +42,7 @@ struct ncp_reply_header {
42 __u8 completion_code; 42 __u8 completion_code;
43 __u8 connection_state; 43 __u8 connection_state;
44 __u8 data[0]; 44 __u8 data[0];
45} __attribute__((packed)); 45} __packed;
46 46
47#define NCP_VOLNAME_LEN (16) 47#define NCP_VOLNAME_LEN (16)
48#define NCP_NUMBER_OF_VOLUMES (256) 48#define NCP_NUMBER_OF_VOLUMES (256)
@@ -158,7 +158,7 @@ struct nw_info_struct {
158#ifdef __KERNEL__ 158#ifdef __KERNEL__
159 struct nw_nfs_info nfs; 159 struct nw_nfs_info nfs;
160#endif 160#endif
161} __attribute__((packed)); 161} __packed;
162 162
163/* modify mask - use with MODIFY_DOS_INFO structure */ 163/* modify mask - use with MODIFY_DOS_INFO structure */
164#define DM_ATTRIBUTES (cpu_to_le32(0x02)) 164#define DM_ATTRIBUTES (cpu_to_le32(0x02))
@@ -190,12 +190,12 @@ struct nw_modify_dos_info {
190 __u16 inheritanceGrantMask; 190 __u16 inheritanceGrantMask;
191 __u16 inheritanceRevokeMask; 191 __u16 inheritanceRevokeMask;
192 __u32 maximumSpace; 192 __u32 maximumSpace;
193} __attribute__((packed)); 193} __packed;
194 194
195struct nw_search_sequence { 195struct nw_search_sequence {
196 __u8 volNumber; 196 __u8 volNumber;
197 __u32 dirBase; 197 __u32 dirBase;
198 __u32 sequence; 198 __u32 sequence;
199} __attribute__((packed)); 199} __packed;
200 200
201#endif /* _LINUX_NCP_H */ 201#endif /* _LINUX_NCP_H */
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h
index 5ec9ca671687..8da05bc098ca 100644
--- a/include/linux/ncp_fs_sb.h
+++ b/include/linux/ncp_fs_sb.h
@@ -104,13 +104,13 @@ struct ncp_server {
104 104
105 unsigned int state; /* STREAM only: receiver state */ 105 unsigned int state; /* STREAM only: receiver state */
106 struct { 106 struct {
107 __u32 magic __attribute__((packed)); 107 __u32 magic __packed;
108 __u32 len __attribute__((packed)); 108 __u32 len __packed;
109 __u16 type __attribute__((packed)); 109 __u16 type __packed;
110 __u16 p1 __attribute__((packed)); 110 __u16 p1 __packed;
111 __u16 p2 __attribute__((packed)); 111 __u16 p2 __packed;
112 __u16 p3 __attribute__((packed)); 112 __u16 p3 __packed;
113 __u16 type2 __attribute__((packed)); 113 __u16 type2 __packed;
114 } buf; /* STREAM only: temporary buffer */ 114 } buf; /* STREAM only: temporary buffer */
115 unsigned char* ptr; /* STREAM only: pointer to data */ 115 unsigned char* ptr; /* STREAM only: pointer to data */
116 size_t len; /* STREAM only: length of data to receive */ 116 size_t len; /* STREAM only: length of data to receive */
diff --git a/include/linux/phonet.h b/include/linux/phonet.h
index e5126cff9b2a..24426c3d6b5a 100644
--- a/include/linux/phonet.h
+++ b/include/linux/phonet.h
@@ -56,7 +56,7 @@ struct phonethdr {
56 __be16 pn_length; 56 __be16 pn_length;
57 __u8 pn_robj; 57 __u8 pn_robj;
58 __u8 pn_sobj; 58 __u8 pn_sobj;
59} __attribute__((packed)); 59} __packed;
60 60
61/* Common Phonet payload header */ 61/* Common Phonet payload header */
62struct phonetmsg { 62struct phonetmsg {
@@ -98,7 +98,7 @@ struct sockaddr_pn {
98 __u8 spn_dev; 98 __u8 spn_dev;
99 __u8 spn_resource; 99 __u8 spn_resource;
100 __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; 100 __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3];
101} __attribute__ ((packed)); 101} __packed;
102 102
103/* Well known address */ 103/* Well known address */
104#define PN_DEV_PC 0x10 104#define PN_DEV_PC 0x10
diff --git a/include/linux/rds.h b/include/linux/rds.h
index cab4994c2f63..24bce3ded9ea 100644
--- a/include/linux/rds.h
+++ b/include/linux/rds.h
@@ -100,7 +100,7 @@
100struct rds_info_counter { 100struct rds_info_counter {
101 u_int8_t name[32]; 101 u_int8_t name[32];
102 u_int64_t value; 102 u_int64_t value;
103} __attribute__((packed)); 103} __packed;
104 104
105#define RDS_INFO_CONNECTION_FLAG_SENDING 0x01 105#define RDS_INFO_CONNECTION_FLAG_SENDING 0x01
106#define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02 106#define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02
@@ -115,7 +115,7 @@ struct rds_info_connection {
115 __be32 faddr; 115 __be32 faddr;
116 u_int8_t transport[TRANSNAMSIZ]; /* null term ascii */ 116 u_int8_t transport[TRANSNAMSIZ]; /* null term ascii */
117 u_int8_t flags; 117 u_int8_t flags;
118} __attribute__((packed)); 118} __packed;
119 119
120struct rds_info_flow { 120struct rds_info_flow {
121 __be32 laddr; 121 __be32 laddr;
@@ -123,7 +123,7 @@ struct rds_info_flow {
123 u_int32_t bytes; 123 u_int32_t bytes;
124 __be16 lport; 124 __be16 lport;
125 __be16 fport; 125 __be16 fport;
126} __attribute__((packed)); 126} __packed;
127 127
128#define RDS_INFO_MESSAGE_FLAG_ACK 0x01 128#define RDS_INFO_MESSAGE_FLAG_ACK 0x01
129#define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02 129#define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02
@@ -136,7 +136,7 @@ struct rds_info_message {
136 __be16 lport; 136 __be16 lport;
137 __be16 fport; 137 __be16 fport;
138 u_int8_t flags; 138 u_int8_t flags;
139} __attribute__((packed)); 139} __packed;
140 140
141struct rds_info_socket { 141struct rds_info_socket {
142 u_int32_t sndbuf; 142 u_int32_t sndbuf;
@@ -146,7 +146,7 @@ struct rds_info_socket {
146 __be16 connected_port; 146 __be16 connected_port;
147 u_int32_t rcvbuf; 147 u_int32_t rcvbuf;
148 u_int64_t inum; 148 u_int64_t inum;
149} __attribute__((packed)); 149} __packed;
150 150
151struct rds_info_tcp_socket { 151struct rds_info_tcp_socket {
152 __be32 local_addr; 152 __be32 local_addr;
@@ -158,7 +158,7 @@ struct rds_info_tcp_socket {
158 u_int32_t last_sent_nxt; 158 u_int32_t last_sent_nxt;
159 u_int32_t last_expected_una; 159 u_int32_t last_expected_una;
160 u_int32_t last_seen_una; 160 u_int32_t last_seen_una;
161} __attribute__((packed)); 161} __packed;
162 162
163#define RDS_IB_GID_LEN 16 163#define RDS_IB_GID_LEN 16
164struct rds_info_rdma_connection { 164struct rds_info_rdma_connection {
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index c20d3ce673c0..c11a28706fa4 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -61,7 +61,7 @@ typedef struct sctphdr {
61 __be16 dest; 61 __be16 dest;
62 __be32 vtag; 62 __be32 vtag;
63 __le32 checksum; 63 __le32 checksum;
64} __attribute__((packed)) sctp_sctphdr_t; 64} __packed sctp_sctphdr_t;
65 65
66#ifdef __KERNEL__ 66#ifdef __KERNEL__
67#include <linux/skbuff.h> 67#include <linux/skbuff.h>
@@ -77,7 +77,7 @@ typedef struct sctp_chunkhdr {
77 __u8 type; 77 __u8 type;
78 __u8 flags; 78 __u8 flags;
79 __be16 length; 79 __be16 length;
80} __attribute__((packed)) sctp_chunkhdr_t; 80} __packed sctp_chunkhdr_t;
81 81
82 82
83/* Section 3.2. Chunk Type Values. 83/* Section 3.2. Chunk Type Values.
@@ -167,7 +167,7 @@ enum { SCTP_CHUNK_FLAG_T = 0x01 };
167typedef struct sctp_paramhdr { 167typedef struct sctp_paramhdr {
168 __be16 type; 168 __be16 type;
169 __be16 length; 169 __be16 length;
170} __attribute__((packed)) sctp_paramhdr_t; 170} __packed sctp_paramhdr_t;
171 171
172typedef enum { 172typedef enum {
173 173
@@ -228,12 +228,12 @@ typedef struct sctp_datahdr {
228 __be16 ssn; 228 __be16 ssn;
229 __be32 ppid; 229 __be32 ppid;
230 __u8 payload[0]; 230 __u8 payload[0];
231} __attribute__((packed)) sctp_datahdr_t; 231} __packed sctp_datahdr_t;
232 232
233typedef struct sctp_data_chunk { 233typedef struct sctp_data_chunk {
234 sctp_chunkhdr_t chunk_hdr; 234 sctp_chunkhdr_t chunk_hdr;
235 sctp_datahdr_t data_hdr; 235 sctp_datahdr_t data_hdr;
236} __attribute__((packed)) sctp_data_chunk_t; 236} __packed sctp_data_chunk_t;
237 237
238/* DATA Chuck Specific Flags */ 238/* DATA Chuck Specific Flags */
239enum { 239enum {
@@ -259,78 +259,78 @@ typedef struct sctp_inithdr {
259 __be16 num_inbound_streams; 259 __be16 num_inbound_streams;
260 __be32 initial_tsn; 260 __be32 initial_tsn;
261 __u8 params[0]; 261 __u8 params[0];
262} __attribute__((packed)) sctp_inithdr_t; 262} __packed sctp_inithdr_t;
263 263
264typedef struct sctp_init_chunk { 264typedef struct sctp_init_chunk {
265 sctp_chunkhdr_t chunk_hdr; 265 sctp_chunkhdr_t chunk_hdr;
266 sctp_inithdr_t init_hdr; 266 sctp_inithdr_t init_hdr;
267} __attribute__((packed)) sctp_init_chunk_t; 267} __packed sctp_init_chunk_t;
268 268
269 269
270/* Section 3.3.2.1. IPv4 Address Parameter (5) */ 270/* Section 3.3.2.1. IPv4 Address Parameter (5) */
271typedef struct sctp_ipv4addr_param { 271typedef struct sctp_ipv4addr_param {
272 sctp_paramhdr_t param_hdr; 272 sctp_paramhdr_t param_hdr;
273 struct in_addr addr; 273 struct in_addr addr;
274} __attribute__((packed)) sctp_ipv4addr_param_t; 274} __packed sctp_ipv4addr_param_t;
275 275
276/* Section 3.3.2.1. IPv6 Address Parameter (6) */ 276/* Section 3.3.2.1. IPv6 Address Parameter (6) */
277typedef struct sctp_ipv6addr_param { 277typedef struct sctp_ipv6addr_param {
278 sctp_paramhdr_t param_hdr; 278 sctp_paramhdr_t param_hdr;
279 struct in6_addr addr; 279 struct in6_addr addr;
280} __attribute__((packed)) sctp_ipv6addr_param_t; 280} __packed sctp_ipv6addr_param_t;
281 281
282/* Section 3.3.2.1 Cookie Preservative (9) */ 282/* Section 3.3.2.1 Cookie Preservative (9) */
283typedef struct sctp_cookie_preserve_param { 283typedef struct sctp_cookie_preserve_param {
284 sctp_paramhdr_t param_hdr; 284 sctp_paramhdr_t param_hdr;
285 __be32 lifespan_increment; 285 __be32 lifespan_increment;
286} __attribute__((packed)) sctp_cookie_preserve_param_t; 286} __packed sctp_cookie_preserve_param_t;
287 287
288/* Section 3.3.2.1 Host Name Address (11) */ 288/* Section 3.3.2.1 Host Name Address (11) */
289typedef struct sctp_hostname_param { 289typedef struct sctp_hostname_param {
290 sctp_paramhdr_t param_hdr; 290 sctp_paramhdr_t param_hdr;
291 uint8_t hostname[0]; 291 uint8_t hostname[0];
292} __attribute__((packed)) sctp_hostname_param_t; 292} __packed sctp_hostname_param_t;
293 293
294/* Section 3.3.2.1 Supported Address Types (12) */ 294/* Section 3.3.2.1 Supported Address Types (12) */
295typedef struct sctp_supported_addrs_param { 295typedef struct sctp_supported_addrs_param {
296 sctp_paramhdr_t param_hdr; 296 sctp_paramhdr_t param_hdr;
297 __be16 types[0]; 297 __be16 types[0];
298} __attribute__((packed)) sctp_supported_addrs_param_t; 298} __packed sctp_supported_addrs_param_t;
299 299
300/* Appendix A. ECN Capable (32768) */ 300/* Appendix A. ECN Capable (32768) */
301typedef struct sctp_ecn_capable_param { 301typedef struct sctp_ecn_capable_param {
302 sctp_paramhdr_t param_hdr; 302 sctp_paramhdr_t param_hdr;
303} __attribute__((packed)) sctp_ecn_capable_param_t; 303} __packed sctp_ecn_capable_param_t;
304 304
305/* ADDIP Section 3.2.6 Adaptation Layer Indication */ 305/* ADDIP Section 3.2.6 Adaptation Layer Indication */
306typedef struct sctp_adaptation_ind_param { 306typedef struct sctp_adaptation_ind_param {
307 struct sctp_paramhdr param_hdr; 307 struct sctp_paramhdr param_hdr;
308 __be32 adaptation_ind; 308 __be32 adaptation_ind;
309} __attribute__((packed)) sctp_adaptation_ind_param_t; 309} __packed sctp_adaptation_ind_param_t;
310 310
311/* ADDIP Section 4.2.7 Supported Extensions Parameter */ 311/* ADDIP Section 4.2.7 Supported Extensions Parameter */
312typedef struct sctp_supported_ext_param { 312typedef struct sctp_supported_ext_param {
313 struct sctp_paramhdr param_hdr; 313 struct sctp_paramhdr param_hdr;
314 __u8 chunks[0]; 314 __u8 chunks[0];
315} __attribute__((packed)) sctp_supported_ext_param_t; 315} __packed sctp_supported_ext_param_t;
316 316
317/* AUTH Section 3.1 Random */ 317/* AUTH Section 3.1 Random */
318typedef struct sctp_random_param { 318typedef struct sctp_random_param {
319 sctp_paramhdr_t param_hdr; 319 sctp_paramhdr_t param_hdr;
320 __u8 random_val[0]; 320 __u8 random_val[0];
321} __attribute__((packed)) sctp_random_param_t; 321} __packed sctp_random_param_t;
322 322
323/* AUTH Section 3.2 Chunk List */ 323/* AUTH Section 3.2 Chunk List */
324typedef struct sctp_chunks_param { 324typedef struct sctp_chunks_param {
325 sctp_paramhdr_t param_hdr; 325 sctp_paramhdr_t param_hdr;
326 __u8 chunks[0]; 326 __u8 chunks[0];
327} __attribute__((packed)) sctp_chunks_param_t; 327} __packed sctp_chunks_param_t;
328 328
329/* AUTH Section 3.3 HMAC Algorithm */ 329/* AUTH Section 3.3 HMAC Algorithm */
330typedef struct sctp_hmac_algo_param { 330typedef struct sctp_hmac_algo_param {
331 sctp_paramhdr_t param_hdr; 331 sctp_paramhdr_t param_hdr;
332 __be16 hmac_ids[0]; 332 __be16 hmac_ids[0];
333} __attribute__((packed)) sctp_hmac_algo_param_t; 333} __packed sctp_hmac_algo_param_t;
334 334
335/* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): 335/* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2):
336 * The INIT ACK chunk is used to acknowledge the initiation of an SCTP 336 * The INIT ACK chunk is used to acknowledge the initiation of an SCTP
@@ -342,13 +342,13 @@ typedef sctp_init_chunk_t sctp_initack_chunk_t;
342typedef struct sctp_cookie_param { 342typedef struct sctp_cookie_param {
343 sctp_paramhdr_t p; 343 sctp_paramhdr_t p;
344 __u8 body[0]; 344 __u8 body[0];
345} __attribute__((packed)) sctp_cookie_param_t; 345} __packed sctp_cookie_param_t;
346 346
347/* Section 3.3.3.1 Unrecognized Parameters (8) */ 347/* Section 3.3.3.1 Unrecognized Parameters (8) */
348typedef struct sctp_unrecognized_param { 348typedef struct sctp_unrecognized_param {
349 sctp_paramhdr_t param_hdr; 349 sctp_paramhdr_t param_hdr;
350 sctp_paramhdr_t unrecognized; 350 sctp_paramhdr_t unrecognized;
351} __attribute__((packed)) sctp_unrecognized_param_t; 351} __packed sctp_unrecognized_param_t;
352 352
353 353
354 354
@@ -363,7 +363,7 @@ typedef struct sctp_unrecognized_param {
363typedef struct sctp_gap_ack_block { 363typedef struct sctp_gap_ack_block {
364 __be16 start; 364 __be16 start;
365 __be16 end; 365 __be16 end;
366} __attribute__((packed)) sctp_gap_ack_block_t; 366} __packed sctp_gap_ack_block_t;
367 367
368typedef __be32 sctp_dup_tsn_t; 368typedef __be32 sctp_dup_tsn_t;
369 369
@@ -378,12 +378,12 @@ typedef struct sctp_sackhdr {
378 __be16 num_gap_ack_blocks; 378 __be16 num_gap_ack_blocks;
379 __be16 num_dup_tsns; 379 __be16 num_dup_tsns;
380 sctp_sack_variable_t variable[0]; 380 sctp_sack_variable_t variable[0];
381} __attribute__((packed)) sctp_sackhdr_t; 381} __packed sctp_sackhdr_t;
382 382
383typedef struct sctp_sack_chunk { 383typedef struct sctp_sack_chunk {
384 sctp_chunkhdr_t chunk_hdr; 384 sctp_chunkhdr_t chunk_hdr;
385 sctp_sackhdr_t sack_hdr; 385 sctp_sackhdr_t sack_hdr;
386} __attribute__((packed)) sctp_sack_chunk_t; 386} __packed sctp_sack_chunk_t;
387 387
388 388
389/* RFC 2960. Section 3.3.5 Heartbeat Request (HEARTBEAT) (4): 389/* RFC 2960. Section 3.3.5 Heartbeat Request (HEARTBEAT) (4):
@@ -395,12 +395,12 @@ typedef struct sctp_sack_chunk {
395 395
396typedef struct sctp_heartbeathdr { 396typedef struct sctp_heartbeathdr {
397 sctp_paramhdr_t info; 397 sctp_paramhdr_t info;
398} __attribute__((packed)) sctp_heartbeathdr_t; 398} __packed sctp_heartbeathdr_t;
399 399
400typedef struct sctp_heartbeat_chunk { 400typedef struct sctp_heartbeat_chunk {
401 sctp_chunkhdr_t chunk_hdr; 401 sctp_chunkhdr_t chunk_hdr;
402 sctp_heartbeathdr_t hb_hdr; 402 sctp_heartbeathdr_t hb_hdr;
403} __attribute__((packed)) sctp_heartbeat_chunk_t; 403} __packed sctp_heartbeat_chunk_t;
404 404
405 405
406/* For the abort and shutdown ACK we must carry the init tag in the 406/* For the abort and shutdown ACK we must carry the init tag in the
@@ -409,7 +409,7 @@ typedef struct sctp_heartbeat_chunk {
409 */ 409 */
410typedef struct sctp_abort_chunk { 410typedef struct sctp_abort_chunk {
411 sctp_chunkhdr_t uh; 411 sctp_chunkhdr_t uh;
412} __attribute__((packed)) sctp_abort_chunk_t; 412} __packed sctp_abort_chunk_t;
413 413
414 414
415/* For the graceful shutdown we must carry the tag (in common header) 415/* For the graceful shutdown we must carry the tag (in common header)
@@ -417,12 +417,12 @@ typedef struct sctp_abort_chunk {
417 */ 417 */
418typedef struct sctp_shutdownhdr { 418typedef struct sctp_shutdownhdr {
419 __be32 cum_tsn_ack; 419 __be32 cum_tsn_ack;
420} __attribute__((packed)) sctp_shutdownhdr_t; 420} __packed sctp_shutdownhdr_t;
421 421
422struct sctp_shutdown_chunk_t { 422struct sctp_shutdown_chunk_t {
423 sctp_chunkhdr_t chunk_hdr; 423 sctp_chunkhdr_t chunk_hdr;
424 sctp_shutdownhdr_t shutdown_hdr; 424 sctp_shutdownhdr_t shutdown_hdr;
425} __attribute__ ((packed)); 425} __packed;
426 426
427/* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ 427/* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */
428 428
@@ -430,12 +430,12 @@ typedef struct sctp_errhdr {
430 __be16 cause; 430 __be16 cause;
431 __be16 length; 431 __be16 length;
432 __u8 variable[0]; 432 __u8 variable[0];
433} __attribute__((packed)) sctp_errhdr_t; 433} __packed sctp_errhdr_t;
434 434
435typedef struct sctp_operr_chunk { 435typedef struct sctp_operr_chunk {
436 sctp_chunkhdr_t chunk_hdr; 436 sctp_chunkhdr_t chunk_hdr;
437 sctp_errhdr_t err_hdr; 437 sctp_errhdr_t err_hdr;
438} __attribute__((packed)) sctp_operr_chunk_t; 438} __packed sctp_operr_chunk_t;
439 439
440/* RFC 2960 3.3.10 - Operation Error 440/* RFC 2960 3.3.10 - Operation Error
441 * 441 *
@@ -525,7 +525,7 @@ typedef struct sctp_ecnehdr {
525typedef struct sctp_ecne_chunk { 525typedef struct sctp_ecne_chunk {
526 sctp_chunkhdr_t chunk_hdr; 526 sctp_chunkhdr_t chunk_hdr;
527 sctp_ecnehdr_t ence_hdr; 527 sctp_ecnehdr_t ence_hdr;
528} __attribute__((packed)) sctp_ecne_chunk_t; 528} __packed sctp_ecne_chunk_t;
529 529
530/* RFC 2960. Appendix A. Explicit Congestion Notification. 530/* RFC 2960. Appendix A. Explicit Congestion Notification.
531 * Congestion Window Reduced (CWR) (13) 531 * Congestion Window Reduced (CWR) (13)
@@ -537,7 +537,7 @@ typedef struct sctp_cwrhdr {
537typedef struct sctp_cwr_chunk { 537typedef struct sctp_cwr_chunk {
538 sctp_chunkhdr_t chunk_hdr; 538 sctp_chunkhdr_t chunk_hdr;
539 sctp_cwrhdr_t cwr_hdr; 539 sctp_cwrhdr_t cwr_hdr;
540} __attribute__((packed)) sctp_cwr_chunk_t; 540} __packed sctp_cwr_chunk_t;
541 541
542/* PR-SCTP 542/* PR-SCTP
543 * 3.2 Forward Cumulative TSN Chunk Definition (FORWARD TSN) 543 * 3.2 Forward Cumulative TSN Chunk Definition (FORWARD TSN)
@@ -588,17 +588,17 @@ typedef struct sctp_cwr_chunk {
588struct sctp_fwdtsn_skip { 588struct sctp_fwdtsn_skip {
589 __be16 stream; 589 __be16 stream;
590 __be16 ssn; 590 __be16 ssn;
591} __attribute__((packed)); 591} __packed;
592 592
593struct sctp_fwdtsn_hdr { 593struct sctp_fwdtsn_hdr {
594 __be32 new_cum_tsn; 594 __be32 new_cum_tsn;
595 struct sctp_fwdtsn_skip skip[0]; 595 struct sctp_fwdtsn_skip skip[0];
596} __attribute((packed)); 596} __packed;
597 597
598struct sctp_fwdtsn_chunk { 598struct sctp_fwdtsn_chunk {
599 struct sctp_chunkhdr chunk_hdr; 599 struct sctp_chunkhdr chunk_hdr;
600 struct sctp_fwdtsn_hdr fwdtsn_hdr; 600 struct sctp_fwdtsn_hdr fwdtsn_hdr;
601} __attribute((packed)); 601} __packed;
602 602
603 603
604/* ADDIP 604/* ADDIP
@@ -636,17 +636,17 @@ struct sctp_fwdtsn_chunk {
636typedef struct sctp_addip_param { 636typedef struct sctp_addip_param {
637 sctp_paramhdr_t param_hdr; 637 sctp_paramhdr_t param_hdr;
638 __be32 crr_id; 638 __be32 crr_id;
639} __attribute__((packed)) sctp_addip_param_t; 639} __packed sctp_addip_param_t;
640 640
641typedef struct sctp_addiphdr { 641typedef struct sctp_addiphdr {
642 __be32 serial; 642 __be32 serial;
643 __u8 params[0]; 643 __u8 params[0];
644} __attribute__((packed)) sctp_addiphdr_t; 644} __packed sctp_addiphdr_t;
645 645
646typedef struct sctp_addip_chunk { 646typedef struct sctp_addip_chunk {
647 sctp_chunkhdr_t chunk_hdr; 647 sctp_chunkhdr_t chunk_hdr;
648 sctp_addiphdr_t addip_hdr; 648 sctp_addiphdr_t addip_hdr;
649} __attribute__((packed)) sctp_addip_chunk_t; 649} __packed sctp_addip_chunk_t;
650 650
651/* AUTH 651/* AUTH
652 * Section 4.1 Authentication Chunk (AUTH) 652 * Section 4.1 Authentication Chunk (AUTH)
@@ -701,11 +701,11 @@ typedef struct sctp_authhdr {
701 __be16 shkey_id; 701 __be16 shkey_id;
702 __be16 hmac_id; 702 __be16 hmac_id;
703 __u8 hmac[0]; 703 __u8 hmac[0];
704} __attribute__((packed)) sctp_authhdr_t; 704} __packed sctp_authhdr_t;
705 705
706typedef struct sctp_auth_chunk { 706typedef struct sctp_auth_chunk {
707 sctp_chunkhdr_t chunk_hdr; 707 sctp_chunkhdr_t chunk_hdr;
708 sctp_authhdr_t auth_hdr; 708 sctp_authhdr_t auth_hdr;
709} __attribute__((packed)) sctp_auth_chunk_t; 709} __packed sctp_auth_chunk_t;
710 710
711#endif /* __LINUX_SCTP_H__ */ 711#endif /* __LINUX_SCTP_H__ */
diff --git a/include/linux/wlp.h b/include/linux/wlp.h
index ac95ce6606ac..c76fe2392506 100644
--- a/include/linux/wlp.h
+++ b/include/linux/wlp.h
@@ -300,7 +300,7 @@ struct wlp_ie {
300 __le16 cycle_param; 300 __le16 cycle_param;
301 __le16 acw_anchor_addr; 301 __le16 acw_anchor_addr;
302 u8 wssid_hash_list[]; 302 u8 wssid_hash_list[];
303} __attribute__((packed)); 303} __packed;
304 304
305static inline int wlp_ie_hash_length(struct wlp_ie *ie) 305static inline int wlp_ie_hash_length(struct wlp_ie *ie)
306{ 306{
@@ -324,7 +324,7 @@ static inline void wlp_ie_set_hash_length(struct wlp_ie *ie, int hash_length)
324 */ 324 */
325struct wlp_nonce { 325struct wlp_nonce {
326 u8 data[16]; 326 u8 data[16];
327} __attribute__((packed)); 327} __packed;
328 328
329/** 329/**
330 * WLP UUID 330 * WLP UUID
@@ -336,7 +336,7 @@ struct wlp_nonce {
336 */ 336 */
337struct wlp_uuid { 337struct wlp_uuid {
338 u8 data[16]; 338 u8 data[16];
339} __attribute__((packed)); 339} __packed;
340 340
341 341
342/** 342/**
@@ -348,7 +348,7 @@ struct wlp_dev_type {
348 u8 OUI[3]; 348 u8 OUI[3];
349 u8 OUIsubdiv; 349 u8 OUIsubdiv;
350 __le16 subID; 350 __le16 subID;
351} __attribute__((packed)); 351} __packed;
352 352
353/** 353/**
354 * WLP frame header 354 * WLP frame header
@@ -357,7 +357,7 @@ struct wlp_dev_type {
357struct wlp_frame_hdr { 357struct wlp_frame_hdr {
358 __le16 mux_hdr; /* WLP_PROTOCOL_ID */ 358 __le16 mux_hdr; /* WLP_PROTOCOL_ID */
359 enum wlp_frame_type type:8; 359 enum wlp_frame_type type:8;
360} __attribute__((packed)); 360} __packed;
361 361
362/** 362/**
363 * WLP attribute field header 363 * WLP attribute field header
@@ -368,7 +368,7 @@ struct wlp_frame_hdr {
368struct wlp_attr_hdr { 368struct wlp_attr_hdr {
369 __le16 type; 369 __le16 type;
370 __le16 length; 370 __le16 length;
371} __attribute__((packed)); 371} __packed;
372 372
373/** 373/**
374 * Device information commonly used together 374 * Device information commonly used together
@@ -401,13 +401,13 @@ struct wlp_device_info {
401struct wlp_attr_##name { \ 401struct wlp_attr_##name { \
402 struct wlp_attr_hdr hdr; \ 402 struct wlp_attr_hdr hdr; \
403 type name; \ 403 type name; \
404} __attribute__((packed)); 404} __packed;
405 405
406#define wlp_attr_array(type, name) \ 406#define wlp_attr_array(type, name) \
407struct wlp_attr_##name { \ 407struct wlp_attr_##name { \
408 struct wlp_attr_hdr hdr; \ 408 struct wlp_attr_hdr hdr; \
409 type name[]; \ 409 type name[]; \
410} __attribute__((packed)); 410} __packed;
411 411
412/** 412/**
413 * WLP association attribute fields 413 * WLP association attribute fields
@@ -483,7 +483,7 @@ struct wlp_wss_info {
483 struct wlp_attr_accept_enrl accept; 483 struct wlp_attr_accept_enrl accept;
484 struct wlp_attr_wss_sec_status sec_stat; 484 struct wlp_attr_wss_sec_status sec_stat;
485 struct wlp_attr_wss_bcast bcast; 485 struct wlp_attr_wss_bcast bcast;
486} __attribute__((packed)); 486} __packed;
487 487
488/* WLP WSS Information */ 488/* WLP WSS Information */
489wlp_attr_array(struct wlp_wss_info, wss_info) 489wlp_attr_array(struct wlp_wss_info, wss_info)
@@ -520,7 +520,7 @@ wlp_attr(u8, wlp_assc_err)
520struct wlp_frame_std_abbrv_hdr { 520struct wlp_frame_std_abbrv_hdr {
521 struct wlp_frame_hdr hdr; 521 struct wlp_frame_hdr hdr;
522 u8 tag; 522 u8 tag;
523} __attribute__((packed)); 523} __packed;
524 524
525/** 525/**
526 * WLP association frames 526 * WLP association frames
@@ -533,7 +533,7 @@ struct wlp_frame_assoc {
533 struct wlp_attr_version version; 533 struct wlp_attr_version version;
534 struct wlp_attr_msg_type msg_type; 534 struct wlp_attr_msg_type msg_type;
535 u8 attr[]; 535 u8 attr[];
536} __attribute__((packed)); 536} __packed;
537 537
538/* Ethernet to dev address mapping */ 538/* Ethernet to dev address mapping */
539struct wlp_eda { 539struct wlp_eda {