aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Benc <jbenc@suse.cz>2005-08-25 20:15:10 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-25 20:15:10 -0400
commit099c5bb169e9816a7761336f668b63010762807b (patch)
tree021fc2d3afa5889e45593aef433a4051633d6abf
parent95d5185d1ab6875b86a639310919dc48a716c7be (diff)
ieee80211: use endian-aware types
From: Michael Wu <flamingice@sourmilk.net> This patch: - fixes misc. whitespace/comments - replaces u16 with __le16/__be16 where appropriate Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Jiri Benc <jbenc@suse.cz>
-rw-r--r--include/net/ieee80211.h46
1 files changed, 22 insertions, 24 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 52248f101080..8bc126938cd4 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -47,22 +47,22 @@
47#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) 47#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
48 48
49struct ieee80211_hdr { 49struct ieee80211_hdr {
50 u16 frame_ctl; 50 __le16 frame_ctl;
51 u16 duration_id; 51 __le16 duration_id;
52 u8 addr1[ETH_ALEN]; 52 u8 addr1[ETH_ALEN];
53 u8 addr2[ETH_ALEN]; 53 u8 addr2[ETH_ALEN];
54 u8 addr3[ETH_ALEN]; 54 u8 addr3[ETH_ALEN];
55 u16 seq_ctl; 55 __le16 seq_ctl;
56 u8 addr4[ETH_ALEN]; 56 u8 addr4[ETH_ALEN];
57} __attribute__ ((packed)); 57} __attribute__ ((packed));
58 58
59struct ieee80211_hdr_3addr { 59struct ieee80211_hdr_3addr {
60 u16 frame_ctl; 60 __le16 frame_ctl;
61 u16 duration_id; 61 __le16 duration_id;
62 u8 addr1[ETH_ALEN]; 62 u8 addr1[ETH_ALEN];
63 u8 addr2[ETH_ALEN]; 63 u8 addr2[ETH_ALEN];
64 u8 addr3[ETH_ALEN]; 64 u8 addr3[ETH_ALEN];
65 u16 seq_ctl; 65 __le16 seq_ctl;
66} __attribute__ ((packed)); 66} __attribute__ ((packed));
67 67
68enum eap_type { 68enum eap_type {
@@ -88,10 +88,10 @@ static inline const char *eap_get_type(int type)
88 88
89struct eapol { 89struct eapol {
90 u8 snap[6]; 90 u8 snap[6];
91 u16 ethertype; 91 __be16 ethertype;
92 u8 version; 92 u8 version;
93 u8 type; 93 u8 type;
94 u16 length; 94 __be16 length;
95} __attribute__ ((packed)); 95} __attribute__ ((packed));
96 96
97#define IEEE80211_1ADDR_LEN 10 97#define IEEE80211_1ADDR_LEN 10
@@ -235,9 +235,9 @@ const char *escape_essid(const char *essid, u8 essid_len);
235#include <linux/if_arp.h> /* ARPHRD_ETHER */ 235#include <linux/if_arp.h> /* ARPHRD_ETHER */
236 236
237#ifndef WIRELESS_SPY 237#ifndef WIRELESS_SPY
238#define WIRELESS_SPY // enable iwspy support 238#define WIRELESS_SPY /* enable iwspy support */
239#endif 239#endif
240#include <net/iw_handler.h> // new driver API 240#include <net/iw_handler.h> /* new driver API */
241 241
242#ifndef ETH_P_PAE 242#ifndef ETH_P_PAE
243#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ 243#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
@@ -588,9 +588,9 @@ struct ieee80211_info_element {
588 588
589struct ieee80211_authentication { 589struct ieee80211_authentication {
590 struct ieee80211_hdr_3addr header; 590 struct ieee80211_hdr_3addr header;
591 u16 algorithm; 591 __le16 algorithm;
592 u16 transaction; 592 __le16 transaction;
593 u16 status; 593 __le16 status;
594 struct ieee80211_info_element info_element; 594 struct ieee80211_info_element info_element;
595} __attribute__ ((packed)); 595} __attribute__ ((packed));
596 596
@@ -598,23 +598,23 @@ struct ieee80211_authentication {
598struct ieee80211_probe_response { 598struct ieee80211_probe_response {
599 struct ieee80211_hdr_3addr header; 599 struct ieee80211_hdr_3addr header;
600 u32 time_stamp[2]; 600 u32 time_stamp[2];
601 u16 beacon_interval; 601 __le16 beacon_interval;
602 u16 capability; 602 __le16 capability;
603 struct ieee80211_info_element info_element; 603 struct ieee80211_info_element info_element;
604} __attribute__ ((packed)); 604} __attribute__ ((packed));
605 605
606struct ieee80211_assoc_request_frame { 606struct ieee80211_assoc_request_frame {
607 u16 capability; 607 __le16 capability;
608 u16 listen_interval; 608 __le16 listen_interval;
609 u8 current_ap[ETH_ALEN]; 609 u8 current_ap[ETH_ALEN];
610 struct ieee80211_info_element info_element; 610 struct ieee80211_info_element info_element;
611} __attribute__ ((packed)); 611} __attribute__ ((packed));
612 612
613struct ieee80211_assoc_response_frame { 613struct ieee80211_assoc_response_frame {
614 struct ieee80211_hdr_3addr header; 614 struct ieee80211_hdr_3addr header;
615 u16 capability; 615 __le16 capability;
616 u16 status; 616 __le16 status;
617 u16 aid; 617 __le16 aid;
618 struct ieee80211_info_element info_element; /* supported rates */ 618 struct ieee80211_info_element info_element; /* supported rates */
619} __attribute__ ((packed)); 619} __attribute__ ((packed));
620 620
@@ -629,7 +629,7 @@ struct ieee80211_txb {
629}; 629};
630 630
631 631
632/* SWEEP TABLE ENTRIES NUMBER*/ 632/* SWEEP TABLE ENTRIES NUMBER */
633#define MAX_SWEEP_TAB_ENTRIES 42 633#define MAX_SWEEP_TAB_ENTRIES 42
634#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7 634#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
635/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs 635/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
@@ -857,8 +857,6 @@ extern struct net_device *alloc_ieee80211(int sizeof_priv);
857extern int ieee80211_set_encryption(struct ieee80211_device *ieee); 857extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
858 858
859/* ieee80211_tx.c */ 859/* ieee80211_tx.c */
860
861
862extern int ieee80211_xmit(struct sk_buff *skb, 860extern int ieee80211_xmit(struct sk_buff *skb,
863 struct net_device *dev); 861 struct net_device *dev);
864extern void ieee80211_txb_free(struct ieee80211_txb *); 862extern void ieee80211_txb_free(struct ieee80211_txb *);
@@ -871,7 +869,7 @@ extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
871 struct ieee80211_hdr *header, 869 struct ieee80211_hdr *header,
872 struct ieee80211_rx_stats *stats); 870 struct ieee80211_rx_stats *stats);
873 871
874/* iee80211_wx.c */ 872/* ieee80211_wx.c */
875extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, 873extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
876 struct iw_request_info *info, 874 struct iw_request_info *info,
877 union iwreq_data *wrqu, char *key); 875 union iwreq_data *wrqu, char *key);