@@ -143,52 +143,52 @@ struct ieee_ibss_seq {
143143};
144144
145145struct ieee80211_hdr {
146- u16 frame_ctl ;
147- u16 duration_id ;
146+ __le16 frame_ctl ;
147+ __le16 duration_id ;
148148 u8 addr1 [ETH_ALEN ];
149149 u8 addr2 [ETH_ALEN ];
150150 u8 addr3 [ETH_ALEN ];
151- u16 seq_ctl ;
151+ __le16 seq_ctl ;
152152 u8 addr4 [ETH_ALEN ];
153- } __packed ;
153+ } __packed __aligned ( 2 ) ;
154154
155155struct ieee80211_hdr_3addr {
156- u16 frame_ctl ;
157- u16 duration_id ;
156+ __le16 frame_ctl ;
157+ __le16 duration_id ;
158158 u8 addr1 [ETH_ALEN ];
159159 u8 addr2 [ETH_ALEN ];
160160 u8 addr3 [ETH_ALEN ];
161- u16 seq_ctl ;
162- } __packed ;
161+ __le16 seq_ctl ;
162+ } __packed __aligned ( 2 ) ;
163163
164164
165165struct ieee80211_hdr_qos {
166- u16 frame_ctl ;
167- u16 duration_id ;
166+ __le16 frame_ctl ;
167+ __le16 duration_id ;
168168 u8 addr1 [ETH_ALEN ];
169169 u8 addr2 [ETH_ALEN ];
170170 u8 addr3 [ETH_ALEN ];
171- u16 seq_ctl ;
171+ __le16 seq_ctl ;
172172 u8 addr4 [ETH_ALEN ];
173- u16 qc ;
174- } __packed ;
173+ __le16 qc ;
174+ } __packed __aligned ( 2 ) ;
175175
176176struct ieee80211_hdr_3addr_qos {
177- u16 frame_ctl ;
178- u16 duration_id ;
177+ __le16 frame_ctl ;
178+ __le16 duration_id ;
179179 u8 addr1 [ETH_ALEN ];
180180 u8 addr2 [ETH_ALEN ];
181181 u8 addr3 [ETH_ALEN ];
182- u16 seq_ctl ;
183- u16 qc ;
182+ __le16 seq_ctl ;
183+ __le16 qc ;
184184} __packed ;
185185
186186struct eapol {
187187 u8 snap [6 ];
188- u16 ethertype ;
188+ __be16 ethertype ;
189189 u8 version ;
190190 u8 type ;
191- u16 length ;
191+ __le16 length ;
192192} __packed ;
193193
194194
@@ -528,13 +528,13 @@ struct ieee80211_security {
528528 */
529529
530530struct ieee80211_header_data {
531- u16 frame_ctl ;
532- u16 duration_id ;
531+ __le16 frame_ctl ;
532+ __le16 duration_id ;
533533 u8 addr1 [6 ];
534534 u8 addr2 [6 ];
535535 u8 addr3 [6 ];
536- u16 seq_ctrl ;
537- };
536+ __le16 seq_ctrl ;
537+ } __packed __aligned ( 2 ) ;
538538
539539#define BEACON_PROBE_SSID_ID_POSITION 12
540540
@@ -566,35 +566,35 @@ struct ieee80211_info_element {
566566/*
567567 * These are the data types that can make up management packets
568568 *
569- u16 auth_algorithm;
570- u16 auth_sequence;
571- u16 beacon_interval;
572- u16 capability;
569+ __le16 auth_algorithm;
570+ __le16 auth_sequence;
571+ __le16 beacon_interval;
572+ __le16 capability;
573573 u8 current_ap[ETH_ALEN];
574- u16 listen_interval;
574+ __le16 listen_interval;
575575 struct {
576576 u16 association_id:14, reserved:2;
577577 } __packed;
578- u32 time_stamp[2];
579- u16 reason;
580- u16 status;
578+ __le32 time_stamp[2];
579+ __le16 reason;
580+ __le16 status;
581581*/
582582
583583#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
584584#define IEEE80211_DEFAULT_BASIC_RATE 10
585585
586586struct ieee80211_authentication {
587587 struct ieee80211_header_data header ;
588- u16 algorithm ;
589- u16 transaction ;
590- u16 status ;
588+ __le16 algorithm ;
589+ __le16 transaction ;
590+ __le16 status ;
591591} __packed ;
592592
593593struct ieee80211_probe_response {
594594 struct ieee80211_header_data header ;
595- u32 time_stamp [2 ];
596- u16 beacon_interval ;
597- u16 capability ;
595+ __le32 time_stamp [2 ];
596+ __le16 beacon_interval ;
597+ __le16 capability ;
598598 struct ieee80211_info_element info_element ;
599599} __packed ;
600600
@@ -604,16 +604,16 @@ struct ieee80211_probe_request {
604604
605605struct ieee80211_assoc_request_frame {
606606 struct ieee80211_hdr_3addr header ;
607- u16 capability ;
608- u16 listen_interval ;
607+ __le16 capability ;
608+ __le16 listen_interval ;
609609 struct ieee80211_info_element_hdr info_element ;
610610} __packed ;
611611
612612struct ieee80211_assoc_response_frame {
613613 struct ieee80211_hdr_3addr header ;
614- u16 capability ;
615- u16 status ;
616- u16 aid ;
614+ __le16 capability ;
615+ __le16 status ;
616+ __le16 aid ;
617617} __packed ;
618618
619619struct ieee80211_txb {
0 commit comments