diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/atmel.c | 62 | ||||
-rw-r--r-- | drivers/net/wireless/ieee802_11.h | 78 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/wl3501.h | 4 |
4 files changed, 39 insertions, 116 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 18a7d38d2a13..bed160a25cab 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -68,7 +68,7 @@ | |||
68 | #include <linux/device.h> | 68 | #include <linux/device.h> |
69 | #include <linux/moduleparam.h> | 69 | #include <linux/moduleparam.h> |
70 | #include <linux/firmware.h> | 70 | #include <linux/firmware.h> |
71 | #include "ieee802_11.h" | 71 | #include <net/ieee80211.h> |
72 | #include "atmel.h" | 72 | #include "atmel.h" |
73 | 73 | ||
74 | #define DRIVER_MAJOR 0 | 74 | #define DRIVER_MAJOR 0 |
@@ -618,12 +618,12 @@ static int atmel_lock_mac(struct atmel_private *priv); | |||
618 | static void atmel_wmem32(struct atmel_private *priv, u16 pos, u32 data); | 618 | static void atmel_wmem32(struct atmel_private *priv, u16 pos, u32 data); |
619 | static void atmel_command_irq(struct atmel_private *priv); | 619 | static void atmel_command_irq(struct atmel_private *priv); |
620 | static int atmel_validate_channel(struct atmel_private *priv, int channel); | 620 | static int atmel_validate_channel(struct atmel_private *priv, int channel); |
621 | static void atmel_management_frame(struct atmel_private *priv, struct ieee802_11_hdr *header, | 621 | static void atmel_management_frame(struct atmel_private *priv, struct ieee80211_hdr *header, |
622 | u16 frame_len, u8 rssi); | 622 | u16 frame_len, u8 rssi); |
623 | static void atmel_management_timer(u_long a); | 623 | static void atmel_management_timer(u_long a); |
624 | static void atmel_send_command(struct atmel_private *priv, int command, void *cmd, int cmd_size); | 624 | static void atmel_send_command(struct atmel_private *priv, int command, void *cmd, int cmd_size); |
625 | static int atmel_send_command_wait(struct atmel_private *priv, int command, void *cmd, int cmd_size); | 625 | static int atmel_send_command_wait(struct atmel_private *priv, int command, void *cmd, int cmd_size); |
626 | static void atmel_transmit_management_frame(struct atmel_private *priv, struct ieee802_11_hdr *header, | 626 | static void atmel_transmit_management_frame(struct atmel_private *priv, struct ieee80211_hdr *header, |
627 | u8 *body, int body_len); | 627 | u8 *body, int body_len); |
628 | 628 | ||
629 | static u8 atmel_get_mib8(struct atmel_private *priv, u8 type, u8 index); | 629 | static u8 atmel_get_mib8(struct atmel_private *priv, u8 type, u8 index); |
@@ -827,7 +827,7 @@ static void tx_update_descriptor(struct atmel_private *priv, int is_bcast, u16 l | |||
827 | static int start_tx (struct sk_buff *skb, struct net_device *dev) | 827 | static int start_tx (struct sk_buff *skb, struct net_device *dev) |
828 | { | 828 | { |
829 | struct atmel_private *priv = netdev_priv(dev); | 829 | struct atmel_private *priv = netdev_priv(dev); |
830 | struct ieee802_11_hdr header; | 830 | struct ieee80211_hdr header; |
831 | unsigned long flags; | 831 | unsigned long flags; |
832 | u16 buff, frame_ctl, len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN; | 832 | u16 buff, frame_ctl, len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN; |
833 | u8 SNAP_RFC1024[6] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; | 833 | u8 SNAP_RFC1024[6] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; |
@@ -863,17 +863,17 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev) | |||
863 | return 1; | 863 | return 1; |
864 | } | 864 | } |
865 | 865 | ||
866 | frame_ctl = IEEE802_11_FTYPE_DATA; | 866 | frame_ctl = IEEE80211_FTYPE_DATA; |
867 | header.duration_id = 0; | 867 | header.duration_id = 0; |
868 | header.seq_ctl = 0; | 868 | header.seq_ctl = 0; |
869 | if (priv->wep_is_on) | 869 | if (priv->wep_is_on) |
870 | frame_ctl |= IEEE802_11_FCTL_WEP; | 870 | frame_ctl |= IEEE80211_FCTL_WEP; |
871 | if (priv->operating_mode == IW_MODE_ADHOC) { | 871 | if (priv->operating_mode == IW_MODE_ADHOC) { |
872 | memcpy(&header.addr1, skb->data, 6); | 872 | memcpy(&header.addr1, skb->data, 6); |
873 | memcpy(&header.addr2, dev->dev_addr, 6); | 873 | memcpy(&header.addr2, dev->dev_addr, 6); |
874 | memcpy(&header.addr3, priv->BSSID, 6); | 874 | memcpy(&header.addr3, priv->BSSID, 6); |
875 | } else { | 875 | } else { |
876 | frame_ctl |= IEEE802_11_FCTL_TODS; | 876 | frame_ctl |= IEEE80211_FCTL_TODS; |
877 | memcpy(&header.addr1, priv->CurrentBSSID, 6); | 877 | memcpy(&header.addr1, priv->CurrentBSSID, 6); |
878 | memcpy(&header.addr2, dev->dev_addr, 6); | 878 | memcpy(&header.addr2, dev->dev_addr, 6); |
879 | memcpy(&header.addr3, skb->data, 6); | 879 | memcpy(&header.addr3, skb->data, 6); |
@@ -902,7 +902,7 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev) | |||
902 | } | 902 | } |
903 | 903 | ||
904 | static void atmel_transmit_management_frame(struct atmel_private *priv, | 904 | static void atmel_transmit_management_frame(struct atmel_private *priv, |
905 | struct ieee802_11_hdr *header, | 905 | struct ieee80211_hdr *header, |
906 | u8 *body, int body_len) | 906 | u8 *body, int body_len) |
907 | { | 907 | { |
908 | u16 buff; | 908 | u16 buff; |
@@ -917,7 +917,7 @@ static void atmel_transmit_management_frame(struct atmel_private *priv, | |||
917 | tx_update_descriptor(priv, header->addr1[0] & 0x01, len, buff, TX_PACKET_TYPE_MGMT); | 917 | tx_update_descriptor(priv, header->addr1[0] & 0x01, len, buff, TX_PACKET_TYPE_MGMT); |
918 | } | 918 | } |
919 | 919 | ||
920 | static void fast_rx_path(struct atmel_private *priv, struct ieee802_11_hdr *header, | 920 | static void fast_rx_path(struct atmel_private *priv, struct ieee80211_hdr *header, |
921 | u16 msdu_size, u16 rx_packet_loc, u32 crc) | 921 | u16 msdu_size, u16 rx_packet_loc, u32 crc) |
922 | { | 922 | { |
923 | /* fast path: unfragmented packet copy directly into skbuf */ | 923 | /* fast path: unfragmented packet copy directly into skbuf */ |
@@ -955,7 +955,7 @@ static void fast_rx_path(struct atmel_private *priv, struct ieee802_11_hdr *head | |||
955 | } | 955 | } |
956 | 956 | ||
957 | memcpy(skbp, header->addr1, 6); /* destination address */ | 957 | memcpy(skbp, header->addr1, 6); /* destination address */ |
958 | if (le16_to_cpu(header->frame_ctl) & IEEE802_11_FCTL_FROMDS) | 958 | if (le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_FROMDS) |
959 | memcpy(&skbp[6], header->addr3, 6); | 959 | memcpy(&skbp[6], header->addr3, 6); |
960 | else | 960 | else |
961 | memcpy(&skbp[6], header->addr2, 6); /* source address */ | 961 | memcpy(&skbp[6], header->addr2, 6); /* source address */ |
@@ -990,14 +990,14 @@ static int probe_crc(struct atmel_private *priv, u16 packet_loc, u16 msdu_size) | |||
990 | return (crc ^ 0xffffffff) == netcrc; | 990 | return (crc ^ 0xffffffff) == netcrc; |
991 | } | 991 | } |
992 | 992 | ||
993 | static void frag_rx_path(struct atmel_private *priv, struct ieee802_11_hdr *header, | 993 | static void frag_rx_path(struct atmel_private *priv, struct ieee80211_hdr *header, |
994 | u16 msdu_size, u16 rx_packet_loc, u32 crc, u16 seq_no, u8 frag_no, int more_frags) | 994 | u16 msdu_size, u16 rx_packet_loc, u32 crc, u16 seq_no, u8 frag_no, int more_frags) |
995 | { | 995 | { |
996 | u8 mac4[6]; | 996 | u8 mac4[6]; |
997 | u8 source[6]; | 997 | u8 source[6]; |
998 | struct sk_buff *skb; | 998 | struct sk_buff *skb; |
999 | 999 | ||
1000 | if (le16_to_cpu(header->frame_ctl) & IEEE802_11_FCTL_FROMDS) | 1000 | if (le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_FROMDS) |
1001 | memcpy(source, header->addr3, 6); | 1001 | memcpy(source, header->addr3, 6); |
1002 | else | 1002 | else |
1003 | memcpy(source, header->addr2, 6); | 1003 | memcpy(source, header->addr2, 6); |
@@ -1082,7 +1082,7 @@ static void frag_rx_path(struct atmel_private *priv, struct ieee802_11_hdr *head | |||
1082 | static void rx_done_irq(struct atmel_private *priv) | 1082 | static void rx_done_irq(struct atmel_private *priv) |
1083 | { | 1083 | { |
1084 | int i; | 1084 | int i; |
1085 | struct ieee802_11_hdr header; | 1085 | struct ieee80211_hdr header; |
1086 | 1086 | ||
1087 | for (i = 0; | 1087 | for (i = 0; |
1088 | atmel_rmem8(priv, atmel_rx(priv, RX_DESC_FLAGS_OFFSET, priv->rx_desc_head)) == RX_DESC_FLAG_VALID && | 1088 | atmel_rmem8(priv, atmel_rx(priv, RX_DESC_FLAGS_OFFSET, priv->rx_desc_head)) == RX_DESC_FLAG_VALID && |
@@ -1117,7 +1117,7 @@ static void rx_done_irq(struct atmel_private *priv) | |||
1117 | /* probe for CRC use here if needed once five packets have arrived with | 1117 | /* probe for CRC use here if needed once five packets have arrived with |
1118 | the same crc status, we assume we know what's happening and stop probing */ | 1118 | the same crc status, we assume we know what's happening and stop probing */ |
1119 | if (priv->probe_crc) { | 1119 | if (priv->probe_crc) { |
1120 | if (!priv->wep_is_on || !(frame_ctl & IEEE802_11_FCTL_WEP)) { | 1120 | if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP)) { |
1121 | priv->do_rx_crc = probe_crc(priv, rx_packet_loc, msdu_size); | 1121 | priv->do_rx_crc = probe_crc(priv, rx_packet_loc, msdu_size); |
1122 | } else { | 1122 | } else { |
1123 | priv->do_rx_crc = probe_crc(priv, rx_packet_loc + 24, msdu_size - 24); | 1123 | priv->do_rx_crc = probe_crc(priv, rx_packet_loc + 24, msdu_size - 24); |
@@ -1132,16 +1132,16 @@ static void rx_done_irq(struct atmel_private *priv) | |||
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | /* don't CRC header when WEP in use */ | 1134 | /* don't CRC header when WEP in use */ |
1135 | if (priv->do_rx_crc && (!priv->wep_is_on || !(frame_ctl & IEEE802_11_FCTL_WEP))) { | 1135 | if (priv->do_rx_crc && (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP))) { |
1136 | crc = crc32_le(0xffffffff, (unsigned char *)&header, 24); | 1136 | crc = crc32_le(0xffffffff, (unsigned char *)&header, 24); |
1137 | } | 1137 | } |
1138 | msdu_size -= 24; /* header */ | 1138 | msdu_size -= 24; /* header */ |
1139 | 1139 | ||
1140 | if ((frame_ctl & IEEE802_11_FCTL_FTYPE) == IEEE802_11_FTYPE_DATA) { | 1140 | if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { |
1141 | 1141 | ||
1142 | int more_fragments = frame_ctl & IEEE802_11_FCTL_MOREFRAGS; | 1142 | int more_fragments = frame_ctl & IEEE80211_FCTL_MOREFRAGS; |
1143 | u8 packet_fragment_no = seq_control & IEEE802_11_SCTL_FRAG; | 1143 | u8 packet_fragment_no = seq_control & IEEE80211_SCTL_FRAG; |
1144 | u16 packet_sequence_no = (seq_control & IEEE802_11_SCTL_SEQ) >> 4; | 1144 | u16 packet_sequence_no = (seq_control & IEEE80211_SCTL_SEQ) >> 4; |
1145 | 1145 | ||
1146 | if (!more_fragments && packet_fragment_no == 0 ) { | 1146 | if (!more_fragments && packet_fragment_no == 0 ) { |
1147 | fast_rx_path(priv, &header, msdu_size, rx_packet_loc, crc); | 1147 | fast_rx_path(priv, &header, msdu_size, rx_packet_loc, crc); |
@@ -1151,7 +1151,7 @@ static void rx_done_irq(struct atmel_private *priv) | |||
1151 | } | 1151 | } |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | if ((frame_ctl & IEEE802_11_FCTL_FTYPE) == IEEE802_11_FTYPE_MGMT) { | 1154 | if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { |
1155 | /* copy rest of packet into buffer */ | 1155 | /* copy rest of packet into buffer */ |
1156 | atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size); | 1156 | atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size); |
1157 | 1157 | ||
@@ -2663,10 +2663,10 @@ static void handle_beacon_probe(struct atmel_private *priv, u16 capability, u8 c | |||
2663 | 2663 | ||
2664 | static void send_authentication_request(struct atmel_private *priv, u8 *challenge, int challenge_len) | 2664 | static void send_authentication_request(struct atmel_private *priv, u8 *challenge, int challenge_len) |
2665 | { | 2665 | { |
2666 | struct ieee802_11_hdr header; | 2666 | struct ieee80211_hdr header; |
2667 | struct auth_body auth; | 2667 | struct auth_body auth; |
2668 | 2668 | ||
2669 | header.frame_ctl = cpu_to_le16(IEEE802_11_FTYPE_MGMT | IEEE802_11_STYPE_AUTH); | 2669 | header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); |
2670 | header.duration_id = cpu_to_le16(0x8000); | 2670 | header.duration_id = cpu_to_le16(0x8000); |
2671 | header.seq_ctl = 0; | 2671 | header.seq_ctl = 0; |
2672 | memcpy(header.addr1, priv->CurrentBSSID, 6); | 2672 | memcpy(header.addr1, priv->CurrentBSSID, 6); |
@@ -2677,7 +2677,7 @@ static void send_authentication_request(struct atmel_private *priv, u8 *challeng | |||
2677 | auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY); | 2677 | auth.alg = cpu_to_le16(C80211_MGMT_AAN_SHAREDKEY); |
2678 | /* no WEP for authentication frames with TrSeqNo 1 */ | 2678 | /* no WEP for authentication frames with TrSeqNo 1 */ |
2679 | if (priv->CurrentAuthentTransactionSeqNum != 1) | 2679 | if (priv->CurrentAuthentTransactionSeqNum != 1) |
2680 | header.frame_ctl |= cpu_to_le16(IEEE802_11_FCTL_WEP); | 2680 | header.frame_ctl |= cpu_to_le16(IEEE80211_FCTL_WEP); |
2681 | } else { | 2681 | } else { |
2682 | auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM); | 2682 | auth.alg = cpu_to_le16(C80211_MGMT_AAN_OPENSYSTEM); |
2683 | } | 2683 | } |
@@ -2701,7 +2701,7 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc) | |||
2701 | { | 2701 | { |
2702 | u8 *ssid_el_p; | 2702 | u8 *ssid_el_p; |
2703 | int bodysize; | 2703 | int bodysize; |
2704 | struct ieee802_11_hdr header; | 2704 | struct ieee80211_hdr header; |
2705 | struct ass_req_format { | 2705 | struct ass_req_format { |
2706 | u16 capability; | 2706 | u16 capability; |
2707 | u16 listen_interval; | 2707 | u16 listen_interval; |
@@ -2714,8 +2714,8 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc) | |||
2714 | u8 rates[4]; | 2714 | u8 rates[4]; |
2715 | } body; | 2715 | } body; |
2716 | 2716 | ||
2717 | header.frame_ctl = cpu_to_le16(IEEE802_11_FTYPE_MGMT | | 2717 | header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
2718 | (is_reassoc ? IEEE802_11_STYPE_REASSOC_REQ : IEEE802_11_STYPE_ASSOC_REQ)); | 2718 | (is_reassoc ? IEEE80211_STYPE_REASSOC_REQ : IEEE80211_STYPE_ASSOC_REQ)); |
2719 | header.duration_id = cpu_to_le16(0x8000); | 2719 | header.duration_id = cpu_to_le16(0x8000); |
2720 | header.seq_ctl = 0; | 2720 | header.seq_ctl = 0; |
2721 | 2721 | ||
@@ -2751,9 +2751,9 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc) | |||
2751 | atmel_transmit_management_frame(priv, &header, (void *)&body, bodysize); | 2751 | atmel_transmit_management_frame(priv, &header, (void *)&body, bodysize); |
2752 | } | 2752 | } |
2753 | 2753 | ||
2754 | static int is_frame_from_current_bss(struct atmel_private *priv, struct ieee802_11_hdr *header) | 2754 | static int is_frame_from_current_bss(struct atmel_private *priv, struct ieee80211_hdr *header) |
2755 | { | 2755 | { |
2756 | if (le16_to_cpu(header->frame_ctl) & IEEE802_11_FCTL_FROMDS) | 2756 | if (le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_FROMDS) |
2757 | return memcmp(header->addr3, priv->CurrentBSSID, 6) == 0; | 2757 | return memcmp(header->addr3, priv->CurrentBSSID, 6) == 0; |
2758 | else | 2758 | else |
2759 | return memcmp(header->addr2, priv->CurrentBSSID, 6) == 0; | 2759 | return memcmp(header->addr2, priv->CurrentBSSID, 6) == 0; |
@@ -2801,7 +2801,7 @@ static int retrieve_bss(struct atmel_private *priv) | |||
2801 | } | 2801 | } |
2802 | 2802 | ||
2803 | 2803 | ||
2804 | static void store_bss_info(struct atmel_private *priv, struct ieee802_11_hdr *header, | 2804 | static void store_bss_info(struct atmel_private *priv, struct ieee80211_hdr *header, |
2805 | u16 capability, u16 beacon_period, u8 channel, u8 rssi, | 2805 | u16 capability, u16 beacon_period, u8 channel, u8 rssi, |
2806 | u8 ssid_len, u8 *ssid, int is_beacon) | 2806 | u8 ssid_len, u8 *ssid, int is_beacon) |
2807 | { | 2807 | { |
@@ -3085,12 +3085,12 @@ static void atmel_smooth_qual(struct atmel_private *priv) | |||
3085 | } | 3085 | } |
3086 | 3086 | ||
3087 | /* deals with incoming managment frames. */ | 3087 | /* deals with incoming managment frames. */ |
3088 | static void atmel_management_frame(struct atmel_private *priv, struct ieee802_11_hdr *header, | 3088 | static void atmel_management_frame(struct atmel_private *priv, struct ieee80211_hdr *header, |
3089 | u16 frame_len, u8 rssi) | 3089 | u16 frame_len, u8 rssi) |
3090 | { | 3090 | { |
3091 | u16 subtype; | 3091 | u16 subtype; |
3092 | 3092 | ||
3093 | switch (subtype = le16_to_cpu(header->frame_ctl) & IEEE802_11_FCTL_STYPE) { | 3093 | switch (subtype = le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_STYPE) { |
3094 | case C80211_SUBTYPE_MGMT_BEACON : | 3094 | case C80211_SUBTYPE_MGMT_BEACON : |
3095 | case C80211_SUBTYPE_MGMT_ProbeResponse: | 3095 | case C80211_SUBTYPE_MGMT_ProbeResponse: |
3096 | 3096 | ||
diff --git a/drivers/net/wireless/ieee802_11.h b/drivers/net/wireless/ieee802_11.h deleted file mode 100644 index 53dd5248f9f1..000000000000 --- a/drivers/net/wireless/ieee802_11.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #ifndef _IEEE802_11_H | ||
2 | #define _IEEE802_11_H | ||
3 | |||
4 | #define IEEE802_11_DATA_LEN 2304 | ||
5 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section | ||
6 | 6.2.1.1.2. | ||
7 | |||
8 | The figure in section 7.1.2 suggests a body size of up to 2312 | ||
9 | bytes is allowed, which is a bit confusing, I suspect this | ||
10 | represents the 2304 bytes of real data, plus a possible 8 bytes of | ||
11 | WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */ | ||
12 | |||
13 | |||
14 | #define IEEE802_11_HLEN 30 | ||
15 | #define IEEE802_11_FRAME_LEN (IEEE802_11_DATA_LEN + IEEE802_11_HLEN) | ||
16 | |||
17 | struct ieee802_11_hdr { | ||
18 | u16 frame_ctl; | ||
19 | u16 duration_id; | ||
20 | u8 addr1[ETH_ALEN]; | ||
21 | u8 addr2[ETH_ALEN]; | ||
22 | u8 addr3[ETH_ALEN]; | ||
23 | u16 seq_ctl; | ||
24 | u8 addr4[ETH_ALEN]; | ||
25 | } __attribute__ ((packed)); | ||
26 | |||
27 | /* Frame control field constants */ | ||
28 | #define IEEE802_11_FCTL_VERS 0x0002 | ||
29 | #define IEEE802_11_FCTL_FTYPE 0x000c | ||
30 | #define IEEE802_11_FCTL_STYPE 0x00f0 | ||
31 | #define IEEE802_11_FCTL_TODS 0x0100 | ||
32 | #define IEEE802_11_FCTL_FROMDS 0x0200 | ||
33 | #define IEEE802_11_FCTL_MOREFRAGS 0x0400 | ||
34 | #define IEEE802_11_FCTL_RETRY 0x0800 | ||
35 | #define IEEE802_11_FCTL_PM 0x1000 | ||
36 | #define IEEE802_11_FCTL_MOREDATA 0x2000 | ||
37 | #define IEEE802_11_FCTL_WEP 0x4000 | ||
38 | #define IEEE802_11_FCTL_ORDER 0x8000 | ||
39 | |||
40 | #define IEEE802_11_FTYPE_MGMT 0x0000 | ||
41 | #define IEEE802_11_FTYPE_CTL 0x0004 | ||
42 | #define IEEE802_11_FTYPE_DATA 0x0008 | ||
43 | |||
44 | /* management */ | ||
45 | #define IEEE802_11_STYPE_ASSOC_REQ 0x0000 | ||
46 | #define IEEE802_11_STYPE_ASSOC_RESP 0x0010 | ||
47 | #define IEEE802_11_STYPE_REASSOC_REQ 0x0020 | ||
48 | #define IEEE802_11_STYPE_REASSOC_RESP 0x0030 | ||
49 | #define IEEE802_11_STYPE_PROBE_REQ 0x0040 | ||
50 | #define IEEE802_11_STYPE_PROBE_RESP 0x0050 | ||
51 | #define IEEE802_11_STYPE_BEACON 0x0080 | ||
52 | #define IEEE802_11_STYPE_ATIM 0x0090 | ||
53 | #define IEEE802_11_STYPE_DISASSOC 0x00A0 | ||
54 | #define IEEE802_11_STYPE_AUTH 0x00B0 | ||
55 | #define IEEE802_11_STYPE_DEAUTH 0x00C0 | ||
56 | |||
57 | /* control */ | ||
58 | #define IEEE802_11_STYPE_PSPOLL 0x00A0 | ||
59 | #define IEEE802_11_STYPE_RTS 0x00B0 | ||
60 | #define IEEE802_11_STYPE_CTS 0x00C0 | ||
61 | #define IEEE802_11_STYPE_ACK 0x00D0 | ||
62 | #define IEEE802_11_STYPE_CFEND 0x00E0 | ||
63 | #define IEEE802_11_STYPE_CFENDACK 0x00F0 | ||
64 | |||
65 | /* data */ | ||
66 | #define IEEE802_11_STYPE_DATA 0x0000 | ||
67 | #define IEEE802_11_STYPE_DATA_CFACK 0x0010 | ||
68 | #define IEEE802_11_STYPE_DATA_CFPOLL 0x0020 | ||
69 | #define IEEE802_11_STYPE_DATA_CFACKPOLL 0x0030 | ||
70 | #define IEEE802_11_STYPE_NULLFUNC 0x0040 | ||
71 | #define IEEE802_11_STYPE_CFACK 0x0050 | ||
72 | #define IEEE802_11_STYPE_CFPOLL 0x0060 | ||
73 | #define IEEE802_11_STYPE_CFACKPOLL 0x0070 | ||
74 | |||
75 | #define IEEE802_11_SCTL_FRAG 0x000F | ||
76 | #define IEEE802_11_SCTL_SEQ 0xFFF0 | ||
77 | |||
78 | #endif /* _IEEE802_11_H */ | ||
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index a3a32430ae9d..b47684c3217e 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -464,6 +464,8 @@ | |||
464 | #include <linux/etherdevice.h> | 464 | #include <linux/etherdevice.h> |
465 | #include <linux/wireless.h> | 465 | #include <linux/wireless.h> |
466 | 466 | ||
467 | #include <net/ieee80211.h> | ||
468 | |||
467 | #include <asm/uaccess.h> | 469 | #include <asm/uaccess.h> |
468 | #include <asm/io.h> | 470 | #include <asm/io.h> |
469 | #include <asm/system.h> | 471 | #include <asm/system.h> |
@@ -471,7 +473,6 @@ | |||
471 | #include "hermes.h" | 473 | #include "hermes.h" |
472 | #include "hermes_rid.h" | 474 | #include "hermes_rid.h" |
473 | #include "orinoco.h" | 475 | #include "orinoco.h" |
474 | #include "ieee802_11.h" | ||
475 | 476 | ||
476 | /********************************************************************/ | 477 | /********************************************************************/ |
477 | /* Module information */ | 478 | /* Module information */ |
@@ -509,7 +510,7 @@ MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes"); | |||
509 | /********************************************************************/ | 510 | /********************************************************************/ |
510 | 511 | ||
511 | #define ORINOCO_MIN_MTU 256 | 512 | #define ORINOCO_MIN_MTU 256 |
512 | #define ORINOCO_MAX_MTU (IEEE802_11_DATA_LEN - ENCAPS_OVERHEAD) | 513 | #define ORINOCO_MAX_MTU (IEEE80211_DATA_LEN - ENCAPS_OVERHEAD) |
513 | 514 | ||
514 | #define SYMBOL_MAX_VER_LEN (14) | 515 | #define SYMBOL_MAX_VER_LEN (14) |
515 | #define USER_BAP 0 | 516 | #define USER_BAP 0 |
@@ -760,7 +761,7 @@ static int orinoco_change_mtu(struct net_device *dev, int new_mtu) | |||
760 | if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) ) | 761 | if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) ) |
761 | return -EINVAL; | 762 | return -EINVAL; |
762 | 763 | ||
763 | if ( (new_mtu + ENCAPS_OVERHEAD + IEEE802_11_HLEN) > | 764 | if ( (new_mtu + ENCAPS_OVERHEAD + IEEE80211_HLEN) > |
764 | (priv->nicbuf_size - ETH_HLEN) ) | 765 | (priv->nicbuf_size - ETH_HLEN) ) |
765 | return -EINVAL; | 766 | return -EINVAL; |
766 | 767 | ||
@@ -1104,7 +1105,7 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) | |||
1104 | stats->rx_dropped++; | 1105 | stats->rx_dropped++; |
1105 | goto drop; | 1106 | goto drop; |
1106 | } | 1107 | } |
1107 | if (length > IEEE802_11_DATA_LEN) { | 1108 | if (length > IEEE80211_DATA_LEN) { |
1108 | printk(KERN_WARNING "%s: Oversized frame received (%d bytes)\n", | 1109 | printk(KERN_WARNING "%s: Oversized frame received (%d bytes)\n", |
1109 | dev->name, length); | 1110 | dev->name, length); |
1110 | stats->rx_length_errors++; | 1111 | stats->rx_length_errors++; |
@@ -2264,7 +2265,7 @@ static int orinoco_init(struct net_device *dev) | |||
2264 | 2265 | ||
2265 | /* No need to lock, the hw_unavailable flag is already set in | 2266 | /* No need to lock, the hw_unavailable flag is already set in |
2266 | * alloc_orinocodev() */ | 2267 | * alloc_orinocodev() */ |
2267 | priv->nicbuf_size = IEEE802_11_FRAME_LEN + ETH_HLEN; | 2268 | priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN; |
2268 | 2269 | ||
2269 | /* Initialize the firmware */ | 2270 | /* Initialize the firmware */ |
2270 | err = hermes_init(hw); | 2271 | err = hermes_init(hw); |
diff --git a/drivers/net/wireless/wl3501.h b/drivers/net/wireless/wl3501.h index 8636d9306785..b5719437e981 100644 --- a/drivers/net/wireless/wl3501.h +++ b/drivers/net/wireless/wl3501.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __WL3501_H__ | 2 | #define __WL3501_H__ |
3 | 3 | ||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include "ieee802_11.h" | 5 | #include <net/ieee80211.h> |
6 | 6 | ||
7 | /* define for WLA 2.0 */ | 7 | /* define for WLA 2.0 */ |
8 | #define WL3501_BLKSZ 256 | 8 | #define WL3501_BLKSZ 256 |
@@ -548,7 +548,7 @@ struct wl3501_80211_tx_plcp_hdr { | |||
548 | 548 | ||
549 | struct wl3501_80211_tx_hdr { | 549 | struct wl3501_80211_tx_hdr { |
550 | struct wl3501_80211_tx_plcp_hdr pclp_hdr; | 550 | struct wl3501_80211_tx_plcp_hdr pclp_hdr; |
551 | struct ieee802_11_hdr mac_hdr; | 551 | struct ieee80211_hdr mac_hdr; |
552 | } __attribute__ ((packed)); | 552 | } __attribute__ ((packed)); |
553 | 553 | ||
554 | /* | 554 | /* |