diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/atmel.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_rx.c | 40 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_tx.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.c | 74 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 141 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 79 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 46 | ||||
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/wl3501.h | 2 |
17 files changed, 232 insertions, 308 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 587869d86eee..d57011028b72 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -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 ieee80211_hdr *header, | 621 | static void atmel_management_frame(struct atmel_private *priv, struct ieee80211_hdr_4addr *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 ieee80211_hdr *header, | 626 | static void atmel_transmit_management_frame(struct atmel_private *priv, struct ieee80211_hdr_4addr *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 ieee80211_hdr header; | 830 | struct ieee80211_hdr_4addr 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}; |
@@ -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 ieee80211_hdr *header, | 905 | struct ieee80211_hdr_4addr *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 ieee80211_hdr *header, | 920 | static void fast_rx_path(struct atmel_private *priv, struct ieee80211_hdr_4addr *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 */ |
@@ -990,7 +990,7 @@ 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 ieee80211_hdr *header, | 993 | static void frag_rx_path(struct atmel_private *priv, struct ieee80211_hdr_4addr *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]; |
@@ -1082,7 +1082,7 @@ static void frag_rx_path(struct atmel_private *priv, struct ieee80211_hdr *heade | |||
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 ieee80211_hdr header; | 1085 | struct ieee80211_hdr_4addr 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 && |
@@ -2650,7 +2650,7 @@ static void handle_beacon_probe(struct atmel_private *priv, u16 capability, u8 c | |||
2650 | 2650 | ||
2651 | static void send_authentication_request(struct atmel_private *priv, u8 *challenge, int challenge_len) | 2651 | static void send_authentication_request(struct atmel_private *priv, u8 *challenge, int challenge_len) |
2652 | { | 2652 | { |
2653 | struct ieee80211_hdr header; | 2653 | struct ieee80211_hdr_4addr header; |
2654 | struct auth_body auth; | 2654 | struct auth_body auth; |
2655 | 2655 | ||
2656 | header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); | 2656 | header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); |
@@ -2688,7 +2688,7 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc) | |||
2688 | { | 2688 | { |
2689 | u8 *ssid_el_p; | 2689 | u8 *ssid_el_p; |
2690 | int bodysize; | 2690 | int bodysize; |
2691 | struct ieee80211_hdr header; | 2691 | struct ieee80211_hdr_4addr header; |
2692 | struct ass_req_format { | 2692 | struct ass_req_format { |
2693 | u16 capability; | 2693 | u16 capability; |
2694 | u16 listen_interval; | 2694 | u16 listen_interval; |
@@ -2738,7 +2738,7 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc) | |||
2738 | atmel_transmit_management_frame(priv, &header, (void *)&body, bodysize); | 2738 | atmel_transmit_management_frame(priv, &header, (void *)&body, bodysize); |
2739 | } | 2739 | } |
2740 | 2740 | ||
2741 | static int is_frame_from_current_bss(struct atmel_private *priv, struct ieee80211_hdr *header) | 2741 | static int is_frame_from_current_bss(struct atmel_private *priv, struct ieee80211_hdr_4addr *header) |
2742 | { | 2742 | { |
2743 | if (le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_FROMDS) | 2743 | if (le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_FROMDS) |
2744 | return memcmp(header->addr3, priv->CurrentBSSID, 6) == 0; | 2744 | return memcmp(header->addr3, priv->CurrentBSSID, 6) == 0; |
@@ -2788,7 +2788,7 @@ static int retrieve_bss(struct atmel_private *priv) | |||
2788 | } | 2788 | } |
2789 | 2789 | ||
2790 | 2790 | ||
2791 | static void store_bss_info(struct atmel_private *priv, struct ieee80211_hdr *header, | 2791 | static void store_bss_info(struct atmel_private *priv, struct ieee80211_hdr_4addr *header, |
2792 | u16 capability, u16 beacon_period, u8 channel, u8 rssi, | 2792 | u16 capability, u16 beacon_period, u8 channel, u8 rssi, |
2793 | u8 ssid_len, u8 *ssid, int is_beacon) | 2793 | u8 ssid_len, u8 *ssid, int is_beacon) |
2794 | { | 2794 | { |
@@ -3072,7 +3072,7 @@ static void atmel_smooth_qual(struct atmel_private *priv) | |||
3072 | } | 3072 | } |
3073 | 3073 | ||
3074 | /* deals with incoming managment frames. */ | 3074 | /* deals with incoming managment frames. */ |
3075 | static void atmel_management_frame(struct atmel_private *priv, struct ieee80211_hdr *header, | 3075 | static void atmel_management_frame(struct atmel_private *priv, struct ieee80211_hdr_4addr *header, |
3076 | u16 frame_len, u8 rssi) | 3076 | u16 frame_len, u8 rssi) |
3077 | { | 3077 | { |
3078 | u16 subtype; | 3078 | u16 subtype; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index b0501243b175..42e61c68c325 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -6,10 +6,10 @@ | |||
6 | void hostap_dump_rx_80211(const char *name, struct sk_buff *skb, | 6 | void hostap_dump_rx_80211(const char *name, struct sk_buff *skb, |
7 | struct hostap_80211_rx_status *rx_stats) | 7 | struct hostap_80211_rx_status *rx_stats) |
8 | { | 8 | { |
9 | struct ieee80211_hdr *hdr; | 9 | struct ieee80211_hdr_4addr *hdr; |
10 | u16 fc; | 10 | u16 fc; |
11 | 11 | ||
12 | hdr = (struct ieee80211_hdr *) skb->data; | 12 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
13 | 13 | ||
14 | printk(KERN_DEBUG "%s: RX signal=%d noise=%d rate=%d len=%d " | 14 | printk(KERN_DEBUG "%s: RX signal=%d noise=%d rate=%d len=%d " |
15 | "jiffies=%ld\n", | 15 | "jiffies=%ld\n", |
@@ -51,7 +51,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb, | |||
51 | int hdrlen, phdrlen, head_need, tail_need; | 51 | int hdrlen, phdrlen, head_need, tail_need; |
52 | u16 fc; | 52 | u16 fc; |
53 | int prism_header, ret; | 53 | int prism_header, ret; |
54 | struct ieee80211_hdr *hdr; | 54 | struct ieee80211_hdr_4addr *hdr; |
55 | 55 | ||
56 | iface = netdev_priv(dev); | 56 | iface = netdev_priv(dev); |
57 | local = iface->local; | 57 | local = iface->local; |
@@ -70,7 +70,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb, | |||
70 | phdrlen = 0; | 70 | phdrlen = 0; |
71 | } | 71 | } |
72 | 72 | ||
73 | hdr = (struct ieee80211_hdr *) skb->data; | 73 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
74 | fc = le16_to_cpu(hdr->frame_ctl); | 74 | fc = le16_to_cpu(hdr->frame_ctl); |
75 | 75 | ||
76 | if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { | 76 | if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { |
@@ -215,7 +215,7 @@ prism2_frag_cache_find(local_info_t *local, unsigned int seq, | |||
215 | 215 | ||
216 | /* Called only as a tasklet (software IRQ) */ | 216 | /* Called only as a tasklet (software IRQ) */ |
217 | static struct sk_buff * | 217 | static struct sk_buff * |
218 | prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr) | 218 | prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr_4addr *hdr) |
219 | { | 219 | { |
220 | struct sk_buff *skb = NULL; | 220 | struct sk_buff *skb = NULL; |
221 | u16 sc; | 221 | u16 sc; |
@@ -229,7 +229,7 @@ prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr) | |||
229 | if (frag == 0) { | 229 | if (frag == 0) { |
230 | /* Reserve enough space to fit maximum frame length */ | 230 | /* Reserve enough space to fit maximum frame length */ |
231 | skb = dev_alloc_skb(local->dev->mtu + | 231 | skb = dev_alloc_skb(local->dev->mtu + |
232 | sizeof(struct ieee80211_hdr) + | 232 | sizeof(struct ieee80211_hdr_4addr) + |
233 | 8 /* LLC */ + | 233 | 8 /* LLC */ + |
234 | 2 /* alignment */ + | 234 | 2 /* alignment */ + |
235 | 8 /* WEP */ + ETH_ALEN /* WDS */); | 235 | 8 /* WEP */ + ETH_ALEN /* WDS */); |
@@ -267,7 +267,7 @@ prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr) | |||
267 | 267 | ||
268 | /* Called only as a tasklet (software IRQ) */ | 268 | /* Called only as a tasklet (software IRQ) */ |
269 | static int prism2_frag_cache_invalidate(local_info_t *local, | 269 | static int prism2_frag_cache_invalidate(local_info_t *local, |
270 | struct ieee80211_hdr *hdr) | 270 | struct ieee80211_hdr_4addr *hdr) |
271 | { | 271 | { |
272 | u16 sc; | 272 | u16 sc; |
273 | unsigned int seq; | 273 | unsigned int seq; |
@@ -441,7 +441,7 @@ hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb, | |||
441 | u16 stype) | 441 | u16 stype) |
442 | { | 442 | { |
443 | if (local->iw_mode == IW_MODE_MASTER) { | 443 | if (local->iw_mode == IW_MODE_MASTER) { |
444 | hostap_update_sta_ps(local, (struct ieee80211_hdr *) | 444 | hostap_update_sta_ps(local, (struct ieee80211_hdr_4addr *) |
445 | skb->data); | 445 | skb->data); |
446 | } | 446 | } |
447 | 447 | ||
@@ -520,7 +520,7 @@ static inline struct net_device *prism2_rx_get_wds(local_info_t *local, | |||
520 | 520 | ||
521 | 521 | ||
522 | static inline int | 522 | static inline int |
523 | hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr, | 523 | hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, |
524 | u16 fc, struct net_device **wds) | 524 | u16 fc, struct net_device **wds) |
525 | { | 525 | { |
526 | /* FIX: is this really supposed to accept WDS frames only in Master | 526 | /* FIX: is this really supposed to accept WDS frames only in Master |
@@ -579,13 +579,13 @@ static int hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb) | |||
579 | { | 579 | { |
580 | struct net_device *dev = local->dev; | 580 | struct net_device *dev = local->dev; |
581 | u16 fc, ethertype; | 581 | u16 fc, ethertype; |
582 | struct ieee80211_hdr *hdr; | 582 | struct ieee80211_hdr_4addr *hdr; |
583 | u8 *pos; | 583 | u8 *pos; |
584 | 584 | ||
585 | if (skb->len < 24) | 585 | if (skb->len < 24) |
586 | return 0; | 586 | return 0; |
587 | 587 | ||
588 | hdr = (struct ieee80211_hdr *) skb->data; | 588 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
589 | fc = le16_to_cpu(hdr->frame_ctl); | 589 | fc = le16_to_cpu(hdr->frame_ctl); |
590 | 590 | ||
591 | /* check that the frame is unicast frame to us */ | 591 | /* check that the frame is unicast frame to us */ |
@@ -619,13 +619,13 @@ static inline int | |||
619 | hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | 619 | hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, |
620 | struct ieee80211_crypt_data *crypt) | 620 | struct ieee80211_crypt_data *crypt) |
621 | { | 621 | { |
622 | struct ieee80211_hdr *hdr; | 622 | struct ieee80211_hdr_4addr *hdr; |
623 | int res, hdrlen; | 623 | int res, hdrlen; |
624 | 624 | ||
625 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) | 625 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) |
626 | return 0; | 626 | return 0; |
627 | 627 | ||
628 | hdr = (struct ieee80211_hdr *) skb->data; | 628 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
629 | hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); | 629 | hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); |
630 | 630 | ||
631 | if (local->tkip_countermeasures && | 631 | if (local->tkip_countermeasures && |
@@ -658,13 +658,13 @@ static inline int | |||
658 | hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb, | 658 | hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb, |
659 | int keyidx, struct ieee80211_crypt_data *crypt) | 659 | int keyidx, struct ieee80211_crypt_data *crypt) |
660 | { | 660 | { |
661 | struct ieee80211_hdr *hdr; | 661 | struct ieee80211_hdr_4addr *hdr; |
662 | int res, hdrlen; | 662 | int res, hdrlen; |
663 | 663 | ||
664 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) | 664 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) |
665 | return 0; | 665 | return 0; |
666 | 666 | ||
667 | hdr = (struct ieee80211_hdr *) skb->data; | 667 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
668 | hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); | 668 | hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); |
669 | 669 | ||
670 | atomic_inc(&crypt->refcnt); | 670 | atomic_inc(&crypt->refcnt); |
@@ -689,7 +689,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
689 | { | 689 | { |
690 | struct hostap_interface *iface; | 690 | struct hostap_interface *iface; |
691 | local_info_t *local; | 691 | local_info_t *local; |
692 | struct ieee80211_hdr *hdr; | 692 | struct ieee80211_hdr_4addr *hdr; |
693 | size_t hdrlen; | 693 | size_t hdrlen; |
694 | u16 fc, type, stype, sc; | 694 | u16 fc, type, stype, sc; |
695 | struct net_device *wds = NULL; | 695 | struct net_device *wds = NULL; |
@@ -716,7 +716,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
716 | dev = local->ddev; | 716 | dev = local->ddev; |
717 | iface = netdev_priv(dev); | 717 | iface = netdev_priv(dev); |
718 | 718 | ||
719 | hdr = (struct ieee80211_hdr *) skb->data; | 719 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
720 | stats = hostap_get_stats(dev); | 720 | stats = hostap_get_stats(dev); |
721 | 721 | ||
722 | if (skb->len < 10) | 722 | if (skb->len < 10) |
@@ -889,7 +889,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
889 | if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && | 889 | if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) && |
890 | (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) | 890 | (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) |
891 | goto rx_dropped; | 891 | goto rx_dropped; |
892 | hdr = (struct ieee80211_hdr *) skb->data; | 892 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
893 | 893 | ||
894 | /* skb: hdr + (possibly fragmented) plaintext payload */ | 894 | /* skb: hdr + (possibly fragmented) plaintext payload */ |
895 | 895 | ||
@@ -941,7 +941,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
941 | /* this was the last fragment and the frame will be | 941 | /* this was the last fragment and the frame will be |
942 | * delivered, so remove skb from fragment cache */ | 942 | * delivered, so remove skb from fragment cache */ |
943 | skb = frag_skb; | 943 | skb = frag_skb; |
944 | hdr = (struct ieee80211_hdr *) skb->data; | 944 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
945 | prism2_frag_cache_invalidate(local, hdr); | 945 | prism2_frag_cache_invalidate(local, hdr); |
946 | } | 946 | } |
947 | 947 | ||
@@ -952,7 +952,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
952 | hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt)) | 952 | hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt)) |
953 | goto rx_dropped; | 953 | goto rx_dropped; |
954 | 954 | ||
955 | hdr = (struct ieee80211_hdr *) skb->data; | 955 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
956 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !local->open_wep) { | 956 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !local->open_wep) { |
957 | if (local->ieee_802_1x && | 957 | if (local->ieee_802_1x && |
958 | hostap_is_eapol_frame(local, skb)) { | 958 | hostap_is_eapol_frame(local, skb)) { |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 6358015f6526..9d24f8a38ac5 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -1,9 +1,9 @@ | |||
1 | void hostap_dump_tx_80211(const char *name, struct sk_buff *skb) | 1 | void hostap_dump_tx_80211(const char *name, struct sk_buff *skb) |
2 | { | 2 | { |
3 | struct ieee80211_hdr *hdr; | 3 | struct ieee80211_hdr_4addr *hdr; |
4 | u16 fc; | 4 | u16 fc; |
5 | 5 | ||
6 | hdr = (struct ieee80211_hdr *) skb->data; | 6 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
7 | 7 | ||
8 | printk(KERN_DEBUG "%s: TX len=%d jiffies=%ld\n", | 8 | printk(KERN_DEBUG "%s: TX len=%d jiffies=%ld\n", |
9 | name, skb->len, jiffies); | 9 | name, skb->len, jiffies); |
@@ -41,7 +41,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
41 | struct hostap_interface *iface; | 41 | struct hostap_interface *iface; |
42 | local_info_t *local; | 42 | local_info_t *local; |
43 | int need_headroom, need_tailroom = 0; | 43 | int need_headroom, need_tailroom = 0; |
44 | struct ieee80211_hdr hdr; | 44 | struct ieee80211_hdr_4addr hdr; |
45 | u16 fc, ethertype = 0; | 45 | u16 fc, ethertype = 0; |
46 | enum { | 46 | enum { |
47 | WDS_NO = 0, WDS_OWN_FRAME, WDS_COMPLIANT_FRAME | 47 | WDS_NO = 0, WDS_OWN_FRAME, WDS_COMPLIANT_FRAME |
@@ -244,7 +244,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
244 | struct hostap_interface *iface; | 244 | struct hostap_interface *iface; |
245 | local_info_t *local; | 245 | local_info_t *local; |
246 | struct hostap_skb_tx_data *meta; | 246 | struct hostap_skb_tx_data *meta; |
247 | struct ieee80211_hdr *hdr; | 247 | struct ieee80211_hdr_4addr *hdr; |
248 | u16 fc; | 248 | u16 fc; |
249 | 249 | ||
250 | iface = netdev_priv(dev); | 250 | iface = netdev_priv(dev); |
@@ -266,7 +266,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
266 | meta->iface = iface; | 266 | meta->iface = iface; |
267 | 267 | ||
268 | if (skb->len >= IEEE80211_DATA_HDR3_LEN + sizeof(rfc1042_header) + 2) { | 268 | if (skb->len >= IEEE80211_DATA_HDR3_LEN + sizeof(rfc1042_header) + 2) { |
269 | hdr = (struct ieee80211_hdr *) skb->data; | 269 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
270 | fc = le16_to_cpu(hdr->frame_ctl); | 270 | fc = le16_to_cpu(hdr->frame_ctl); |
271 | if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && | 271 | if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && |
272 | WLAN_FC_GET_STYPE(fc) == IEEE80211_STYPE_DATA) { | 272 | WLAN_FC_GET_STYPE(fc) == IEEE80211_STYPE_DATA) { |
@@ -289,7 +289,7 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, | |||
289 | { | 289 | { |
290 | struct hostap_interface *iface; | 290 | struct hostap_interface *iface; |
291 | local_info_t *local; | 291 | local_info_t *local; |
292 | struct ieee80211_hdr *hdr; | 292 | struct ieee80211_hdr_4addr *hdr; |
293 | u16 fc; | 293 | u16 fc; |
294 | int hdr_len, res; | 294 | int hdr_len, res; |
295 | 295 | ||
@@ -303,7 +303,7 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, | |||
303 | 303 | ||
304 | if (local->tkip_countermeasures && | 304 | if (local->tkip_countermeasures && |
305 | crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) { | 305 | crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) { |
306 | hdr = (struct ieee80211_hdr *) skb->data; | 306 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
307 | if (net_ratelimit()) { | 307 | if (net_ratelimit()) { |
308 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " | 308 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " |
309 | "TX packet to " MACSTR "\n", | 309 | "TX packet to " MACSTR "\n", |
@@ -317,15 +317,15 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, | |||
317 | if (skb == NULL) | 317 | if (skb == NULL) |
318 | return NULL; | 318 | return NULL; |
319 | 319 | ||
320 | if ((skb_headroom(skb) < crypt->ops->extra_prefix_len || | 320 | if ((skb_headroom(skb) < crypt->ops->extra_mpdu_prefix_len || |
321 | skb_tailroom(skb) < crypt->ops->extra_postfix_len) && | 321 | skb_tailroom(skb) < crypt->ops->extra_mpdu_postfix_len) && |
322 | pskb_expand_head(skb, crypt->ops->extra_prefix_len, | 322 | pskb_expand_head(skb, crypt->ops->extra_mpdu_prefix_len, |
323 | crypt->ops->extra_postfix_len, GFP_ATOMIC)) { | 323 | crypt->ops->extra_mpdu_postfix_len, GFP_ATOMIC)) { |
324 | kfree_skb(skb); | 324 | kfree_skb(skb); |
325 | return NULL; | 325 | return NULL; |
326 | } | 326 | } |
327 | 327 | ||
328 | hdr = (struct ieee80211_hdr *) skb->data; | 328 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
329 | fc = le16_to_cpu(hdr->frame_ctl); | 329 | fc = le16_to_cpu(hdr->frame_ctl); |
330 | hdr_len = hostap_80211_get_hdrlen(fc); | 330 | hdr_len = hostap_80211_get_hdrlen(fc); |
331 | 331 | ||
@@ -360,7 +360,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
360 | ap_tx_ret tx_ret; | 360 | ap_tx_ret tx_ret; |
361 | struct hostap_skb_tx_data *meta; | 361 | struct hostap_skb_tx_data *meta; |
362 | int no_encrypt = 0; | 362 | int no_encrypt = 0; |
363 | struct ieee80211_hdr *hdr; | 363 | struct ieee80211_hdr_4addr *hdr; |
364 | 364 | ||
365 | iface = netdev_priv(dev); | 365 | iface = netdev_priv(dev); |
366 | local = iface->local; | 366 | local = iface->local; |
@@ -403,7 +403,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
403 | tx_ret = hostap_handle_sta_tx(local, &tx); | 403 | tx_ret = hostap_handle_sta_tx(local, &tx); |
404 | skb = tx.skb; | 404 | skb = tx.skb; |
405 | meta = (struct hostap_skb_tx_data *) skb->cb; | 405 | meta = (struct hostap_skb_tx_data *) skb->cb; |
406 | hdr = (struct ieee80211_hdr *) skb->data; | 406 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
407 | fc = le16_to_cpu(hdr->frame_ctl); | 407 | fc = le16_to_cpu(hdr->frame_ctl); |
408 | switch (tx_ret) { | 408 | switch (tx_ret) { |
409 | case AP_TX_CONTINUE: | 409 | case AP_TX_CONTINUE: |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 930cef8367f2..087d9269af34 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -591,14 +591,14 @@ static void hostap_ap_tx_cb(struct sk_buff *skb, int ok, void *data) | |||
591 | { | 591 | { |
592 | struct ap_data *ap = data; | 592 | struct ap_data *ap = data; |
593 | u16 fc; | 593 | u16 fc; |
594 | struct ieee80211_hdr *hdr; | 594 | struct ieee80211_hdr_4addr *hdr; |
595 | 595 | ||
596 | if (!ap->local->hostapd || !ap->local->apdev) { | 596 | if (!ap->local->hostapd || !ap->local->apdev) { |
597 | dev_kfree_skb(skb); | 597 | dev_kfree_skb(skb); |
598 | return; | 598 | return; |
599 | } | 599 | } |
600 | 600 | ||
601 | hdr = (struct ieee80211_hdr *) skb->data; | 601 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
602 | fc = le16_to_cpu(hdr->frame_ctl); | 602 | fc = le16_to_cpu(hdr->frame_ctl); |
603 | 603 | ||
604 | /* Pass the TX callback frame to the hostapd; use 802.11 header version | 604 | /* Pass the TX callback frame to the hostapd; use 802.11 header version |
@@ -623,7 +623,7 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data) | |||
623 | { | 623 | { |
624 | struct ap_data *ap = data; | 624 | struct ap_data *ap = data; |
625 | struct net_device *dev = ap->local->dev; | 625 | struct net_device *dev = ap->local->dev; |
626 | struct ieee80211_hdr *hdr; | 626 | struct ieee80211_hdr_4addr *hdr; |
627 | u16 fc, *pos, auth_alg, auth_transaction, status; | 627 | u16 fc, *pos, auth_alg, auth_transaction, status; |
628 | struct sta_info *sta = NULL; | 628 | struct sta_info *sta = NULL; |
629 | char *txt = NULL; | 629 | char *txt = NULL; |
@@ -633,7 +633,7 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data) | |||
633 | return; | 633 | return; |
634 | } | 634 | } |
635 | 635 | ||
636 | hdr = (struct ieee80211_hdr *) skb->data; | 636 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
637 | fc = le16_to_cpu(hdr->frame_ctl); | 637 | fc = le16_to_cpu(hdr->frame_ctl); |
638 | if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_MGMT || | 638 | if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_MGMT || |
639 | WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_AUTH || | 639 | WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_AUTH || |
@@ -692,7 +692,7 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) | |||
692 | { | 692 | { |
693 | struct ap_data *ap = data; | 693 | struct ap_data *ap = data; |
694 | struct net_device *dev = ap->local->dev; | 694 | struct net_device *dev = ap->local->dev; |
695 | struct ieee80211_hdr *hdr; | 695 | struct ieee80211_hdr_4addr *hdr; |
696 | u16 fc, *pos, status; | 696 | u16 fc, *pos, status; |
697 | struct sta_info *sta = NULL; | 697 | struct sta_info *sta = NULL; |
698 | char *txt = NULL; | 698 | char *txt = NULL; |
@@ -702,7 +702,7 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) | |||
702 | return; | 702 | return; |
703 | } | 703 | } |
704 | 704 | ||
705 | hdr = (struct ieee80211_hdr *) skb->data; | 705 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
706 | fc = le16_to_cpu(hdr->frame_ctl); | 706 | fc = le16_to_cpu(hdr->frame_ctl); |
707 | if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_MGMT || | 707 | if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_MGMT || |
708 | (WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_ASSOC_RESP && | 708 | (WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_ASSOC_RESP && |
@@ -757,12 +757,12 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) | |||
757 | static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data) | 757 | static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data) |
758 | { | 758 | { |
759 | struct ap_data *ap = data; | 759 | struct ap_data *ap = data; |
760 | struct ieee80211_hdr *hdr; | 760 | struct ieee80211_hdr_4addr *hdr; |
761 | struct sta_info *sta; | 761 | struct sta_info *sta; |
762 | 762 | ||
763 | if (skb->len < 24) | 763 | if (skb->len < 24) |
764 | goto fail; | 764 | goto fail; |
765 | hdr = (struct ieee80211_hdr *) skb->data; | 765 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
766 | if (ok) { | 766 | if (ok) { |
767 | spin_lock(&ap->sta_table_lock); | 767 | spin_lock(&ap->sta_table_lock); |
768 | sta = ap_get_sta(ap, hdr->addr1); | 768 | sta = ap_get_sta(ap, hdr->addr1); |
@@ -918,7 +918,7 @@ static void prism2_send_mgmt(struct net_device *dev, | |||
918 | { | 918 | { |
919 | struct hostap_interface *iface; | 919 | struct hostap_interface *iface; |
920 | local_info_t *local; | 920 | local_info_t *local; |
921 | struct ieee80211_hdr *hdr; | 921 | struct ieee80211_hdr_4addr *hdr; |
922 | u16 fc; | 922 | u16 fc; |
923 | struct sk_buff *skb; | 923 | struct sk_buff *skb; |
924 | struct hostap_skb_tx_data *meta; | 924 | struct hostap_skb_tx_data *meta; |
@@ -944,7 +944,7 @@ static void prism2_send_mgmt(struct net_device *dev, | |||
944 | 944 | ||
945 | fc = type_subtype; | 945 | fc = type_subtype; |
946 | hdrlen = hostap_80211_get_hdrlen(fc); | 946 | hdrlen = hostap_80211_get_hdrlen(fc); |
947 | hdr = (struct ieee80211_hdr *) skb_put(skb, hdrlen); | 947 | hdr = (struct ieee80211_hdr_4addr *) skb_put(skb, hdrlen); |
948 | if (body) | 948 | if (body) |
949 | memcpy(skb_put(skb, body_len), body, body_len); | 949 | memcpy(skb_put(skb, body_len), body, body_len); |
950 | 950 | ||
@@ -1256,14 +1256,14 @@ static char * ap_auth_make_challenge(struct ap_data *ap) | |||
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | skb = dev_alloc_skb(WLAN_AUTH_CHALLENGE_LEN + | 1258 | skb = dev_alloc_skb(WLAN_AUTH_CHALLENGE_LEN + |
1259 | ap->crypt->extra_prefix_len + | 1259 | ap->crypt->extra_mpdu_prefix_len + |
1260 | ap->crypt->extra_postfix_len); | 1260 | ap->crypt->extra_mpdu_postfix_len); |
1261 | if (skb == NULL) { | 1261 | if (skb == NULL) { |
1262 | kfree(tmpbuf); | 1262 | kfree(tmpbuf); |
1263 | return NULL; | 1263 | return NULL; |
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | skb_reserve(skb, ap->crypt->extra_prefix_len); | 1266 | skb_reserve(skb, ap->crypt->extra_mpdu_prefix_len); |
1267 | memset(skb_put(skb, WLAN_AUTH_CHALLENGE_LEN), 0, | 1267 | memset(skb_put(skb, WLAN_AUTH_CHALLENGE_LEN), 0, |
1268 | WLAN_AUTH_CHALLENGE_LEN); | 1268 | WLAN_AUTH_CHALLENGE_LEN); |
1269 | if (ap->crypt->encrypt_mpdu(skb, 0, ap->crypt_priv)) { | 1269 | if (ap->crypt->encrypt_mpdu(skb, 0, ap->crypt_priv)) { |
@@ -1272,7 +1272,7 @@ static char * ap_auth_make_challenge(struct ap_data *ap) | |||
1272 | return NULL; | 1272 | return NULL; |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | memcpy(tmpbuf, skb->data + ap->crypt->extra_prefix_len, | 1275 | memcpy(tmpbuf, skb->data + ap->crypt->extra_mpdu_prefix_len, |
1276 | WLAN_AUTH_CHALLENGE_LEN); | 1276 | WLAN_AUTH_CHALLENGE_LEN); |
1277 | dev_kfree_skb(skb); | 1277 | dev_kfree_skb(skb); |
1278 | 1278 | ||
@@ -1285,7 +1285,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1285 | struct hostap_80211_rx_status *rx_stats) | 1285 | struct hostap_80211_rx_status *rx_stats) |
1286 | { | 1286 | { |
1287 | struct net_device *dev = local->dev; | 1287 | struct net_device *dev = local->dev; |
1288 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 1288 | struct ieee80211_hdr_4addr *hdr = (struct ieee80211_hdr_4addr *) skb->data; |
1289 | size_t hdrlen; | 1289 | size_t hdrlen; |
1290 | struct ap_data *ap = local->ap; | 1290 | struct ap_data *ap = local->ap; |
1291 | char body[8 + WLAN_AUTH_CHALLENGE_LEN], *challenge = NULL; | 1291 | char body[8 + WLAN_AUTH_CHALLENGE_LEN], *challenge = NULL; |
@@ -1498,7 +1498,7 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb, | |||
1498 | struct hostap_80211_rx_status *rx_stats, int reassoc) | 1498 | struct hostap_80211_rx_status *rx_stats, int reassoc) |
1499 | { | 1499 | { |
1500 | struct net_device *dev = local->dev; | 1500 | struct net_device *dev = local->dev; |
1501 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 1501 | struct ieee80211_hdr_4addr *hdr = (struct ieee80211_hdr_4addr *) skb->data; |
1502 | char body[12], *p, *lpos; | 1502 | char body[12], *p, *lpos; |
1503 | int len, left; | 1503 | int len, left; |
1504 | u16 *pos; | 1504 | u16 *pos; |
@@ -1705,7 +1705,7 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb, | |||
1705 | struct hostap_80211_rx_status *rx_stats) | 1705 | struct hostap_80211_rx_status *rx_stats) |
1706 | { | 1706 | { |
1707 | struct net_device *dev = local->dev; | 1707 | struct net_device *dev = local->dev; |
1708 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 1708 | struct ieee80211_hdr_4addr *hdr = (struct ieee80211_hdr_4addr *) skb->data; |
1709 | char *body = (char *) (skb->data + IEEE80211_MGMT_HDR_LEN); | 1709 | char *body = (char *) (skb->data + IEEE80211_MGMT_HDR_LEN); |
1710 | int len; | 1710 | int len; |
1711 | u16 reason_code, *pos; | 1711 | u16 reason_code, *pos; |
@@ -1746,7 +1746,7 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb, | |||
1746 | struct hostap_80211_rx_status *rx_stats) | 1746 | struct hostap_80211_rx_status *rx_stats) |
1747 | { | 1747 | { |
1748 | struct net_device *dev = local->dev; | 1748 | struct net_device *dev = local->dev; |
1749 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 1749 | struct ieee80211_hdr_4addr *hdr = (struct ieee80211_hdr_4addr *) skb->data; |
1750 | char *body = skb->data + IEEE80211_MGMT_HDR_LEN; | 1750 | char *body = skb->data + IEEE80211_MGMT_HDR_LEN; |
1751 | int len; | 1751 | int len; |
1752 | u16 reason_code, *pos; | 1752 | u16 reason_code, *pos; |
@@ -1784,7 +1784,7 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb, | |||
1784 | 1784 | ||
1785 | /* Called only as a scheduled task for pending AP frames. */ | 1785 | /* Called only as a scheduled task for pending AP frames. */ |
1786 | static void ap_handle_data_nullfunc(local_info_t *local, | 1786 | static void ap_handle_data_nullfunc(local_info_t *local, |
1787 | struct ieee80211_hdr *hdr) | 1787 | struct ieee80211_hdr_4addr *hdr) |
1788 | { | 1788 | { |
1789 | struct net_device *dev = local->dev; | 1789 | struct net_device *dev = local->dev; |
1790 | 1790 | ||
@@ -1801,7 +1801,7 @@ static void ap_handle_data_nullfunc(local_info_t *local, | |||
1801 | 1801 | ||
1802 | /* Called only as a scheduled task for pending AP frames. */ | 1802 | /* Called only as a scheduled task for pending AP frames. */ |
1803 | static void ap_handle_dropped_data(local_info_t *local, | 1803 | static void ap_handle_dropped_data(local_info_t *local, |
1804 | struct ieee80211_hdr *hdr) | 1804 | struct ieee80211_hdr_4addr *hdr) |
1805 | { | 1805 | { |
1806 | struct net_device *dev = local->dev; | 1806 | struct net_device *dev = local->dev; |
1807 | struct sta_info *sta; | 1807 | struct sta_info *sta; |
@@ -1860,7 +1860,7 @@ static void pspoll_send_buffered(local_info_t *local, struct sta_info *sta, | |||
1860 | 1860 | ||
1861 | /* Called only as a scheduled task for pending AP frames. */ | 1861 | /* Called only as a scheduled task for pending AP frames. */ |
1862 | static void handle_pspoll(local_info_t *local, | 1862 | static void handle_pspoll(local_info_t *local, |
1863 | struct ieee80211_hdr *hdr, | 1863 | struct ieee80211_hdr_4addr *hdr, |
1864 | struct hostap_80211_rx_status *rx_stats) | 1864 | struct hostap_80211_rx_status *rx_stats) |
1865 | { | 1865 | { |
1866 | struct net_device *dev = local->dev; | 1866 | struct net_device *dev = local->dev; |
@@ -1979,7 +1979,7 @@ static void handle_wds_oper_queue(void *data) | |||
1979 | static void handle_beacon(local_info_t *local, struct sk_buff *skb, | 1979 | static void handle_beacon(local_info_t *local, struct sk_buff *skb, |
1980 | struct hostap_80211_rx_status *rx_stats) | 1980 | struct hostap_80211_rx_status *rx_stats) |
1981 | { | 1981 | { |
1982 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 1982 | struct ieee80211_hdr_4addr *hdr = (struct ieee80211_hdr_4addr *) skb->data; |
1983 | char *body = skb->data + IEEE80211_MGMT_HDR_LEN; | 1983 | char *body = skb->data + IEEE80211_MGMT_HDR_LEN; |
1984 | int len, left; | 1984 | int len, left; |
1985 | u16 *pos, beacon_int, capability; | 1985 | u16 *pos, beacon_int, capability; |
@@ -2137,11 +2137,11 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2137 | struct net_device *dev = local->dev; | 2137 | struct net_device *dev = local->dev; |
2138 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 2138 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
2139 | u16 fc, type, stype; | 2139 | u16 fc, type, stype; |
2140 | struct ieee80211_hdr *hdr; | 2140 | struct ieee80211_hdr_4addr *hdr; |
2141 | 2141 | ||
2142 | /* FIX: should give skb->len to handler functions and check that the | 2142 | /* FIX: should give skb->len to handler functions and check that the |
2143 | * buffer is long enough */ | 2143 | * buffer is long enough */ |
2144 | hdr = (struct ieee80211_hdr *) skb->data; | 2144 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2145 | fc = le16_to_cpu(hdr->frame_ctl); | 2145 | fc = le16_to_cpu(hdr->frame_ctl); |
2146 | type = WLAN_FC_GET_TYPE(fc); | 2146 | type = WLAN_FC_GET_TYPE(fc); |
2147 | stype = WLAN_FC_GET_STYPE(fc); | 2147 | stype = WLAN_FC_GET_STYPE(fc); |
@@ -2258,7 +2258,7 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb, | |||
2258 | struct hostap_interface *iface; | 2258 | struct hostap_interface *iface; |
2259 | local_info_t *local; | 2259 | local_info_t *local; |
2260 | u16 fc; | 2260 | u16 fc; |
2261 | struct ieee80211_hdr *hdr; | 2261 | struct ieee80211_hdr_4addr *hdr; |
2262 | 2262 | ||
2263 | iface = netdev_priv(dev); | 2263 | iface = netdev_priv(dev); |
2264 | local = iface->local; | 2264 | local = iface->local; |
@@ -2268,7 +2268,7 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb, | |||
2268 | 2268 | ||
2269 | local->stats.rx_packets++; | 2269 | local->stats.rx_packets++; |
2270 | 2270 | ||
2271 | hdr = (struct ieee80211_hdr *) skb->data; | 2271 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2272 | fc = le16_to_cpu(hdr->frame_ctl); | 2272 | fc = le16_to_cpu(hdr->frame_ctl); |
2273 | 2273 | ||
2274 | if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL && | 2274 | if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL && |
@@ -2289,7 +2289,7 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb, | |||
2289 | static void schedule_packet_send(local_info_t *local, struct sta_info *sta) | 2289 | static void schedule_packet_send(local_info_t *local, struct sta_info *sta) |
2290 | { | 2290 | { |
2291 | struct sk_buff *skb; | 2291 | struct sk_buff *skb; |
2292 | struct ieee80211_hdr *hdr; | 2292 | struct ieee80211_hdr_4addr *hdr; |
2293 | struct hostap_80211_rx_status rx_stats; | 2293 | struct hostap_80211_rx_status rx_stats; |
2294 | 2294 | ||
2295 | if (skb_queue_empty(&sta->tx_buf)) | 2295 | if (skb_queue_empty(&sta->tx_buf)) |
@@ -2302,7 +2302,7 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta) | |||
2302 | return; | 2302 | return; |
2303 | } | 2303 | } |
2304 | 2304 | ||
2305 | hdr = (struct ieee80211_hdr *) skb_put(skb, 16); | 2305 | hdr = (struct ieee80211_hdr_4addr *) skb_put(skb, 16); |
2306 | 2306 | ||
2307 | /* Generate a fake pspoll frame to start packet delivery */ | 2307 | /* Generate a fake pspoll frame to start packet delivery */ |
2308 | hdr->frame_ctl = __constant_cpu_to_le16( | 2308 | hdr->frame_ctl = __constant_cpu_to_le16( |
@@ -2685,7 +2685,7 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) | |||
2685 | struct sta_info *sta = NULL; | 2685 | struct sta_info *sta = NULL; |
2686 | struct sk_buff *skb = tx->skb; | 2686 | struct sk_buff *skb = tx->skb; |
2687 | int set_tim, ret; | 2687 | int set_tim, ret; |
2688 | struct ieee80211_hdr *hdr; | 2688 | struct ieee80211_hdr_4addr *hdr; |
2689 | struct hostap_skb_tx_data *meta; | 2689 | struct hostap_skb_tx_data *meta; |
2690 | 2690 | ||
2691 | meta = (struct hostap_skb_tx_data *) skb->cb; | 2691 | meta = (struct hostap_skb_tx_data *) skb->cb; |
@@ -2694,7 +2694,7 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) | |||
2694 | meta->iface->type == HOSTAP_INTERFACE_STA) | 2694 | meta->iface->type == HOSTAP_INTERFACE_STA) |
2695 | goto out; | 2695 | goto out; |
2696 | 2696 | ||
2697 | hdr = (struct ieee80211_hdr *) skb->data; | 2697 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2698 | 2698 | ||
2699 | if (hdr->addr1[0] & 0x01) { | 2699 | if (hdr->addr1[0] & 0x01) { |
2700 | /* broadcast/multicast frame - no AP related processing */ | 2700 | /* broadcast/multicast frame - no AP related processing */ |
@@ -2821,10 +2821,10 @@ void hostap_handle_sta_release(void *ptr) | |||
2821 | void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) | 2821 | void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) |
2822 | { | 2822 | { |
2823 | struct sta_info *sta; | 2823 | struct sta_info *sta; |
2824 | struct ieee80211_hdr *hdr; | 2824 | struct ieee80211_hdr_4addr *hdr; |
2825 | struct hostap_skb_tx_data *meta; | 2825 | struct hostap_skb_tx_data *meta; |
2826 | 2826 | ||
2827 | hdr = (struct ieee80211_hdr *) skb->data; | 2827 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2828 | meta = (struct hostap_skb_tx_data *) skb->cb; | 2828 | meta = (struct hostap_skb_tx_data *) skb->cb; |
2829 | 2829 | ||
2830 | spin_lock(&local->ap->sta_table_lock); | 2830 | spin_lock(&local->ap->sta_table_lock); |
@@ -2892,7 +2892,7 @@ static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta, | |||
2892 | 2892 | ||
2893 | /* Called only as a tasklet (software IRQ). Called for each RX frame to update | 2893 | /* Called only as a tasklet (software IRQ). Called for each RX frame to update |
2894 | * STA power saving state. pwrmgt is a flag from 802.11 frame_ctl field. */ | 2894 | * STA power saving state. pwrmgt is a flag from 802.11 frame_ctl field. */ |
2895 | int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr *hdr) | 2895 | int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr_4addr *hdr) |
2896 | { | 2896 | { |
2897 | struct sta_info *sta; | 2897 | struct sta_info *sta; |
2898 | u16 fc; | 2898 | u16 fc; |
@@ -2925,12 +2925,12 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
2925 | int ret; | 2925 | int ret; |
2926 | struct sta_info *sta; | 2926 | struct sta_info *sta; |
2927 | u16 fc, type, stype; | 2927 | u16 fc, type, stype; |
2928 | struct ieee80211_hdr *hdr; | 2928 | struct ieee80211_hdr_4addr *hdr; |
2929 | 2929 | ||
2930 | if (local->ap == NULL) | 2930 | if (local->ap == NULL) |
2931 | return AP_RX_CONTINUE; | 2931 | return AP_RX_CONTINUE; |
2932 | 2932 | ||
2933 | hdr = (struct ieee80211_hdr *) skb->data; | 2933 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2934 | 2934 | ||
2935 | fc = le16_to_cpu(hdr->frame_ctl); | 2935 | fc = le16_to_cpu(hdr->frame_ctl); |
2936 | type = WLAN_FC_GET_TYPE(fc); | 2936 | type = WLAN_FC_GET_TYPE(fc); |
@@ -3058,7 +3058,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3058 | 3058 | ||
3059 | /* Called only as a tasklet (software IRQ) */ | 3059 | /* Called only as a tasklet (software IRQ) */ |
3060 | int hostap_handle_sta_crypto(local_info_t *local, | 3060 | int hostap_handle_sta_crypto(local_info_t *local, |
3061 | struct ieee80211_hdr *hdr, | 3061 | struct ieee80211_hdr_4addr *hdr, |
3062 | struct ieee80211_crypt_data **crypt, | 3062 | struct ieee80211_crypt_data **crypt, |
3063 | void **sta_ptr) | 3063 | void **sta_ptr) |
3064 | { | 3064 | { |
@@ -3160,7 +3160,7 @@ int hostap_add_sta(struct ap_data *ap, u8 *sta_addr) | |||
3160 | 3160 | ||
3161 | /* Called only as a tasklet (software IRQ) */ | 3161 | /* Called only as a tasklet (software IRQ) */ |
3162 | int hostap_update_rx_stats(struct ap_data *ap, | 3162 | int hostap_update_rx_stats(struct ap_data *ap, |
3163 | struct ieee80211_hdr *hdr, | 3163 | struct ieee80211_hdr_4addr *hdr, |
3164 | struct hostap_80211_rx_status *rx_stats) | 3164 | struct hostap_80211_rx_status *rx_stats) |
3165 | { | 3165 | { |
3166 | struct sta_info *sta; | 3166 | struct sta_info *sta; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.h b/drivers/net/wireless/hostap/hostap_ap.h index 816a52bcea8f..6d00df69c2e3 100644 --- a/drivers/net/wireless/hostap/hostap_ap.h +++ b/drivers/net/wireless/hostap/hostap_ap.h | |||
@@ -233,7 +233,7 @@ struct hostap_tx_data { | |||
233 | ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx); | 233 | ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx); |
234 | void hostap_handle_sta_release(void *ptr); | 234 | void hostap_handle_sta_release(void *ptr); |
235 | void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb); | 235 | void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb); |
236 | int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr *hdr); | 236 | int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr_4addr *hdr); |
237 | typedef enum { | 237 | typedef enum { |
238 | AP_RX_CONTINUE, AP_RX_DROP, AP_RX_EXIT, AP_RX_CONTINUE_NOT_AUTHORIZED | 238 | AP_RX_CONTINUE, AP_RX_DROP, AP_RX_EXIT, AP_RX_CONTINUE_NOT_AUTHORIZED |
239 | } ap_rx_ret; | 239 | } ap_rx_ret; |
@@ -241,13 +241,13 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
241 | struct sk_buff *skb, | 241 | struct sk_buff *skb, |
242 | struct hostap_80211_rx_status *rx_stats, | 242 | struct hostap_80211_rx_status *rx_stats, |
243 | int wds); | 243 | int wds); |
244 | int hostap_handle_sta_crypto(local_info_t *local, struct ieee80211_hdr *hdr, | 244 | int hostap_handle_sta_crypto(local_info_t *local, struct ieee80211_hdr_4addr *hdr, |
245 | struct ieee80211_crypt_data **crypt, | 245 | struct ieee80211_crypt_data **crypt, |
246 | void **sta_ptr); | 246 | void **sta_ptr); |
247 | int hostap_is_sta_assoc(struct ap_data *ap, u8 *sta_addr); | 247 | int hostap_is_sta_assoc(struct ap_data *ap, u8 *sta_addr); |
248 | int hostap_is_sta_authorized(struct ap_data *ap, u8 *sta_addr); | 248 | int hostap_is_sta_authorized(struct ap_data *ap, u8 *sta_addr); |
249 | int hostap_add_sta(struct ap_data *ap, u8 *sta_addr); | 249 | int hostap_add_sta(struct ap_data *ap, u8 *sta_addr); |
250 | int hostap_update_rx_stats(struct ap_data *ap, struct ieee80211_hdr *hdr, | 250 | int hostap_update_rx_stats(struct ap_data *ap, struct ieee80211_hdr_4addr *hdr, |
251 | struct hostap_80211_rx_status *rx_stats); | 251 | struct hostap_80211_rx_status *rx_stats); |
252 | void hostap_update_rates(local_info_t *local); | 252 | void hostap_update_rates(local_info_t *local); |
253 | void hostap_add_wds_links(local_info_t *local); | 253 | void hostap_add_wds_links(local_info_t *local); |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 2414e6493aa5..ad7f8cd76db9 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -800,8 +800,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv, | |||
800 | * doesn't seem to have as many firmware restart cycles... | 800 | * doesn't seem to have as many firmware restart cycles... |
801 | * | 801 | * |
802 | * As a test, we're sticking in a 1/100s delay here */ | 802 | * As a test, we're sticking in a 1/100s delay here */ |
803 | set_current_state(TASK_UNINTERRUPTIBLE); | 803 | schedule_timeout_uninterruptible(msecs_to_jiffies(10)); |
804 | schedule_timeout(HZ / 100); | ||
805 | 804 | ||
806 | return 0; | 805 | return 0; |
807 | 806 | ||
@@ -1256,8 +1255,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) | |||
1256 | IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); | 1255 | IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); |
1257 | i = 5000; | 1256 | i = 5000; |
1258 | do { | 1257 | do { |
1259 | set_current_state(TASK_UNINTERRUPTIBLE); | 1258 | schedule_timeout_uninterruptible(msecs_to_jiffies(40)); |
1260 | schedule_timeout(40 * HZ / 1000); | ||
1261 | /* Todo... wait for sync command ... */ | 1259 | /* Todo... wait for sync command ... */ |
1262 | 1260 | ||
1263 | read_register(priv->net_dev, IPW_REG_INTA, &inta); | 1261 | read_register(priv->net_dev, IPW_REG_INTA, &inta); |
@@ -1411,8 +1409,7 @@ static int ipw2100_hw_phy_off(struct ipw2100_priv *priv) | |||
1411 | (val2 & IPW2100_COMMAND_PHY_OFF)) | 1409 | (val2 & IPW2100_COMMAND_PHY_OFF)) |
1412 | return 0; | 1410 | return 0; |
1413 | 1411 | ||
1414 | set_current_state(TASK_UNINTERRUPTIBLE); | 1412 | schedule_timeout_uninterruptible(HW_PHY_OFF_LOOP_DELAY); |
1415 | schedule_timeout(HW_PHY_OFF_LOOP_DELAY); | ||
1416 | } | 1413 | } |
1417 | 1414 | ||
1418 | return -EIO; | 1415 | return -EIO; |
@@ -1466,7 +1463,7 @@ fail_up: | |||
1466 | 1463 | ||
1467 | static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) | 1464 | static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) |
1468 | { | 1465 | { |
1469 | #define HW_POWER_DOWN_DELAY (HZ / 10) | 1466 | #define HW_POWER_DOWN_DELAY (msecs_to_jiffies(100)) |
1470 | 1467 | ||
1471 | struct host_command cmd = { | 1468 | struct host_command cmd = { |
1472 | .host_command = HOST_PRE_POWER_DOWN, | 1469 | .host_command = HOST_PRE_POWER_DOWN, |
@@ -1520,10 +1517,8 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) | |||
1520 | printk(KERN_WARNING DRV_NAME ": " | 1517 | printk(KERN_WARNING DRV_NAME ": " |
1521 | "%s: Power down command failed: Error %d\n", | 1518 | "%s: Power down command failed: Error %d\n", |
1522 | priv->net_dev->name, err); | 1519 | priv->net_dev->name, err); |
1523 | else { | 1520 | else |
1524 | set_current_state(TASK_UNINTERRUPTIBLE); | 1521 | schedule_timeout_uninterruptible(HW_POWER_DOWN_DELAY); |
1525 | schedule_timeout(HW_POWER_DOWN_DELAY); | ||
1526 | } | ||
1527 | } | 1522 | } |
1528 | 1523 | ||
1529 | priv->status &= ~STATUS_ENABLED; | 1524 | priv->status &= ~STATUS_ENABLED; |
@@ -2953,7 +2948,7 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) | |||
2953 | int next = txq->next; | 2948 | int next = txq->next; |
2954 | int i = 0; | 2949 | int i = 0; |
2955 | struct ipw2100_data_header *ipw_hdr; | 2950 | struct ipw2100_data_header *ipw_hdr; |
2956 | struct ieee80211_hdr *hdr; | 2951 | struct ieee80211_hdr_3addr *hdr; |
2957 | 2952 | ||
2958 | while (!list_empty(&priv->tx_pend_list)) { | 2953 | while (!list_empty(&priv->tx_pend_list)) { |
2959 | /* if there isn't enough space in TBD queue, then | 2954 | /* if there isn't enough space in TBD queue, then |
@@ -2989,7 +2984,7 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) | |||
2989 | packet->index = txq->next; | 2984 | packet->index = txq->next; |
2990 | 2985 | ||
2991 | ipw_hdr = packet->info.d_struct.data; | 2986 | ipw_hdr = packet->info.d_struct.data; |
2992 | hdr = (struct ieee80211_hdr *)packet->info.d_struct.txb-> | 2987 | hdr = (struct ieee80211_hdr_3addr *)packet->info.d_struct.txb-> |
2993 | fragments[0]->data; | 2988 | fragments[0]->data; |
2994 | 2989 | ||
2995 | if (priv->ieee->iw_mode == IW_MODE_INFRA) { | 2990 | if (priv->ieee->iw_mode == IW_MODE_INFRA) { |
@@ -3274,7 +3269,8 @@ static irqreturn_t ipw2100_interrupt(int irq, void *data, | |||
3274 | return IRQ_NONE; | 3269 | return IRQ_NONE; |
3275 | } | 3270 | } |
3276 | 3271 | ||
3277 | static int ipw2100_tx(struct ieee80211_txb *txb, struct net_device *dev) | 3272 | static int ipw2100_tx(struct ieee80211_txb *txb, struct net_device *dev, |
3273 | int pri) | ||
3278 | { | 3274 | { |
3279 | struct ipw2100_priv *priv = ieee80211_priv(dev); | 3275 | struct ipw2100_priv *priv = ieee80211_priv(dev); |
3280 | struct list_head *element; | 3276 | struct list_head *element; |
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h index 2a3cdbd50168..c9e99ce15d66 100644 --- a/drivers/net/wireless/ipw2100.h +++ b/drivers/net/wireless/ipw2100.h | |||
@@ -808,7 +808,7 @@ struct ipw2100_priv { | |||
808 | struct ipw2100_rx { | 808 | struct ipw2100_rx { |
809 | union { | 809 | union { |
810 | unsigned char payload[IPW_RX_NIC_BUFFER_LENGTH]; | 810 | unsigned char payload[IPW_RX_NIC_BUFFER_LENGTH]; |
811 | struct ieee80211_hdr header; | 811 | struct ieee80211_hdr_4addr header; |
812 | u32 status; | 812 | u32 status; |
813 | struct ipw2100_notification notification; | 813 | struct ipw2100_notification notification; |
814 | struct ipw2100_cmd_header command; | 814 | struct ipw2100_cmd_header command; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index b7f275c00de3..7ea9bd58f65f 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -4904,7 +4904,7 @@ static void ipw_rx(struct ipw_priv *priv) | |||
4904 | { | 4904 | { |
4905 | struct ipw_rx_mem_buffer *rxb; | 4905 | struct ipw_rx_mem_buffer *rxb; |
4906 | struct ipw_rx_packet *pkt; | 4906 | struct ipw_rx_packet *pkt; |
4907 | struct ieee80211_hdr *header; | 4907 | struct ieee80211_hdr_4addr *header; |
4908 | u32 r, w, i; | 4908 | u32 r, w, i; |
4909 | u8 network_packet; | 4909 | u8 network_packet; |
4910 | 4910 | ||
@@ -4967,8 +4967,9 @@ static void ipw_rx(struct ipw_priv *priv) | |||
4967 | #endif | 4967 | #endif |
4968 | 4968 | ||
4969 | header = | 4969 | header = |
4970 | (struct ieee80211_hdr *)(rxb->skb->data + | 4970 | (struct ieee80211_hdr_4addr *)(rxb->skb-> |
4971 | IPW_RX_FRAME_SIZE); | 4971 | data + |
4972 | IPW_RX_FRAME_SIZE); | ||
4972 | /* TODO: Check Ad-Hoc dest/source and make sure | 4973 | /* TODO: Check Ad-Hoc dest/source and make sure |
4973 | * that we are actually parsing these packets | 4974 | * that we are actually parsing these packets |
4974 | * correctly -- we should probably use the | 4975 | * correctly -- we should probably use the |
@@ -6010,12 +6011,12 @@ static int ipw_wx_set_wireless_mode(struct net_device *dev, | |||
6010 | } | 6011 | } |
6011 | 6012 | ||
6012 | if (priv->adapter == IPW_2915ABG) { | 6013 | if (priv->adapter == IPW_2915ABG) { |
6013 | priv->ieee->abg_ture = 1; | 6014 | priv->ieee->abg_true = 1; |
6014 | if (mode & IEEE_A) { | 6015 | if (mode & IEEE_A) { |
6015 | band |= IEEE80211_52GHZ_BAND; | 6016 | band |= IEEE80211_52GHZ_BAND; |
6016 | modulation |= IEEE80211_OFDM_MODULATION; | 6017 | modulation |= IEEE80211_OFDM_MODULATION; |
6017 | } else | 6018 | } else |
6018 | priv->ieee->abg_ture = 0; | 6019 | priv->ieee->abg_true = 0; |
6019 | } else { | 6020 | } else { |
6020 | if (mode & IEEE_A) { | 6021 | if (mode & IEEE_A) { |
6021 | IPW_WARNING("Attempt to set 2200BG into " | 6022 | IPW_WARNING("Attempt to set 2200BG into " |
@@ -6023,20 +6024,20 @@ static int ipw_wx_set_wireless_mode(struct net_device *dev, | |||
6023 | return -EINVAL; | 6024 | return -EINVAL; |
6024 | } | 6025 | } |
6025 | 6026 | ||
6026 | priv->ieee->abg_ture = 0; | 6027 | priv->ieee->abg_true = 0; |
6027 | } | 6028 | } |
6028 | 6029 | ||
6029 | if (mode & IEEE_B) { | 6030 | if (mode & IEEE_B) { |
6030 | band |= IEEE80211_24GHZ_BAND; | 6031 | band |= IEEE80211_24GHZ_BAND; |
6031 | modulation |= IEEE80211_CCK_MODULATION; | 6032 | modulation |= IEEE80211_CCK_MODULATION; |
6032 | } else | 6033 | } else |
6033 | priv->ieee->abg_ture = 0; | 6034 | priv->ieee->abg_true = 0; |
6034 | 6035 | ||
6035 | if (mode & IEEE_G) { | 6036 | if (mode & IEEE_G) { |
6036 | band |= IEEE80211_24GHZ_BAND; | 6037 | band |= IEEE80211_24GHZ_BAND; |
6037 | modulation |= IEEE80211_OFDM_MODULATION; | 6038 | modulation |= IEEE80211_OFDM_MODULATION; |
6038 | } else | 6039 | } else |
6039 | priv->ieee->abg_ture = 0; | 6040 | priv->ieee->abg_true = 0; |
6040 | 6041 | ||
6041 | priv->ieee->mode = mode; | 6042 | priv->ieee->mode = mode; |
6042 | priv->ieee->freq_band = band; | 6043 | priv->ieee->freq_band = band; |
@@ -6325,7 +6326,7 @@ we need to heavily modify the ieee80211_skb_to_txb. | |||
6325 | 6326 | ||
6326 | static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) | 6327 | static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) |
6327 | { | 6328 | { |
6328 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) | 6329 | struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *) |
6329 | txb->fragments[0]->data; | 6330 | txb->fragments[0]->data; |
6330 | int i = 0; | 6331 | int i = 0; |
6331 | struct tfd_frame *tfd; | 6332 | struct tfd_frame *tfd; |
@@ -6448,7 +6449,7 @@ static inline void ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb) | |||
6448 | } | 6449 | } |
6449 | 6450 | ||
6450 | static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, | 6451 | static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, |
6451 | struct net_device *dev) | 6452 | struct net_device *dev, int pri) |
6452 | { | 6453 | { |
6453 | struct ipw_priv *priv = ieee80211_priv(dev); | 6454 | struct ipw_priv *priv = ieee80211_priv(dev); |
6454 | unsigned long flags; | 6455 | unsigned long flags; |
@@ -7108,7 +7109,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
7108 | printk(KERN_INFO DRV_NAME | 7109 | printk(KERN_INFO DRV_NAME |
7109 | ": Detected Intel PRO/Wireless 2915ABG Network " | 7110 | ": Detected Intel PRO/Wireless 2915ABG Network " |
7110 | "Connection\n"); | 7111 | "Connection\n"); |
7111 | priv->ieee->abg_ture = 1; | 7112 | priv->ieee->abg_true = 1; |
7112 | band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND; | 7113 | band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND; |
7113 | modulation = IEEE80211_OFDM_MODULATION | | 7114 | modulation = IEEE80211_OFDM_MODULATION | |
7114 | IEEE80211_CCK_MODULATION; | 7115 | IEEE80211_CCK_MODULATION; |
@@ -7124,7 +7125,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
7124 | ": Detected Intel PRO/Wireless 2200BG Network " | 7125 | ": Detected Intel PRO/Wireless 2200BG Network " |
7125 | "Connection\n"); | 7126 | "Connection\n"); |
7126 | 7127 | ||
7127 | priv->ieee->abg_ture = 0; | 7128 | priv->ieee->abg_true = 0; |
7128 | band = IEEE80211_24GHZ_BAND; | 7129 | band = IEEE80211_24GHZ_BAND; |
7129 | modulation = IEEE80211_OFDM_MODULATION | | 7130 | modulation = IEEE80211_OFDM_MODULATION | |
7130 | IEEE80211_CCK_MODULATION; | 7131 | IEEE80211_CCK_MODULATION; |
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 5b00882133f9..e9cf32bf3e31 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -1654,12 +1654,12 @@ static const long ipw_frequencies[] = { | |||
1654 | 1654 | ||
1655 | #define IPW_MAX_CONFIG_RETRIES 10 | 1655 | #define IPW_MAX_CONFIG_RETRIES 10 |
1656 | 1656 | ||
1657 | static inline u32 frame_hdr_len(struct ieee80211_hdr *hdr) | 1657 | static inline u32 frame_hdr_len(struct ieee80211_hdr_4addr *hdr) |
1658 | { | 1658 | { |
1659 | u32 retval; | 1659 | u32 retval; |
1660 | u16 fc; | 1660 | u16 fc; |
1661 | 1661 | ||
1662 | retval = sizeof(struct ieee80211_hdr); | 1662 | retval = sizeof(struct ieee80211_hdr_3addr); |
1663 | fc = le16_to_cpu(hdr->frame_ctl); | 1663 | fc = le16_to_cpu(hdr->frame_ctl); |
1664 | 1664 | ||
1665 | /* | 1665 | /* |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 8de49fe57233..fc2fa4dc3a08 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -94,8 +94,6 @@ | |||
94 | #include <net/iw_handler.h> | 94 | #include <net/iw_handler.h> |
95 | #include <net/ieee80211.h> | 95 | #include <net/ieee80211.h> |
96 | 96 | ||
97 | #include <net/ieee80211.h> | ||
98 | |||
99 | #include <asm/uaccess.h> | 97 | #include <asm/uaccess.h> |
100 | #include <asm/io.h> | 98 | #include <asm/io.h> |
101 | #include <asm/system.h> | 99 | #include <asm/system.h> |
@@ -137,7 +135,7 @@ MODULE_PARM_DESC(force_monitor, "Allow monitor mode for all firmware versions"); | |||
137 | 135 | ||
138 | /* We do this this way to avoid ifdefs in the actual code */ | 136 | /* We do this this way to avoid ifdefs in the actual code */ |
139 | #ifdef WIRELESS_SPY | 137 | #ifdef WIRELESS_SPY |
140 | #define SPY_NUMBER(priv) (priv->spy_number) | 138 | #define SPY_NUMBER(priv) (priv->spy_data.spy_number) |
141 | #else | 139 | #else |
142 | #define SPY_NUMBER(priv) 0 | 140 | #define SPY_NUMBER(priv) 0 |
143 | #endif /* WIRELESS_SPY */ | 141 | #endif /* WIRELESS_SPY */ |
@@ -396,10 +394,10 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev) | |||
396 | /* If a spy address is defined, we report stats of the | 394 | /* If a spy address is defined, we report stats of the |
397 | * first spy address - Jean II */ | 395 | * first spy address - Jean II */ |
398 | if (SPY_NUMBER(priv)) { | 396 | if (SPY_NUMBER(priv)) { |
399 | wstats->qual.qual = priv->spy_stat[0].qual; | 397 | wstats->qual.qual = priv->spy_data.spy_stat[0].qual; |
400 | wstats->qual.level = priv->spy_stat[0].level; | 398 | wstats->qual.level = priv->spy_data.spy_stat[0].level; |
401 | wstats->qual.noise = priv->spy_stat[0].noise; | 399 | wstats->qual.noise = priv->spy_data.spy_stat[0].noise; |
402 | wstats->qual.updated = priv->spy_stat[0].updated; | 400 | wstats->qual.updated = priv->spy_data.spy_stat[0].updated; |
403 | } | 401 | } |
404 | } else { | 402 | } else { |
405 | struct { | 403 | struct { |
@@ -638,7 +636,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) | |||
638 | /* Read the frame header */ | 636 | /* Read the frame header */ |
639 | err = hermes_bap_pread(hw, IRQ_BAP, &hdr, | 637 | err = hermes_bap_pread(hw, IRQ_BAP, &hdr, |
640 | sizeof(struct hermes_tx_descriptor) + | 638 | sizeof(struct hermes_tx_descriptor) + |
641 | sizeof(struct ieee80211_hdr), | 639 | sizeof(struct ieee80211_hdr_4addr), |
642 | fid, 0); | 640 | fid, 0); |
643 | 641 | ||
644 | hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); | 642 | hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); |
@@ -718,18 +716,13 @@ static inline int is_ethersnap(void *_hdr) | |||
718 | static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, | 716 | static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, |
719 | int level, int noise) | 717 | int level, int noise) |
720 | { | 718 | { |
721 | struct orinoco_private *priv = netdev_priv(dev); | 719 | struct iw_quality wstats; |
722 | int i; | 720 | wstats.level = level - 0x95; |
723 | 721 | wstats.noise = noise - 0x95; | |
724 | /* Gather wireless spy statistics: for each packet, compare the | 722 | wstats.qual = (level > noise) ? (level - noise) : 0; |
725 | * source address with out list, and if match, get the stats... */ | 723 | wstats.updated = 7; |
726 | for (i = 0; i < priv->spy_number; i++) | 724 | /* Update spy records */ |
727 | if (!memcmp(mac, priv->spy_address[i], ETH_ALEN)) { | 725 | wireless_spy_update(dev, mac, &wstats); |
728 | priv->spy_stat[i].level = level - 0x95; | ||
729 | priv->spy_stat[i].noise = noise - 0x95; | ||
730 | priv->spy_stat[i].qual = (level > noise) ? (level - noise) : 0; | ||
731 | priv->spy_stat[i].updated = 7; | ||
732 | } | ||
733 | } | 726 | } |
734 | 727 | ||
735 | static void orinoco_stat_gather(struct net_device *dev, | 728 | static void orinoco_stat_gather(struct net_device *dev, |
@@ -2458,8 +2451,11 @@ struct net_device *alloc_orinocodev(int sizeof_card, | |||
2458 | dev->watchdog_timeo = HZ; /* 1 second timeout */ | 2451 | dev->watchdog_timeo = HZ; /* 1 second timeout */ |
2459 | dev->get_stats = orinoco_get_stats; | 2452 | dev->get_stats = orinoco_get_stats; |
2460 | dev->ethtool_ops = &orinoco_ethtool_ops; | 2453 | dev->ethtool_ops = &orinoco_ethtool_ops; |
2461 | dev->get_wireless_stats = orinoco_get_wireless_stats; | ||
2462 | dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def; | 2454 | dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def; |
2455 | #ifdef WIRELESS_SPY | ||
2456 | priv->wireless_data.spy_data = &priv->spy_data; | ||
2457 | dev->wireless_data = &priv->wireless_data; | ||
2458 | #endif | ||
2463 | dev->change_mtu = orinoco_change_mtu; | 2459 | dev->change_mtu = orinoco_change_mtu; |
2464 | dev->set_multicast_list = orinoco_set_multicast_list; | 2460 | dev->set_multicast_list = orinoco_set_multicast_list; |
2465 | /* we use the default eth_mac_addr for setting the MAC addr */ | 2461 | /* we use the default eth_mac_addr for setting the MAC addr */ |
@@ -2831,7 +2827,7 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, | |||
2831 | } | 2827 | } |
2832 | } | 2828 | } |
2833 | 2829 | ||
2834 | if ((priv->iw_mode == IW_MODE_ADHOC) && (priv->spy_number == 0)){ | 2830 | if ((priv->iw_mode == IW_MODE_ADHOC) && (!SPY_NUMBER(priv))){ |
2835 | /* Quality stats meaningless in ad-hoc mode */ | 2831 | /* Quality stats meaningless in ad-hoc mode */ |
2836 | } else { | 2832 | } else { |
2837 | range->max_qual.qual = 0x8b - 0x2f; | 2833 | range->max_qual.qual = 0x8b - 0x2f; |
@@ -2878,6 +2874,14 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, | |||
2878 | range->min_r_time = 0; | 2874 | range->min_r_time = 0; |
2879 | range->max_r_time = 65535 * 1000; /* ??? */ | 2875 | range->max_r_time = 65535 * 1000; /* ??? */ |
2880 | 2876 | ||
2877 | /* Event capability (kernel) */ | ||
2878 | IW_EVENT_CAPA_SET_KERNEL(range->event_capa); | ||
2879 | /* Event capability (driver) */ | ||
2880 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY); | ||
2881 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); | ||
2882 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); | ||
2883 | IW_EVENT_CAPA_SET(range->event_capa, IWEVTXDROP); | ||
2884 | |||
2881 | TRACE_EXIT(dev->name); | 2885 | TRACE_EXIT(dev->name); |
2882 | 2886 | ||
2883 | return 0; | 2887 | return 0; |
@@ -3837,92 +3841,6 @@ static int orinoco_ioctl_getrid(struct net_device *dev, | |||
3837 | return err; | 3841 | return err; |
3838 | } | 3842 | } |
3839 | 3843 | ||
3840 | /* Spy is used for link quality/strength measurements in Ad-Hoc mode | ||
3841 | * Jean II */ | ||
3842 | static int orinoco_ioctl_setspy(struct net_device *dev, | ||
3843 | struct iw_request_info *info, | ||
3844 | struct iw_point *srq, | ||
3845 | char *extra) | ||
3846 | |||
3847 | { | ||
3848 | struct orinoco_private *priv = netdev_priv(dev); | ||
3849 | struct sockaddr *address = (struct sockaddr *) extra; | ||
3850 | int number = srq->length; | ||
3851 | int i; | ||
3852 | unsigned long flags; | ||
3853 | |||
3854 | /* Make sure nobody mess with the structure while we do */ | ||
3855 | if (orinoco_lock(priv, &flags) != 0) | ||
3856 | return -EBUSY; | ||
3857 | |||
3858 | /* orinoco_lock() doesn't disable interrupts, so make sure the | ||
3859 | * interrupt rx path don't get confused while we copy */ | ||
3860 | priv->spy_number = 0; | ||
3861 | |||
3862 | if (number > 0) { | ||
3863 | /* Extract the addresses */ | ||
3864 | for (i = 0; i < number; i++) | ||
3865 | memcpy(priv->spy_address[i], address[i].sa_data, | ||
3866 | ETH_ALEN); | ||
3867 | /* Reset stats */ | ||
3868 | memset(priv->spy_stat, 0, | ||
3869 | sizeof(struct iw_quality) * IW_MAX_SPY); | ||
3870 | /* Set number of addresses */ | ||
3871 | priv->spy_number = number; | ||
3872 | } | ||
3873 | |||
3874 | /* Now, let the others play */ | ||
3875 | orinoco_unlock(priv, &flags); | ||
3876 | |||
3877 | /* Do NOT call commit handler */ | ||
3878 | return 0; | ||
3879 | } | ||
3880 | |||
3881 | static int orinoco_ioctl_getspy(struct net_device *dev, | ||
3882 | struct iw_request_info *info, | ||
3883 | struct iw_point *srq, | ||
3884 | char *extra) | ||
3885 | { | ||
3886 | struct orinoco_private *priv = netdev_priv(dev); | ||
3887 | struct sockaddr *address = (struct sockaddr *) extra; | ||
3888 | int number; | ||
3889 | int i; | ||
3890 | unsigned long flags; | ||
3891 | |||
3892 | if (orinoco_lock(priv, &flags) != 0) | ||
3893 | return -EBUSY; | ||
3894 | |||
3895 | number = priv->spy_number; | ||
3896 | /* Create address struct */ | ||
3897 | for (i = 0; i < number; i++) { | ||
3898 | memcpy(address[i].sa_data, priv->spy_address[i], ETH_ALEN); | ||
3899 | address[i].sa_family = AF_UNIX; | ||
3900 | } | ||
3901 | if (number > 0) { | ||
3902 | /* Create address struct */ | ||
3903 | for (i = 0; i < number; i++) { | ||
3904 | memcpy(address[i].sa_data, priv->spy_address[i], | ||
3905 | ETH_ALEN); | ||
3906 | address[i].sa_family = AF_UNIX; | ||
3907 | } | ||
3908 | /* Copy stats */ | ||
3909 | /* In theory, we should disable irqs while copying the stats | ||
3910 | * because the rx path might update it in the middle... | ||
3911 | * Bah, who care ? - Jean II */ | ||
3912 | memcpy(extra + (sizeof(struct sockaddr) * number), | ||
3913 | priv->spy_stat, sizeof(struct iw_quality) * number); | ||
3914 | } | ||
3915 | /* Reset updated flags. */ | ||
3916 | for (i = 0; i < number; i++) | ||
3917 | priv->spy_stat[i].updated = 0; | ||
3918 | |||
3919 | orinoco_unlock(priv, &flags); | ||
3920 | |||
3921 | srq->length = number; | ||
3922 | |||
3923 | return 0; | ||
3924 | } | ||
3925 | |||
3926 | /* Trigger a scan (look for other cells in the vicinity */ | 3844 | /* Trigger a scan (look for other cells in the vicinity */ |
3927 | static int orinoco_ioctl_setscan(struct net_device *dev, | 3845 | static int orinoco_ioctl_setscan(struct net_device *dev, |
3928 | struct iw_request_info *info, | 3846 | struct iw_request_info *info, |
@@ -4353,8 +4271,10 @@ static const iw_handler orinoco_handler[] = { | |||
4353 | [SIOCSIWSENS -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setsens, | 4271 | [SIOCSIWSENS -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setsens, |
4354 | [SIOCGIWSENS -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getsens, | 4272 | [SIOCGIWSENS -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getsens, |
4355 | [SIOCGIWRANGE -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getiwrange, | 4273 | [SIOCGIWRANGE -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getiwrange, |
4356 | [SIOCSIWSPY -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setspy, | 4274 | [SIOCSIWSPY -SIOCIWFIRST] = (iw_handler) iw_handler_set_spy, |
4357 | [SIOCGIWSPY -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getspy, | 4275 | [SIOCGIWSPY -SIOCIWFIRST] = (iw_handler) iw_handler_get_spy, |
4276 | [SIOCSIWTHRSPY-SIOCIWFIRST] = (iw_handler) iw_handler_set_thrspy, | ||
4277 | [SIOCGIWTHRSPY-SIOCIWFIRST] = (iw_handler) iw_handler_get_thrspy, | ||
4358 | [SIOCSIWAP -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setwap, | 4278 | [SIOCSIWAP -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setwap, |
4359 | [SIOCGIWAP -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getwap, | 4279 | [SIOCGIWAP -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_getwap, |
4360 | [SIOCSIWSCAN -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setscan, | 4280 | [SIOCSIWSCAN -SIOCIWFIRST] = (iw_handler) orinoco_ioctl_setscan, |
@@ -4399,6 +4319,7 @@ static const struct iw_handler_def orinoco_handler_def = { | |||
4399 | .standard = orinoco_handler, | 4319 | .standard = orinoco_handler, |
4400 | .private = orinoco_private_handler, | 4320 | .private = orinoco_private_handler, |
4401 | .private_args = orinoco_privtab, | 4321 | .private_args = orinoco_privtab, |
4322 | .get_wireless_stats = orinoco_get_wireless_stats, | ||
4402 | }; | 4323 | }; |
4403 | 4324 | ||
4404 | static void orinoco_get_drvinfo(struct net_device *dev, | 4325 | static void orinoco_get_drvinfo(struct net_device *dev, |
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h index 2f213a7103fe..c800563034a7 100644 --- a/drivers/net/wireless/orinoco.h +++ b/drivers/net/wireless/orinoco.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/wireless.h> | 15 | #include <linux/wireless.h> |
16 | #include <net/iw_handler.h> | ||
16 | #include <linux/version.h> | 17 | #include <linux/version.h> |
17 | 18 | ||
18 | #include "hermes.h" | 19 | #include "hermes.h" |
@@ -112,9 +113,8 @@ struct orinoco_private { | |||
112 | u16 pm_on, pm_mcast, pm_period, pm_timeout; | 113 | u16 pm_on, pm_mcast, pm_period, pm_timeout; |
113 | u16 preamble; | 114 | u16 preamble; |
114 | #ifdef WIRELESS_SPY | 115 | #ifdef WIRELESS_SPY |
115 | int spy_number; | 116 | struct iw_spy_data spy_data; /* iwspy support */ |
116 | u_char spy_address[IW_MAX_SPY][ETH_ALEN]; | 117 | struct iw_public_data wireless_data; |
117 | struct iw_quality spy_stat[IW_MAX_SPY]; | ||
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | /* Configuration dependent variables */ | 120 | /* Configuration dependent variables */ |
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index bedd7f9f23e4..80920b1c6fcf 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -14,9 +14,6 @@ | |||
14 | #define PFX DRIVER_NAME ": " | 14 | #define PFX DRIVER_NAME ": " |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #ifdef __IN_PCMCIA_PACKAGE__ | ||
18 | #include <pcmcia/k_compat.h> | ||
19 | #endif /* __IN_PCMCIA_PACKAGE__ */ | ||
20 | 17 | ||
21 | #include <linux/module.h> | 18 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
@@ -603,49 +600,85 @@ static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION | |||
603 | "Pavel Roskin <proski@gnu.org>, et al)"; | 600 | "Pavel Roskin <proski@gnu.org>, et al)"; |
604 | 601 | ||
605 | static struct pcmcia_device_id orinoco_cs_ids[] = { | 602 | static struct pcmcia_device_id orinoco_cs_ids[] = { |
606 | PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300), | 603 | PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100), /* SonicWALL Long Range Wireless Card */ |
607 | PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002), | 604 | PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300), /* Sohoware NCP110, Philips 802.11b */ |
608 | PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), | 605 | PCMCIA_DEVICE_MANF_CARD(0x0089, 0x0002), /* AnyPoint(TM) Wireless II PC Card */ |
609 | PCMCIA_DEVICE_MANF_CARD(0x01eb, 0x080a), | 606 | PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */ |
610 | PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), | 607 | PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000), /* PROXIM RangeLAN-DS/LAN PC CARD */ |
611 | PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001), | 608 | PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002), /* Compaq WL100 11 Mbps Wireless Adapter */ |
612 | PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305), | 609 | PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */ |
613 | PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613), | 610 | PCMCIA_DEVICE_MANF_CARD(0x016b, 0x0001), /* Ericsson WLAN Card C11 */ |
614 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002), | 611 | PCMCIA_DEVICE_MANF_CARD(0x01eb, 0x080a), /* Nortel Networks eMobility 802.11 Wireless Adapter */ |
615 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), | 612 | PCMCIA_DEVICE_MANF_CARD(0x01ff, 0x0008), /* Intermec MobileLAN 11Mbps 802.11b WLAN Card */ |
616 | PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), | 613 | PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002), /* Samsung SWL2000-N 11Mb/s WLAN Card */ |
617 | PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), | 614 | PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), /* AirWay 802.11 Adapter (PCMCIA) */ |
618 | PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), | 615 | PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001), /* ARtem Onair */ |
619 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), | 616 | PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305), /* Buffalo WLI-PCM-S11 */ |
620 | PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), | 617 | PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612), /* Linksys WPC11 Version 2.5 */ |
621 | PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002), | 618 | PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613), /* Linksys WPC11 Version 3 */ |
622 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), | 619 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002), /* Compaq HNW-100 11 Mbps Wireless Adapter */ |
623 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), | 620 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */ |
621 | PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */ | ||
622 | PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */ | ||
623 | PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */ | ||
624 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */ | ||
625 | PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */ | ||
626 | PCMCIA_DEVICE_MANF_CARD(0xc001, 0x0008), /* CONTEC FLEXSCAN/FX-DDS110-PCC */ | ||
627 | PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002), /* Conceptronic CON11Cpro, EMTAC A2424i */ | ||
628 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), /* Safeway 802.11b, ZCOMAX AirRunner/XI-300 */ | ||
629 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), /* D-Link DCF660, Sandisk Connect SDWCFB-000 */ | ||
630 | PCMCIA_DEVICE_PROD_ID12(" ", "IEEE 802.11 Wireless LAN/PC Card", 0x3b6e20c8, 0xefccafe9), | ||
624 | PCMCIA_DEVICE_PROD_ID12("3Com", "3CRWE737A AirConnect Wireless LAN PC Card", 0x41240e5b, 0x56010af3), | 631 | PCMCIA_DEVICE_PROD_ID12("3Com", "3CRWE737A AirConnect Wireless LAN PC Card", 0x41240e5b, 0x56010af3), |
625 | PCMCIA_DEVICE_PROD_ID123("Instant Wireless ", " Network PC CARD", "Version 01.02", 0x11d901af, 0x6e9bd926, 0x4b74baa0), | ||
626 | PCMCIA_DEVICE_PROD_ID12("ACTIONTEC", "PRISM Wireless LAN PC Card", 0x393089da, 0xa71e69d5), | 632 | PCMCIA_DEVICE_PROD_ID12("ACTIONTEC", "PRISM Wireless LAN PC Card", 0x393089da, 0xa71e69d5), |
633 | PCMCIA_DEVICE_PROD_ID12("Addtron", "AWP-100 Wireless PCMCIA", 0xe6ec52ce, 0x08649af2), | ||
634 | PCMCIA_DEVICE_PROD_ID123("AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863", 0xea569531, 0x4bcb9645, 0x355cb092), | ||
635 | PCMCIA_DEVICE_PROD_ID12("Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", 0x5cd01705, 0x4271660f), | ||
636 | PCMCIA_DEVICE_PROD_ID12("ASUS", "802_11b_PC_CARD_25", 0x78fc06ee, 0xdb9aa842), | ||
637 | PCMCIA_DEVICE_PROD_ID12("ASUS", "802_11B_CF_CARD_25", 0x78fc06ee, 0x45a50c1e), | ||
627 | PCMCIA_DEVICE_PROD_ID12("Avaya Communication", "Avaya Wireless PC Card", 0xd8a43b78, 0x0d341169), | 638 | PCMCIA_DEVICE_PROD_ID12("Avaya Communication", "Avaya Wireless PC Card", 0xd8a43b78, 0x0d341169), |
639 | PCMCIA_DEVICE_PROD_ID12("BENQ", "AWL100 PCMCIA ADAPTER", 0x35dadc74, 0x01f7fedb), | ||
628 | PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-PCM-L11G", 0x2decece3, 0xf57ca4b3), | 640 | PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-PCM-L11G", 0x2decece3, 0xf57ca4b3), |
641 | PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G", 0x2decece3, 0x82067c18), | ||
629 | PCMCIA_DEVICE_PROD_ID12("Cabletron", "RoamAbout 802.11 DS", 0x32d445f5, 0xedeffd90), | 642 | PCMCIA_DEVICE_PROD_ID12("Cabletron", "RoamAbout 802.11 DS", 0x32d445f5, 0xedeffd90), |
643 | PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card", 0x54f7c49c, 0x15a75e5b), | ||
644 | PCMCIA_DEVICE_PROD_ID123("corega", "WL PCCL-11", "ISL37300P", 0x0a21501a, 0x59868926, 0xc9049a39), | ||
630 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCC-11", 0x5261440f, 0xa6405584), | 645 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCC-11", 0x5261440f, 0xa6405584), |
631 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCCA-11", 0x5261440f, 0xdf6115f9), | 646 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCCA-11", 0x5261440f, 0xdf6115f9), |
632 | PCMCIA_DEVICE_PROD_ID12("corega_K.K.", "Wireless_LAN_PCCB-11", 0x29e33311, 0xee7a27ae), | 647 | PCMCIA_DEVICE_PROD_ID12("corega_K.K.", "Wireless_LAN_PCCB-11", 0x29e33311, 0xee7a27ae), |
633 | PCMCIA_DEVICE_PROD_ID12("D", "Link DRC-650 11Mbps WLAN Card", 0x71b18589, 0xf144e3ac), | 648 | PCMCIA_DEVICE_PROD_ID12("D", "Link DRC-650 11Mbps WLAN Card", 0x71b18589, 0xf144e3ac), |
634 | PCMCIA_DEVICE_PROD_ID12("D", "Link DWL-650 11Mbps WLAN Card", 0x71b18589, 0xb6f1b0ab), | 649 | PCMCIA_DEVICE_PROD_ID12("D", "Link DWL-650 11Mbps WLAN Card", 0x71b18589, 0xb6f1b0ab), |
650 | PCMCIA_DEVICE_PROD_ID12("D-Link Corporation", "D-Link DWL-650H 11Mbps WLAN Adapter", 0xef544d24, 0xcd8ea916), | ||
651 | PCMCIA_DEVICE_PROD_ID12("Digital Data Communications", "WPC-0100", 0xfdd73470, 0xe0b6f146), | ||
635 | PCMCIA_DEVICE_PROD_ID12("ELSA", "AirLancer MC-11", 0x4507a33a, 0xef54f0e3), | 652 | PCMCIA_DEVICE_PROD_ID12("ELSA", "AirLancer MC-11", 0x4507a33a, 0xef54f0e3), |
636 | PCMCIA_DEVICE_PROD_ID12("HyperLink", "Wireless PC Card 11Mbps", 0x56cc3f1a, 0x0bcf220c), | 653 | PCMCIA_DEVICE_PROD_ID12("HyperLink", "Wireless PC Card 11Mbps", 0x56cc3f1a, 0x0bcf220c), |
654 | PCMCIA_DEVICE_PROD_ID123("Instant Wireless ", " Network PC CARD", "Version 01.02", 0x11d901af, 0x6e9bd926, 0x4b74baa0), | ||
655 | PCMCIA_DEVICE_PROD_ID12("Intel", "PRO/Wireless 2011 LAN PC Card", 0x816cc815, 0x07f58077), | ||
637 | PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE", 0x74c5e40d, 0xdb472a18), | 656 | PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE", 0x74c5e40d, 0xdb472a18), |
657 | PCMCIA_DEVICE_PROD_ID12("INTERSIL", "I-GATE 11M PC Card / PC Card plus", 0x74c5e40d, 0x8304ff77), | ||
658 | PCMCIA_DEVICE_PROD_ID12("Intersil", "PRISM 2_5 PCMCIA ADAPTER", 0x4b801a17, 0x6345a0bf), | ||
659 | PCMCIA_DEVICE_PROD_ID123("Intersil", "PRISM Freedom PCMCIA Adapter", "ISL37100P", 0x4b801a17, 0xf222ec2d, 0x630d52b2), | ||
660 | PCMCIA_DEVICE_PROD_ID12("LeArtery", "SYNCBYAIR 11Mbps Wireless LAN PC Card", 0x7e3b326a, 0x49893e92), | ||
661 | PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card", 0x0733cc81, 0x0c52f395), | ||
638 | PCMCIA_DEVICE_PROD_ID12("Lucent Technologies", "WaveLAN/IEEE", 0x23eb9949, 0xc562e72a), | 662 | PCMCIA_DEVICE_PROD_ID12("Lucent Technologies", "WaveLAN/IEEE", 0x23eb9949, 0xc562e72a), |
639 | PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11", 0x481e0094, 0x7360e410), | 663 | PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11", 0x481e0094, 0x7360e410), |
640 | PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11G", 0x481e0094, 0xf57ca4b3), | 664 | PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11G", 0x481e0094, 0xf57ca4b3), |
641 | PCMCIA_DEVICE_PROD_ID12("Microsoft", "Wireless Notebook Adapter MN-520", 0x5961bf85, 0x6eec8c01), | 665 | PCMCIA_DEVICE_PROD_ID12("Microsoft", "Wireless Notebook Adapter MN-520", 0x5961bf85, 0x6eec8c01), |
642 | PCMCIA_DEVICE_PROD_ID12("NCR", "WaveLAN/IEEE", 0x24358cd4, 0xc562e72a), | 666 | PCMCIA_DEVICE_PROD_ID12("NCR", "WaveLAN/IEEE", 0x24358cd4, 0xc562e72a), |
667 | PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401 Wireless PC", "Card", 0xa37434e9, 0x9762e8f1), | ||
643 | PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401RA Wireless PC", "Card", 0x0306467f, 0x9762e8f1), | 668 | PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401RA Wireless PC", "Card", 0x0306467f, 0x9762e8f1), |
669 | PCMCIA_DEVICE_PROD_ID12("Nortel Networks", "emobility 802.11 Wireless LAN PC Card", 0x2d617ea0, 0x88cd5767), | ||
670 | PCMCIA_DEVICE_PROD_ID12("OEM", "PRISM2 IEEE 802.11 PC-Card", 0xfea54c90, 0x48f2bdd6), | ||
671 | PCMCIA_DEVICE_PROD_ID12("OTC", "Wireless AirEZY 2411-PCC WLAN Card", 0x4ac44287, 0x235a6bed), | ||
672 | PCMCIA_DEVICE_PROD_ID123("PCMCIA", "11M WLAN Card v2.5", "ISL37300P", 0x281f1c5d, 0x6e440487, 0xc9049a39), | ||
644 | PCMCIA_DEVICE_PROD_ID12("PLANEX", "GeoWave/GW-CF110", 0x209f40ab, 0xd9715264), | 673 | PCMCIA_DEVICE_PROD_ID12("PLANEX", "GeoWave/GW-CF110", 0x209f40ab, 0xd9715264), |
674 | PCMCIA_DEVICE_PROD_ID12("PLANEX", "GeoWave/GW-NS110", 0x209f40ab, 0x46263178), | ||
645 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9), | 675 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9), |
646 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), | 676 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), |
647 | PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), | 677 | PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), |
648 | PCMCIA_DEVICE_PROD_ID1("Symbol Technologies", 0x3f02b4d6), | 678 | PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a), |
679 | PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e), | ||
680 | PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39), | ||
681 | PCMCIA_DEVICE_PROD_ID12("ZoomAir 11Mbps High", "Rate wireless Networking", 0x273fe3db, 0x32a1eaee), | ||
649 | PCMCIA_DEVICE_NULL, | 682 | PCMCIA_DEVICE_NULL, |
650 | }; | 683 | }; |
651 | MODULE_DEVICE_TABLE(pcmcia, orinoco_cs_ids); | 684 | MODULE_DEVICE_TABLE(pcmcia, orinoco_cs_ids); |
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 6f13d4a8e2d3..10cce514c15d 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -439,8 +439,7 @@ prism54_bring_down(islpci_private *priv) | |||
439 | wmb(); | 439 | wmb(); |
440 | 440 | ||
441 | /* wait a while for the device to reset */ | 441 | /* wait a while for the device to reset */ |
442 | set_current_state(TASK_UNINTERRUPTIBLE); | 442 | schedule_timeout_uninterruptible(msecs_to_jiffies(50)); |
443 | schedule_timeout(50*HZ/1000); | ||
444 | 443 | ||
445 | return 0; | 444 | return 0; |
446 | } | 445 | } |
@@ -491,8 +490,7 @@ islpci_reset_if(islpci_private *priv) | |||
491 | /* The software reset acknowledge needs about 220 msec here. | 490 | /* The software reset acknowledge needs about 220 msec here. |
492 | * Be conservative and wait for up to one second. */ | 491 | * Be conservative and wait for up to one second. */ |
493 | 492 | ||
494 | set_current_state(TASK_UNINTERRUPTIBLE); | 493 | remaining = schedule_timeout_uninterruptible(HZ); |
495 | remaining = schedule_timeout(HZ); | ||
496 | 494 | ||
497 | if(remaining > 0) { | 495 | if(remaining > 0) { |
498 | result = 0; | 496 | result = 0; |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index b6f2e5a223be..4937a5ad4b2c 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -455,7 +455,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
455 | struct islpci_mgmtframe **recvframe) | 455 | struct islpci_mgmtframe **recvframe) |
456 | { | 456 | { |
457 | islpci_private *priv = netdev_priv(ndev); | 457 | islpci_private *priv = netdev_priv(ndev); |
458 | const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; | 458 | const long wait_cycle_jiffies = msecs_to_jiffies(ISL38XX_WAIT_CYCLE * 10); |
459 | long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; | 459 | long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; |
460 | int err; | 460 | int err; |
461 | DEFINE_WAIT(wait); | 461 | DEFINE_WAIT(wait); |
@@ -475,8 +475,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
475 | int timeleft; | 475 | int timeleft; |
476 | struct islpci_mgmtframe *frame; | 476 | struct islpci_mgmtframe *frame; |
477 | 477 | ||
478 | set_current_state(TASK_UNINTERRUPTIBLE); | 478 | timeleft = schedule_timeout_uninterruptible(wait_cycle_jiffies); |
479 | timeleft = schedule_timeout(wait_cycle_jiffies); | ||
480 | frame = xchg(&priv->mgmt_received, NULL); | 479 | frame = xchg(&priv->mgmt_received, NULL); |
481 | if (frame) { | 480 | if (frame) { |
482 | if (frame->header->oid == oid) { | 481 | if (frame->header->oid == oid) { |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index e9c5ea0f5535..70fd6fd8feb9 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -1649,28 +1649,28 @@ static iw_stats * ray_get_wireless_stats(struct net_device * dev) | |||
1649 | */ | 1649 | */ |
1650 | 1650 | ||
1651 | static const iw_handler ray_handler[] = { | 1651 | static const iw_handler ray_handler[] = { |
1652 | [SIOCSIWCOMMIT-SIOCIWFIRST] (iw_handler) ray_commit, | 1652 | [SIOCSIWCOMMIT-SIOCIWFIRST] = (iw_handler) ray_commit, |
1653 | [SIOCGIWNAME -SIOCIWFIRST] (iw_handler) ray_get_name, | 1653 | [SIOCGIWNAME -SIOCIWFIRST] = (iw_handler) ray_get_name, |
1654 | [SIOCSIWFREQ -SIOCIWFIRST] (iw_handler) ray_set_freq, | 1654 | [SIOCSIWFREQ -SIOCIWFIRST] = (iw_handler) ray_set_freq, |
1655 | [SIOCGIWFREQ -SIOCIWFIRST] (iw_handler) ray_get_freq, | 1655 | [SIOCGIWFREQ -SIOCIWFIRST] = (iw_handler) ray_get_freq, |
1656 | [SIOCSIWMODE -SIOCIWFIRST] (iw_handler) ray_set_mode, | 1656 | [SIOCSIWMODE -SIOCIWFIRST] = (iw_handler) ray_set_mode, |
1657 | [SIOCGIWMODE -SIOCIWFIRST] (iw_handler) ray_get_mode, | 1657 | [SIOCGIWMODE -SIOCIWFIRST] = (iw_handler) ray_get_mode, |
1658 | [SIOCGIWRANGE -SIOCIWFIRST] (iw_handler) ray_get_range, | 1658 | [SIOCGIWRANGE -SIOCIWFIRST] = (iw_handler) ray_get_range, |
1659 | #ifdef WIRELESS_SPY | 1659 | #ifdef WIRELESS_SPY |
1660 | [SIOCSIWSPY -SIOCIWFIRST] (iw_handler) iw_handler_set_spy, | 1660 | [SIOCSIWSPY -SIOCIWFIRST] = (iw_handler) iw_handler_set_spy, |
1661 | [SIOCGIWSPY -SIOCIWFIRST] (iw_handler) iw_handler_get_spy, | 1661 | [SIOCGIWSPY -SIOCIWFIRST] = (iw_handler) iw_handler_get_spy, |
1662 | [SIOCSIWTHRSPY-SIOCIWFIRST] (iw_handler) iw_handler_set_thrspy, | 1662 | [SIOCSIWTHRSPY-SIOCIWFIRST] = (iw_handler) iw_handler_set_thrspy, |
1663 | [SIOCGIWTHRSPY-SIOCIWFIRST] (iw_handler) iw_handler_get_thrspy, | 1663 | [SIOCGIWTHRSPY-SIOCIWFIRST] = (iw_handler) iw_handler_get_thrspy, |
1664 | #endif /* WIRELESS_SPY */ | 1664 | #endif /* WIRELESS_SPY */ |
1665 | [SIOCGIWAP -SIOCIWFIRST] (iw_handler) ray_get_wap, | 1665 | [SIOCGIWAP -SIOCIWFIRST] = (iw_handler) ray_get_wap, |
1666 | [SIOCSIWESSID -SIOCIWFIRST] (iw_handler) ray_set_essid, | 1666 | [SIOCSIWESSID -SIOCIWFIRST] = (iw_handler) ray_set_essid, |
1667 | [SIOCGIWESSID -SIOCIWFIRST] (iw_handler) ray_get_essid, | 1667 | [SIOCGIWESSID -SIOCIWFIRST] = (iw_handler) ray_get_essid, |
1668 | [SIOCSIWRATE -SIOCIWFIRST] (iw_handler) ray_set_rate, | 1668 | [SIOCSIWRATE -SIOCIWFIRST] = (iw_handler) ray_set_rate, |
1669 | [SIOCGIWRATE -SIOCIWFIRST] (iw_handler) ray_get_rate, | 1669 | [SIOCGIWRATE -SIOCIWFIRST] = (iw_handler) ray_get_rate, |
1670 | [SIOCSIWRTS -SIOCIWFIRST] (iw_handler) ray_set_rts, | 1670 | [SIOCSIWRTS -SIOCIWFIRST] = (iw_handler) ray_set_rts, |
1671 | [SIOCGIWRTS -SIOCIWFIRST] (iw_handler) ray_get_rts, | 1671 | [SIOCGIWRTS -SIOCIWFIRST] = (iw_handler) ray_get_rts, |
1672 | [SIOCSIWFRAG -SIOCIWFIRST] (iw_handler) ray_set_frag, | 1672 | [SIOCSIWFRAG -SIOCIWFIRST] = (iw_handler) ray_set_frag, |
1673 | [SIOCGIWFRAG -SIOCIWFIRST] (iw_handler) ray_get_frag, | 1673 | [SIOCGIWFRAG -SIOCIWFIRST] = (iw_handler) ray_get_frag, |
1674 | }; | 1674 | }; |
1675 | 1675 | ||
1676 | #define SIOCSIPFRAMING SIOCIWFIRSTPRIV /* Set framing mode */ | 1676 | #define SIOCSIPFRAMING SIOCIWFIRSTPRIV /* Set framing mode */ |
@@ -1678,9 +1678,9 @@ static const iw_handler ray_handler[] = { | |||
1678 | #define SIOCGIPCOUNTRY SIOCIWFIRSTPRIV + 3 /* Get country code */ | 1678 | #define SIOCGIPCOUNTRY SIOCIWFIRSTPRIV + 3 /* Get country code */ |
1679 | 1679 | ||
1680 | static const iw_handler ray_private_handler[] = { | 1680 | static const iw_handler ray_private_handler[] = { |
1681 | [0] (iw_handler) ray_set_framing, | 1681 | [0] = (iw_handler) ray_set_framing, |
1682 | [1] (iw_handler) ray_get_framing, | 1682 | [1] = (iw_handler) ray_get_framing, |
1683 | [3] (iw_handler) ray_get_country, | 1683 | [3] = (iw_handler) ray_get_country, |
1684 | }; | 1684 | }; |
1685 | 1685 | ||
1686 | static const struct iw_priv_args ray_private_args[] = { | 1686 | static const struct iw_priv_args ray_private_args[] = { |
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index 39c6cdf7f3f7..63e00422d1a0 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -22,9 +22,6 @@ | |||
22 | #define PFX DRIVER_NAME ": " | 22 | #define PFX DRIVER_NAME ": " |
23 | 23 | ||
24 | #include <linux/config.h> | 24 | #include <linux/config.h> |
25 | #ifdef __IN_PCMCIA_PACKAGE__ | ||
26 | #include <pcmcia/k_compat.h> | ||
27 | #endif /* __IN_PCMCIA_PACKAGE__ */ | ||
28 | 25 | ||
29 | #include <linux/module.h> | 26 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
@@ -38,6 +35,7 @@ | |||
38 | #include <linux/if_arp.h> | 35 | #include <linux/if_arp.h> |
39 | #include <linux/etherdevice.h> | 36 | #include <linux/etherdevice.h> |
40 | #include <linux/wireless.h> | 37 | #include <linux/wireless.h> |
38 | #include <linux/firmware.h> | ||
41 | 39 | ||
42 | #include <pcmcia/cs_types.h> | 40 | #include <pcmcia/cs_types.h> |
43 | #include <pcmcia/cs.h> | 41 | #include <pcmcia/cs.h> |
@@ -51,29 +49,10 @@ | |||
51 | 49 | ||
52 | #include "orinoco.h" | 50 | #include "orinoco.h" |
53 | 51 | ||
54 | /* | ||
55 | * If SPECTRUM_FW_INCLUDED is defined, the firmware is hardcoded into | ||
56 | * the driver. Use get_symbol_fw script to generate spectrum_fw.h and | ||
57 | * copy it to the same directory as spectrum_cs.c. | ||
58 | * | ||
59 | * If SPECTRUM_FW_INCLUDED is not defined, the firmware is loaded at the | ||
60 | * runtime using hotplug. Use the same get_symbol_fw script to generate | ||
61 | * files symbol_sp24t_prim_fw symbol_sp24t_sec_fw, copy them to the | ||
62 | * hotplug firmware directory (typically /usr/lib/hotplug/firmware) and | ||
63 | * make sure that you have hotplug installed and enabled in the kernel. | ||
64 | */ | ||
65 | /* #define SPECTRUM_FW_INCLUDED 1 */ | ||
66 | |||
67 | #ifdef SPECTRUM_FW_INCLUDED | ||
68 | /* Header with the firmware */ | ||
69 | #include "spectrum_fw.h" | ||
70 | #else /* !SPECTRUM_FW_INCLUDED */ | ||
71 | #include <linux/firmware.h> | ||
72 | static unsigned char *primsym; | 52 | static unsigned char *primsym; |
73 | static unsigned char *secsym; | 53 | static unsigned char *secsym; |
74 | static const char primary_fw_name[] = "symbol_sp24t_prim_fw"; | 54 | static const char primary_fw_name[] = "symbol_sp24t_prim_fw"; |
75 | static const char secondary_fw_name[] = "symbol_sp24t_sec_fw"; | 55 | static const char secondary_fw_name[] = "symbol_sp24t_sec_fw"; |
76 | #endif /* !SPECTRUM_FW_INCLUDED */ | ||
77 | 56 | ||
78 | /********************************************************************/ | 57 | /********************************************************************/ |
79 | /* Module stuff */ | 58 | /* Module stuff */ |
@@ -571,8 +550,6 @@ spectrum_dl_firmware(hermes_t *hw, dev_link_t *link) | |||
571 | { | 550 | { |
572 | int ret; | 551 | int ret; |
573 | client_handle_t handle = link->handle; | 552 | client_handle_t handle = link->handle; |
574 | |||
575 | #ifndef SPECTRUM_FW_INCLUDED | ||
576 | const struct firmware *fw_entry; | 553 | const struct firmware *fw_entry; |
577 | 554 | ||
578 | if (request_firmware(&fw_entry, primary_fw_name, | 555 | if (request_firmware(&fw_entry, primary_fw_name, |
@@ -592,7 +569,6 @@ spectrum_dl_firmware(hermes_t *hw, dev_link_t *link) | |||
592 | secondary_fw_name); | 569 | secondary_fw_name); |
593 | return -ENOENT; | 570 | return -ENOENT; |
594 | } | 571 | } |
595 | #endif | ||
596 | 572 | ||
597 | /* Load primary firmware */ | 573 | /* Load primary firmware */ |
598 | ret = spectrum_dl_image(hw, link, primsym); | 574 | ret = spectrum_dl_image(hw, link, primsym); |
@@ -1085,7 +1061,7 @@ static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION | |||
1085 | static struct pcmcia_device_id spectrum_cs_ids[] = { | 1061 | static struct pcmcia_device_id spectrum_cs_ids[] = { |
1086 | PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4100 */ | 1062 | PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4100 */ |
1087 | PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */ | 1063 | PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */ |
1088 | PCMCIA_DEVICE_MANF_CARD(0x0089, 0x0001), /* Intel PRO/Wireless 2011B */ | 1064 | PCMCIA_DEVICE_PROD_ID12("Intel", "PRO/Wireless LAN PC Card", 0x816cc815, 0x6fbf459a), /* 2011B, not 2011 */ |
1089 | PCMCIA_DEVICE_NULL, | 1065 | PCMCIA_DEVICE_NULL, |
1090 | }; | 1066 | }; |
1091 | MODULE_DEVICE_TABLE(pcmcia, spectrum_cs_ids); | 1067 | MODULE_DEVICE_TABLE(pcmcia, spectrum_cs_ids); |
diff --git a/drivers/net/wireless/wl3501.h b/drivers/net/wireless/wl3501.h index 7fcbe589c3f2..4303c50c2ab6 100644 --- a/drivers/net/wireless/wl3501.h +++ b/drivers/net/wireless/wl3501.h | |||
@@ -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 ieee80211_hdr mac_hdr; | 551 | struct ieee80211_hdr_4addr mac_hdr; |
552 | } __attribute__ ((packed)); | 552 | } __attribute__ ((packed)); |
553 | 553 | ||
554 | /* | 554 | /* |