diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-28 19:23:37 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-28 19:23:37 -0400 |
| commit | fd67b0641118031a65d370f65bd80eef1982b45a (patch) | |
| tree | 2e3b8fa3fc93bc1b2b94588b83069e9ea6f602ad | |
| parent | 831a179fc9387af6dbaa12816ae1e074d1f1a730 (diff) | |
| parent | 91cb70c1769d9b72dd1efe40c31f01005820b09e (diff) | |
/spare/repo/netdev-2.6 branch 'ieee80211'
| -rw-r--r-- | include/net/ieee80211.h | 46 | ||||
| -rw-r--r-- | net/ieee80211/ieee80211_rx.c | 16 | ||||
| -rw-r--r-- | net/ieee80211/ieee80211_tx.c | 9 |
3 files changed, 3 insertions, 68 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 8bc126938cd4..dc36b1be6745 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
| @@ -24,15 +24,6 @@ | |||
| 24 | #include <linux/kernel.h> /* ARRAY_SIZE */ | 24 | #include <linux/kernel.h> /* ARRAY_SIZE */ |
| 25 | #include <linux/wireless.h> | 25 | #include <linux/wireless.h> |
| 26 | 26 | ||
| 27 | #if WIRELESS_EXT < 17 | ||
| 28 | #define IW_QUAL_QUAL_INVALID 0x10 | ||
| 29 | #define IW_QUAL_LEVEL_INVALID 0x20 | ||
| 30 | #define IW_QUAL_NOISE_INVALID 0x40 | ||
| 31 | #define IW_QUAL_QUAL_UPDATED 0x1 | ||
| 32 | #define IW_QUAL_LEVEL_UPDATED 0x2 | ||
| 33 | #define IW_QUAL_NOISE_UPDATED 0x4 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #define IEEE80211_DATA_LEN 2304 | 27 | #define IEEE80211_DATA_LEN 2304 |
| 37 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | 28 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
| 38 | 6.2.1.1.2. | 29 | 6.2.1.1.2. |
| @@ -65,35 +56,6 @@ struct ieee80211_hdr_3addr { | |||
| 65 | __le16 seq_ctl; | 56 | __le16 seq_ctl; |
| 66 | } __attribute__ ((packed)); | 57 | } __attribute__ ((packed)); |
| 67 | 58 | ||
| 68 | enum eap_type { | ||
| 69 | EAP_PACKET = 0, | ||
| 70 | EAPOL_START, | ||
| 71 | EAPOL_LOGOFF, | ||
| 72 | EAPOL_KEY, | ||
| 73 | EAPOL_ENCAP_ASF_ALERT | ||
| 74 | }; | ||
| 75 | |||
| 76 | static const char *eap_types[] = { | ||
| 77 | [EAP_PACKET] = "EAP-Packet", | ||
| 78 | [EAPOL_START] = "EAPOL-Start", | ||
| 79 | [EAPOL_LOGOFF] = "EAPOL-Logoff", | ||
| 80 | [EAPOL_KEY] = "EAPOL-Key", | ||
| 81 | [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert" | ||
| 82 | }; | ||
| 83 | |||
| 84 | static inline const char *eap_get_type(int type) | ||
| 85 | { | ||
| 86 | return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type]; | ||
| 87 | } | ||
| 88 | |||
| 89 | struct eapol { | ||
| 90 | u8 snap[6]; | ||
| 91 | __be16 ethertype; | ||
| 92 | u8 version; | ||
| 93 | u8 type; | ||
| 94 | __be16 length; | ||
| 95 | } __attribute__ ((packed)); | ||
| 96 | |||
| 97 | #define IEEE80211_1ADDR_LEN 10 | 59 | #define IEEE80211_1ADDR_LEN 10 |
| 98 | #define IEEE80211_2ADDR_LEN 16 | 60 | #define IEEE80211_2ADDR_LEN 16 |
| 99 | #define IEEE80211_3ADDR_LEN 24 | 61 | #define IEEE80211_3ADDR_LEN 24 |
| @@ -196,11 +158,11 @@ const char *escape_essid(const char *essid, u8 essid_len); | |||
| 196 | * | 158 | * |
| 197 | * To add your debug level to the list of levels seen when you perform | 159 | * To add your debug level to the list of levels seen when you perform |
| 198 | * | 160 | * |
| 199 | * % cat /proc/net/ipw/debug_level | 161 | * % cat /proc/net/ieee80211/debug_level |
| 200 | * | 162 | * |
| 201 | * you simply need to add your entry to the ipw_debug_levels array. | 163 | * you simply need to add your entry to the ieee80211_debug_level array. |
| 202 | * | 164 | * |
| 203 | * If you do not see debug_level in /proc/net/ipw then you do not have | 165 | * If you do not see debug_level in /proc/net/ieee80211 then you do not have |
| 204 | * CONFIG_IEEE80211_DEBUG defined in your kernel configuration | 166 | * CONFIG_IEEE80211_DEBUG defined in your kernel configuration |
| 205 | * | 167 | * |
| 206 | */ | 168 | */ |
| @@ -211,7 +173,6 @@ const char *escape_essid(const char *essid, u8 essid_len); | |||
| 211 | #define IEEE80211_DL_STATE (1<<3) | 173 | #define IEEE80211_DL_STATE (1<<3) |
| 212 | #define IEEE80211_DL_MGMT (1<<4) | 174 | #define IEEE80211_DL_MGMT (1<<4) |
| 213 | #define IEEE80211_DL_FRAG (1<<5) | 175 | #define IEEE80211_DL_FRAG (1<<5) |
| 214 | #define IEEE80211_DL_EAP (1<<6) | ||
| 215 | #define IEEE80211_DL_DROP (1<<7) | 176 | #define IEEE80211_DL_DROP (1<<7) |
| 216 | 177 | ||
| 217 | #define IEEE80211_DL_TX (1<<8) | 178 | #define IEEE80211_DL_TX (1<<8) |
| @@ -226,7 +187,6 @@ const char *escape_essid(const char *essid, u8 essid_len); | |||
| 226 | #define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) | 187 | #define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) |
| 227 | #define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) | 188 | #define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) |
| 228 | #define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) | 189 | #define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) |
| 229 | #define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a) | ||
| 230 | #define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) | 190 | #define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) |
| 231 | #define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) | 191 | #define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) |
| 232 | #define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) | 192 | #define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 9505f3167aeb..d582faa6447d 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
| @@ -628,14 +628,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 628 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) { | 628 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) { |
| 629 | if (/*ieee->ieee802_1x &&*/ | 629 | if (/*ieee->ieee802_1x &&*/ |
| 630 | ieee80211_is_eapol_frame(ieee, skb)) { | 630 | ieee80211_is_eapol_frame(ieee, skb)) { |
| 631 | #ifdef CONFIG_IEEE80211_DEBUG | ||
| 632 | /* pass unencrypted EAPOL frames even if encryption is | 631 | /* pass unencrypted EAPOL frames even if encryption is |
| 633 | * configured */ | 632 | * configured */ |
| 634 | struct eapol *eap = (struct eapol *)(skb->data + | ||
| 635 | 24); | ||
| 636 | IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n", | ||
| 637 | eap_get_type(eap->type)); | ||
| 638 | #endif | ||
| 639 | } else { | 633 | } else { |
| 640 | IEEE80211_DEBUG_DROP( | 634 | IEEE80211_DEBUG_DROP( |
| 641 | "encryption configured, but RX " | 635 | "encryption configured, but RX " |
| @@ -645,16 +639,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
| 645 | } | 639 | } |
| 646 | } | 640 | } |
| 647 | 641 | ||
| 648 | #ifdef CONFIG_IEEE80211_DEBUG | ||
| 649 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && | ||
| 650 | ieee80211_is_eapol_frame(ieee, skb)) { | ||
| 651 | struct eapol *eap = (struct eapol *)(skb->data + | ||
| 652 | 24); | ||
| 653 | IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n", | ||
| 654 | eap_get_type(eap->type)); | ||
| 655 | } | ||
| 656 | #endif | ||
| 657 | |||
| 658 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && | 642 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && |
| 659 | !ieee80211_is_eapol_frame(ieee, skb)) { | 643 | !ieee80211_is_eapol_frame(ieee, skb)) { |
| 660 | IEEE80211_DEBUG_DROP( | 644 | IEEE80211_DEBUG_DROP( |
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index 071d093f2989..b7ea3e25e25d 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
| @@ -292,15 +292,6 @@ int ieee80211_xmit(struct sk_buff *skb, | |||
| 292 | goto success; | 292 | goto success; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | #ifdef CONFIG_IEEE80211_DEBUG | ||
| 296 | if (crypt && !encrypt && ether_type == ETH_P_PAE) { | ||
| 297 | struct eapol *eap = (struct eapol *)(skb->data + | ||
| 298 | sizeof(struct ethhdr) - SNAP_SIZE - sizeof(u16)); | ||
| 299 | IEEE80211_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n", | ||
| 300 | eap_get_type(eap->type)); | ||
| 301 | } | ||
| 302 | #endif | ||
| 303 | |||
| 304 | /* Save source and destination addresses */ | 295 | /* Save source and destination addresses */ |
| 305 | memcpy(&dest, skb->data, ETH_ALEN); | 296 | memcpy(&dest, skb->data, ETH_ALEN); |
| 306 | memcpy(&src, skb->data+ETH_ALEN, ETH_ALEN); | 297 | memcpy(&src, skb->data+ETH_ALEN, ETH_ALEN); |
