diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/zd1201.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 7 |
10 files changed, 29 insertions, 22 deletions
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index fa9d2c4edc93..2e8ac995d56f 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -447,6 +447,7 @@ config AIRO_CS | |||
447 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" | 447 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" |
448 | depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) | 448 | depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) |
449 | select CRYPTO | 449 | select CRYPTO |
450 | select CRYPTO_AES | ||
450 | ---help--- | 451 | ---help--- |
451 | This is the standard Linux driver to support Cisco/Aironet PCMCIA | 452 | This is the standard Linux driver to support Cisco/Aironet PCMCIA |
452 | 802.11 wireless cards. This driver is the same as the Aironet | 453 | 802.11 wireless cards. This driver is the same as the Aironet |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 3889f79e7128..df317c1e12a8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3701,7 +3701,7 @@ static void bcm43xx_ieee80211_set_security(struct net_device *net_dev, | |||
3701 | } | 3701 | } |
3702 | if (sec->flags & SEC_AUTH_MODE) { | 3702 | if (sec->flags & SEC_AUTH_MODE) { |
3703 | secinfo->auth_mode = sec->auth_mode; | 3703 | secinfo->auth_mode = sec->auth_mode; |
3704 | dprintk(", .auth_mode = %d\n", sec->auth_mode); | 3704 | dprintk(", .auth_mode = %d", sec->auth_mode); |
3705 | } | 3705 | } |
3706 | dprintk("\n"); | 3706 | dprintk("\n"); |
3707 | if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED && | 3707 | if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED && |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index dafaa5ff5aa6..d500012fdc7a 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -1042,6 +1042,9 @@ static int prism2_reset_port(struct net_device *dev) | |||
1042 | dev->name, local->fragm_threshold); | 1042 | dev->name, local->fragm_threshold); |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | /* Some firmwares lose antenna selection settings on reset */ | ||
1046 | (void) hostap_set_antsel(local); | ||
1047 | |||
1045 | return res; | 1048 | return res; |
1046 | } | 1049 | } |
1047 | 1050 | ||
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index d6ed5781b93a..317ace7f9aae 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -2875,7 +2875,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev, | |||
2875 | if (orinoco_lock(priv, &flags) != 0) | 2875 | if (orinoco_lock(priv, &flags) != 0) |
2876 | return -EBUSY; | 2876 | return -EBUSY; |
2877 | 2877 | ||
2878 | if (erq->pointer) { | 2878 | if (erq->length > 0) { |
2879 | if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) | 2879 | if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) |
2880 | index = priv->tx_key; | 2880 | index = priv->tx_key; |
2881 | 2881 | ||
@@ -2918,7 +2918,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev, | |||
2918 | if (erq->flags & IW_ENCODE_RESTRICTED) | 2918 | if (erq->flags & IW_ENCODE_RESTRICTED) |
2919 | restricted = 1; | 2919 | restricted = 1; |
2920 | 2920 | ||
2921 | if (erq->pointer) { | 2921 | if (erq->pointer && erq->length > 0) { |
2922 | priv->keys[index].len = cpu_to_le16(xlen); | 2922 | priv->keys[index].len = cpu_to_le16(xlen); |
2923 | memset(priv->keys[index].data, 0, | 2923 | memset(priv->keys[index].data, 0, |
2924 | sizeof(priv->keys[index].data)); | 2924 | sizeof(priv->keys[index].data)); |
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index 7f78b7801fb3..bcc7038130f6 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -242,7 +242,7 @@ spectrum_reset(struct pcmcia_device *link, int idle) | |||
242 | u_int save_cor; | 242 | u_int save_cor; |
243 | 243 | ||
244 | /* Doing it if hardware is gone is guaranteed crash */ | 244 | /* Doing it if hardware is gone is guaranteed crash */ |
245 | if (pcmcia_dev_present(link)) | 245 | if (!pcmcia_dev_present(link)) |
246 | return -ENODEV; | 246 | return -ENODEV; |
247 | 247 | ||
248 | /* Save original COR value */ | 248 | /* Save original COR value */ |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 662ecc8a33ff..c52e9bcf8d02 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -1820,6 +1820,8 @@ static int zd1201_probe(struct usb_interface *interface, | |||
1820 | zd->dev->name); | 1820 | zd->dev->name); |
1821 | 1821 | ||
1822 | usb_set_intfdata(interface, zd); | 1822 | usb_set_intfdata(interface, zd); |
1823 | zd1201_enable(zd); /* zd1201 likes to startup enabled, */ | ||
1824 | zd1201_disable(zd); /* interfering with all the wifis in range */ | ||
1823 | return 0; | 1825 | return 0; |
1824 | 1826 | ||
1825 | err_net: | 1827 | err_net: |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index efc9c4bd826f..da9d06bdb818 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -797,7 +797,7 @@ static int zd1211_hw_init_hmac(struct zd_chip *chip) | |||
797 | { CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, | 797 | { CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, |
798 | { CR_ZD1211_RETRY_MAX, 0x2 }, | 798 | { CR_ZD1211_RETRY_MAX, 0x2 }, |
799 | { CR_SNIFFER_ON, 0 }, | 799 | { CR_SNIFFER_ON, 0 }, |
800 | { CR_RX_FILTER, AP_RX_FILTER }, | 800 | { CR_RX_FILTER, STA_RX_FILTER }, |
801 | { CR_GROUP_HASH_P1, 0x00 }, | 801 | { CR_GROUP_HASH_P1, 0x00 }, |
802 | { CR_GROUP_HASH_P2, 0x80000000 }, | 802 | { CR_GROUP_HASH_P2, 0x80000000 }, |
803 | { CR_REG1, 0xa4 }, | 803 | { CR_REG1, 0xa4 }, |
@@ -844,7 +844,7 @@ static int zd1211b_hw_init_hmac(struct zd_chip *chip) | |||
844 | { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, | 844 | { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, |
845 | { CR_ZD1211B_TXOP, 0x01800824 }, | 845 | { CR_ZD1211B_TXOP, 0x01800824 }, |
846 | { CR_SNIFFER_ON, 0 }, | 846 | { CR_SNIFFER_ON, 0 }, |
847 | { CR_RX_FILTER, AP_RX_FILTER }, | 847 | { CR_RX_FILTER, STA_RX_FILTER }, |
848 | { CR_GROUP_HASH_P1, 0x00 }, | 848 | { CR_GROUP_HASH_P1, 0x00 }, |
849 | { CR_GROUP_HASH_P2, 0x80000000 }, | 849 | { CR_GROUP_HASH_P2, 0x80000000 }, |
850 | { CR_REG1, 0xa4 }, | 850 | { CR_REG1, 0xa4 }, |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h index 805121093ab5..069d2b467339 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.h +++ b/drivers/net/wireless/zd1211rw/zd_chip.h | |||
@@ -461,10 +461,15 @@ | |||
461 | 461 | ||
462 | #define CR_RX_FILTER CTL_REG(0x068c) | 462 | #define CR_RX_FILTER CTL_REG(0x068c) |
463 | #define RX_FILTER_ASSOC_RESPONSE 0x0002 | 463 | #define RX_FILTER_ASSOC_RESPONSE 0x0002 |
464 | #define RX_FILTER_REASSOC_RESPONSE 0x0008 | ||
464 | #define RX_FILTER_PROBE_RESPONSE 0x0020 | 465 | #define RX_FILTER_PROBE_RESPONSE 0x0020 |
465 | #define RX_FILTER_BEACON 0x0100 | 466 | #define RX_FILTER_BEACON 0x0100 |
467 | #define RX_FILTER_DISASSOC 0x0400 | ||
466 | #define RX_FILTER_AUTH 0x0800 | 468 | #define RX_FILTER_AUTH 0x0800 |
467 | /* Sniff modus sets filter to 0xfffff */ | 469 | #define AP_RX_FILTER 0x0400feff |
470 | #define STA_RX_FILTER 0x0000ffff | ||
471 | |||
472 | /* Monitor mode sets filter to 0xfffff */ | ||
468 | 473 | ||
469 | #define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690) | 474 | #define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690) |
470 | #define CR_BCN_FIFO_SEMAPHORE CTL_REG(0x0694) | 475 | #define CR_BCN_FIFO_SEMAPHORE CTL_REG(0x0694) |
@@ -546,9 +551,6 @@ | |||
546 | #define CR_ZD1211B_TXOP CTL_REG(0x0b20) | 551 | #define CR_ZD1211B_TXOP CTL_REG(0x0b20) |
547 | #define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28) | 552 | #define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28) |
548 | 553 | ||
549 | #define AP_RX_FILTER 0x0400feff | ||
550 | #define STA_RX_FILTER 0x0000ffff | ||
551 | |||
552 | #define CWIN_SIZE 0x007f043f | 554 | #define CWIN_SIZE 0x007f043f |
553 | 555 | ||
554 | 556 | ||
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 3bdc54d128d0..d6f3e02a0b54 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -108,7 +108,9 @@ int zd_mac_init_hw(struct zd_mac *mac, u8 device_type) | |||
108 | if (r) | 108 | if (r) |
109 | goto disable_int; | 109 | goto disable_int; |
110 | 110 | ||
111 | r = zd_set_encryption_type(chip, NO_WEP); | 111 | /* We must inform the device that we are doing encryption/decryption in |
112 | * software at the moment. */ | ||
113 | r = zd_set_encryption_type(chip, ENC_SNIFFER); | ||
112 | if (r) | 114 | if (r) |
113 | goto disable_int; | 115 | goto disable_int; |
114 | 116 | ||
@@ -136,10 +138,8 @@ static int reset_mode(struct zd_mac *mac) | |||
136 | { | 138 | { |
137 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); | 139 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); |
138 | struct zd_ioreq32 ioreqs[3] = { | 140 | struct zd_ioreq32 ioreqs[3] = { |
139 | { CR_RX_FILTER, RX_FILTER_BEACON|RX_FILTER_PROBE_RESPONSE| | 141 | { CR_RX_FILTER, STA_RX_FILTER }, |
140 | RX_FILTER_AUTH|RX_FILTER_ASSOC_RESPONSE }, | ||
141 | { CR_SNIFFER_ON, 0U }, | 142 | { CR_SNIFFER_ON, 0U }, |
142 | { CR_ENCRYPTION_TYPE, NO_WEP }, | ||
143 | }; | 143 | }; |
144 | 144 | ||
145 | if (ieee->iw_mode == IW_MODE_MONITOR) { | 145 | if (ieee->iw_mode == IW_MODE_MONITOR) { |
@@ -713,10 +713,10 @@ static int zd_mac_tx(struct zd_mac *mac, struct ieee80211_txb *txb, int pri) | |||
713 | struct zd_rt_hdr { | 713 | struct zd_rt_hdr { |
714 | struct ieee80211_radiotap_header rt_hdr; | 714 | struct ieee80211_radiotap_header rt_hdr; |
715 | u8 rt_flags; | 715 | u8 rt_flags; |
716 | u8 rt_rate; | ||
716 | u16 rt_channel; | 717 | u16 rt_channel; |
717 | u16 rt_chbitmask; | 718 | u16 rt_chbitmask; |
718 | u16 rt_rate; | 719 | } __attribute__((packed)); |
719 | }; | ||
720 | 720 | ||
721 | static void fill_rt_header(void *buffer, struct zd_mac *mac, | 721 | static void fill_rt_header(void *buffer, struct zd_mac *mac, |
722 | const struct ieee80211_rx_stats *stats, | 722 | const struct ieee80211_rx_stats *stats, |
@@ -735,14 +735,14 @@ static void fill_rt_header(void *buffer, struct zd_mac *mac, | |||
735 | if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) | 735 | if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) |
736 | hdr->rt_flags |= IEEE80211_RADIOTAP_F_WEP; | 736 | hdr->rt_flags |= IEEE80211_RADIOTAP_F_WEP; |
737 | 737 | ||
738 | hdr->rt_rate = stats->rate / 5; | ||
739 | |||
738 | /* FIXME: 802.11a */ | 740 | /* FIXME: 802.11a */ |
739 | hdr->rt_channel = cpu_to_le16(ieee80211chan2mhz( | 741 | hdr->rt_channel = cpu_to_le16(ieee80211chan2mhz( |
740 | _zd_chip_get_channel(&mac->chip))); | 742 | _zd_chip_get_channel(&mac->chip))); |
741 | hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | | 743 | hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | |
742 | ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == | 744 | ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == |
743 | ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); | 745 | ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); |
744 | |||
745 | hdr->rt_rate = stats->rate / 5; | ||
746 | } | 746 | } |
747 | 747 | ||
748 | /* Returns 1 if the data packet is for us and 0 otherwise. */ | 748 | /* Returns 1 if the data packet is for us and 0 otherwise. */ |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 72f90525bf68..6320984126c7 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -323,7 +323,6 @@ static void disable_read_regs_int(struct zd_usb *usb) | |||
323 | { | 323 | { |
324 | struct zd_usb_interrupt *intr = &usb->intr; | 324 | struct zd_usb_interrupt *intr = &usb->intr; |
325 | 325 | ||
326 | ZD_ASSERT(in_interrupt()); | ||
327 | spin_lock(&intr->lock); | 326 | spin_lock(&intr->lock); |
328 | intr->read_regs_enabled = 0; | 327 | intr->read_regs_enabled = 0; |
329 | spin_unlock(&intr->lock); | 328 | spin_unlock(&intr->lock); |
@@ -545,11 +544,11 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer, | |||
545 | * be padded. Unaligned access might also happen if the length_info | 544 | * be padded. Unaligned access might also happen if the length_info |
546 | * structure is not present. | 545 | * structure is not present. |
547 | */ | 546 | */ |
548 | if (get_unaligned(&length_info->tag) == RX_LENGTH_INFO_TAG) { | 547 | if (get_unaligned(&length_info->tag) == cpu_to_le16(RX_LENGTH_INFO_TAG)) |
548 | { | ||
549 | unsigned int l, k, n; | 549 | unsigned int l, k, n; |
550 | for (i = 0, l = 0;; i++) { | 550 | for (i = 0, l = 0;; i++) { |
551 | k = le16_to_cpu(get_unaligned( | 551 | k = le16_to_cpu(get_unaligned(&length_info->length[i])); |
552 | &length_info->length[i])); | ||
553 | n = l+k; | 552 | n = l+k; |
554 | if (n > length) | 553 | if (n > length) |
555 | return; | 554 | return; |