diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 07:29:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-27 07:29:50 -0400 |
commit | 6c36810a731a422535d838cdb440f332c1d91017 (patch) | |
tree | ec8c129bbd7b1277cb947621a930ef7dce03d943 | |
parent | df69471290cbec7714f6d1fabd14f4e41219cee1 (diff) | |
parent | 576fdeaef631976c3afcb1d78ef196051282611d (diff) |
Merge branch 'no-iwlwifi' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/base.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/atmel.c | 51 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 24 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 52 | ||||
-rw-r--r-- | net/rfkill/rfkill.c | 2 |
8 files changed, 80 insertions, 81 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index b20a45aa8680..0676c6d84383 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -251,7 +251,7 @@ static inline void ath5k_txbuf_free(struct ath5k_softc *sc, | |||
251 | return; | 251 | return; |
252 | pci_unmap_single(sc->pdev, bf->skbaddr, bf->skb->len, | 252 | pci_unmap_single(sc->pdev, bf->skbaddr, bf->skb->len, |
253 | PCI_DMA_TODEVICE); | 253 | PCI_DMA_TODEVICE); |
254 | dev_kfree_skb(bf->skb); | 254 | dev_kfree_skb_any(bf->skb); |
255 | bf->skb = NULL; | 255 | bf->skb = NULL; |
256 | } | 256 | } |
257 | 257 | ||
@@ -466,6 +466,7 @@ ath5k_pci_probe(struct pci_dev *pdev, | |||
466 | mutex_init(&sc->lock); | 466 | mutex_init(&sc->lock); |
467 | spin_lock_init(&sc->rxbuflock); | 467 | spin_lock_init(&sc->rxbuflock); |
468 | spin_lock_init(&sc->txbuflock); | 468 | spin_lock_init(&sc->txbuflock); |
469 | spin_lock_init(&sc->block); | ||
469 | 470 | ||
470 | /* Set private data */ | 471 | /* Set private data */ |
471 | pci_set_drvdata(pdev, hw); | 472 | pci_set_drvdata(pdev, hw); |
@@ -2179,8 +2180,11 @@ ath5k_beacon_config(struct ath5k_softc *sc) | |||
2179 | 2180 | ||
2180 | sc->imask |= AR5K_INT_SWBA; | 2181 | sc->imask |= AR5K_INT_SWBA; |
2181 | 2182 | ||
2182 | if (ath5k_hw_hasveol(ah)) | 2183 | if (ath5k_hw_hasveol(ah)) { |
2184 | spin_lock(&sc->block); | ||
2183 | ath5k_beacon_send(sc); | 2185 | ath5k_beacon_send(sc); |
2186 | spin_unlock(&sc->block); | ||
2187 | } | ||
2184 | } | 2188 | } |
2185 | /* TODO else AP */ | 2189 | /* TODO else AP */ |
2186 | 2190 | ||
@@ -2403,7 +2407,9 @@ ath5k_intr(int irq, void *dev_id) | |||
2403 | TSF_TO_TU(tsf), | 2407 | TSF_TO_TU(tsf), |
2404 | (unsigned long long) tsf); | 2408 | (unsigned long long) tsf); |
2405 | } else { | 2409 | } else { |
2410 | spin_lock(&sc->block); | ||
2406 | ath5k_beacon_send(sc); | 2411 | ath5k_beacon_send(sc); |
2412 | spin_unlock(&sc->block); | ||
2407 | } | 2413 | } |
2408 | } | 2414 | } |
2409 | if (status & AR5K_INT_RXEOL) { | 2415 | if (status & AR5K_INT_RXEOL) { |
@@ -2745,6 +2751,11 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, | |||
2745 | ret = -EOPNOTSUPP; | 2751 | ret = -EOPNOTSUPP; |
2746 | goto end; | 2752 | goto end; |
2747 | } | 2753 | } |
2754 | |||
2755 | /* Set to a reasonable value. Note that this will | ||
2756 | * be set to mac80211's value at ath5k_config(). */ | ||
2757 | sc->bintval = 1000; | ||
2758 | |||
2748 | ret = 0; | 2759 | ret = 0; |
2749 | end: | 2760 | end: |
2750 | mutex_unlock(&sc->lock); | 2761 | mutex_unlock(&sc->lock); |
@@ -2789,9 +2800,6 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2789 | struct ath5k_hw *ah = sc->ah; | 2800 | struct ath5k_hw *ah = sc->ah; |
2790 | int ret; | 2801 | int ret; |
2791 | 2802 | ||
2792 | /* Set to a reasonable value. Note that this will | ||
2793 | * be set to mac80211's value at ath5k_config(). */ | ||
2794 | sc->bintval = 1000; | ||
2795 | mutex_lock(&sc->lock); | 2803 | mutex_lock(&sc->lock); |
2796 | if (sc->vif != vif) { | 2804 | if (sc->vif != vif) { |
2797 | ret = -EIO; | 2805 | ret = -EIO; |
@@ -3050,6 +3058,7 @@ static int | |||
3050 | ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 3058 | ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
3051 | { | 3059 | { |
3052 | struct ath5k_softc *sc = hw->priv; | 3060 | struct ath5k_softc *sc = hw->priv; |
3061 | unsigned long flags; | ||
3053 | int ret; | 3062 | int ret; |
3054 | 3063 | ||
3055 | ath5k_debug_dump_skb(sc, skb, "BC ", 1); | 3064 | ath5k_debug_dump_skb(sc, skb, "BC ", 1); |
@@ -3059,12 +3068,14 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
3059 | goto end; | 3068 | goto end; |
3060 | } | 3069 | } |
3061 | 3070 | ||
3071 | spin_lock_irqsave(&sc->block, flags); | ||
3062 | ath5k_txbuf_free(sc, sc->bbuf); | 3072 | ath5k_txbuf_free(sc, sc->bbuf); |
3063 | sc->bbuf->skb = skb; | 3073 | sc->bbuf->skb = skb; |
3064 | ret = ath5k_beacon_setup(sc, sc->bbuf); | 3074 | ret = ath5k_beacon_setup(sc, sc->bbuf); |
3065 | if (ret) | 3075 | if (ret) |
3066 | sc->bbuf->skb = NULL; | 3076 | sc->bbuf->skb = NULL; |
3067 | else { | 3077 | spin_unlock_irqrestore(&sc->block, flags); |
3078 | if (!ret) { | ||
3068 | ath5k_beacon_config(sc); | 3079 | ath5k_beacon_config(sc); |
3069 | mmiowb(); | 3080 | mmiowb(); |
3070 | } | 3081 | } |
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h index d7e03e6b8271..7ec2f377d5c7 100644 --- a/drivers/net/wireless/ath5k/base.h +++ b/drivers/net/wireless/ath5k/base.h | |||
@@ -172,6 +172,7 @@ struct ath5k_softc { | |||
172 | struct tasklet_struct txtq; /* tx intr tasklet */ | 172 | struct tasklet_struct txtq; /* tx intr tasklet */ |
173 | struct ath5k_led tx_led; /* tx led */ | 173 | struct ath5k_led tx_led; /* tx led */ |
174 | 174 | ||
175 | spinlock_t block; /* protects beacon */ | ||
175 | struct ath5k_buf *bbuf; /* beacon buffer */ | 176 | struct ath5k_buf *bbuf; /* beacon buffer */ |
176 | unsigned int bhalq, /* SW q for outgoing beacons */ | 177 | unsigned int bhalq, /* SW q for outgoing beacons */ |
177 | bmisscount, /* missed beacon transmits */ | 178 | bmisscount, /* missed beacon transmits */ |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index bd35bb0a1480..bd65c485098c 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1304,7 +1304,7 @@ EXPORT_SYMBOL(atmel_open); | |||
1304 | int atmel_open(struct net_device *dev) | 1304 | int atmel_open(struct net_device *dev) |
1305 | { | 1305 | { |
1306 | struct atmel_private *priv = netdev_priv(dev); | 1306 | struct atmel_private *priv = netdev_priv(dev); |
1307 | int i, channel; | 1307 | int i, channel, err; |
1308 | 1308 | ||
1309 | /* any scheduled timer is no longer needed and might screw things up.. */ | 1309 | /* any scheduled timer is no longer needed and might screw things up.. */ |
1310 | del_timer_sync(&priv->management_timer); | 1310 | del_timer_sync(&priv->management_timer); |
@@ -1328,8 +1328,9 @@ int atmel_open(struct net_device *dev) | |||
1328 | priv->site_survey_state = SITE_SURVEY_IDLE; | 1328 | priv->site_survey_state = SITE_SURVEY_IDLE; |
1329 | priv->station_is_associated = 0; | 1329 | priv->station_is_associated = 0; |
1330 | 1330 | ||
1331 | if (!reset_atmel_card(dev)) | 1331 | err = reset_atmel_card(dev); |
1332 | return -EAGAIN; | 1332 | if (err) |
1333 | return err; | ||
1333 | 1334 | ||
1334 | if (priv->config_reg_domain) { | 1335 | if (priv->config_reg_domain) { |
1335 | priv->reg_domain = priv->config_reg_domain; | 1336 | priv->reg_domain = priv->config_reg_domain; |
@@ -3061,12 +3062,20 @@ static void authenticate(struct atmel_private *priv, u16 frame_len) | |||
3061 | } | 3062 | } |
3062 | 3063 | ||
3063 | if (status == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) { | 3064 | if (status == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) { |
3064 | /* Do opensystem first, then try sharedkey */ | 3065 | /* Flip back and forth between WEP auth modes until the max |
3066 | * authentication tries has been exceeded. | ||
3067 | */ | ||
3065 | if (system == WLAN_AUTH_OPEN) { | 3068 | if (system == WLAN_AUTH_OPEN) { |
3066 | priv->CurrentAuthentTransactionSeqNum = 0x001; | 3069 | priv->CurrentAuthentTransactionSeqNum = 0x001; |
3067 | priv->exclude_unencrypted = 1; | 3070 | priv->exclude_unencrypted = 1; |
3068 | send_authentication_request(priv, WLAN_AUTH_SHARED_KEY, NULL, 0); | 3071 | send_authentication_request(priv, WLAN_AUTH_SHARED_KEY, NULL, 0); |
3069 | return; | 3072 | return; |
3073 | } else if ( system == WLAN_AUTH_SHARED_KEY | ||
3074 | && priv->wep_is_on) { | ||
3075 | priv->CurrentAuthentTransactionSeqNum = 0x001; | ||
3076 | priv->exclude_unencrypted = 0; | ||
3077 | send_authentication_request(priv, WLAN_AUTH_OPEN, NULL, 0); | ||
3078 | return; | ||
3070 | } else if (priv->connect_to_any_BSS) { | 3079 | } else if (priv->connect_to_any_BSS) { |
3071 | int bss_index; | 3080 | int bss_index; |
3072 | 3081 | ||
@@ -3580,12 +3589,12 @@ static int atmel_wakeup_firmware(struct atmel_private *priv) | |||
3580 | 3589 | ||
3581 | if (i == 0) { | 3590 | if (i == 0) { |
3582 | printk(KERN_ALERT "%s: MAC failed to boot.\n", priv->dev->name); | 3591 | printk(KERN_ALERT "%s: MAC failed to boot.\n", priv->dev->name); |
3583 | return 0; | 3592 | return -EIO; |
3584 | } | 3593 | } |
3585 | 3594 | ||
3586 | if ((priv->host_info_base = atmel_read16(priv->dev, MR2)) == 0xffff) { | 3595 | if ((priv->host_info_base = atmel_read16(priv->dev, MR2)) == 0xffff) { |
3587 | printk(KERN_ALERT "%s: card missing.\n", priv->dev->name); | 3596 | printk(KERN_ALERT "%s: card missing.\n", priv->dev->name); |
3588 | return 0; | 3597 | return -ENODEV; |
3589 | } | 3598 | } |
3590 | 3599 | ||
3591 | /* now check for completion of MAC initialization through | 3600 | /* now check for completion of MAC initialization through |
@@ -3609,19 +3618,19 @@ static int atmel_wakeup_firmware(struct atmel_private *priv) | |||
3609 | if (i == 0) { | 3618 | if (i == 0) { |
3610 | printk(KERN_ALERT "%s: MAC failed to initialise.\n", | 3619 | printk(KERN_ALERT "%s: MAC failed to initialise.\n", |
3611 | priv->dev->name); | 3620 | priv->dev->name); |
3612 | return 0; | 3621 | return -EIO; |
3613 | } | 3622 | } |
3614 | 3623 | ||
3615 | /* Check for MAC_INIT_OK only on the register that the MAC_INIT_OK was set */ | 3624 | /* Check for MAC_INIT_OK only on the register that the MAC_INIT_OK was set */ |
3616 | if ((mr3 & MAC_INIT_COMPLETE) && | 3625 | if ((mr3 & MAC_INIT_COMPLETE) && |
3617 | !(atmel_read16(priv->dev, MR3) & MAC_INIT_OK)) { | 3626 | !(atmel_read16(priv->dev, MR3) & MAC_INIT_OK)) { |
3618 | printk(KERN_ALERT "%s: MAC failed MR3 self-test.\n", priv->dev->name); | 3627 | printk(KERN_ALERT "%s: MAC failed MR3 self-test.\n", priv->dev->name); |
3619 | return 0; | 3628 | return -EIO; |
3620 | } | 3629 | } |
3621 | if ((mr1 & MAC_INIT_COMPLETE) && | 3630 | if ((mr1 & MAC_INIT_COMPLETE) && |
3622 | !(atmel_read16(priv->dev, MR1) & MAC_INIT_OK)) { | 3631 | !(atmel_read16(priv->dev, MR1) & MAC_INIT_OK)) { |
3623 | printk(KERN_ALERT "%s: MAC failed MR1 self-test.\n", priv->dev->name); | 3632 | printk(KERN_ALERT "%s: MAC failed MR1 self-test.\n", priv->dev->name); |
3624 | return 0; | 3633 | return -EIO; |
3625 | } | 3634 | } |
3626 | 3635 | ||
3627 | atmel_copy_to_host(priv->dev, (unsigned char *)iface, | 3636 | atmel_copy_to_host(priv->dev, (unsigned char *)iface, |
@@ -3642,7 +3651,7 @@ static int atmel_wakeup_firmware(struct atmel_private *priv) | |||
3642 | iface->func_ctrl = le16_to_cpu(iface->func_ctrl); | 3651 | iface->func_ctrl = le16_to_cpu(iface->func_ctrl); |
3643 | iface->mac_status = le16_to_cpu(iface->mac_status); | 3652 | iface->mac_status = le16_to_cpu(iface->mac_status); |
3644 | 3653 | ||
3645 | return 1; | 3654 | return 0; |
3646 | } | 3655 | } |
3647 | 3656 | ||
3648 | /* determine type of memory and MAC address */ | 3657 | /* determine type of memory and MAC address */ |
@@ -3693,7 +3702,7 @@ static int probe_atmel_card(struct net_device *dev) | |||
3693 | /* Standard firmware in flash, boot it up and ask | 3702 | /* Standard firmware in flash, boot it up and ask |
3694 | for the Mac Address */ | 3703 | for the Mac Address */ |
3695 | priv->card_type = CARD_TYPE_SPI_FLASH; | 3704 | priv->card_type = CARD_TYPE_SPI_FLASH; |
3696 | if (atmel_wakeup_firmware(priv)) { | 3705 | if (atmel_wakeup_firmware(priv) == 0) { |
3697 | atmel_get_mib(priv, Mac_Address_Mib_Type, 0, dev->dev_addr, 6); | 3706 | atmel_get_mib(priv, Mac_Address_Mib_Type, 0, dev->dev_addr, 6); |
3698 | 3707 | ||
3699 | /* got address, now squash it again until the network | 3708 | /* got address, now squash it again until the network |
@@ -3835,6 +3844,7 @@ static int reset_atmel_card(struct net_device *dev) | |||
3835 | struct atmel_private *priv = netdev_priv(dev); | 3844 | struct atmel_private *priv = netdev_priv(dev); |
3836 | u8 configuration; | 3845 | u8 configuration; |
3837 | int old_state = priv->station_state; | 3846 | int old_state = priv->station_state; |
3847 | int err = 0; | ||
3838 | 3848 | ||
3839 | /* data to add to the firmware names, in priority order | 3849 | /* data to add to the firmware names, in priority order |
3840 | this implemenents firmware versioning */ | 3850 | this implemenents firmware versioning */ |
@@ -3868,11 +3878,12 @@ static int reset_atmel_card(struct net_device *dev) | |||
3868 | dev->name); | 3878 | dev->name); |
3869 | strcpy(priv->firmware_id, "atmel_at76c502.bin"); | 3879 | strcpy(priv->firmware_id, "atmel_at76c502.bin"); |
3870 | } | 3880 | } |
3871 | if (request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev) != 0) { | 3881 | err = request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev); |
3882 | if (err != 0) { | ||
3872 | printk(KERN_ALERT | 3883 | printk(KERN_ALERT |
3873 | "%s: firmware %s is missing, cannot continue.\n", | 3884 | "%s: firmware %s is missing, cannot continue.\n", |
3874 | dev->name, priv->firmware_id); | 3885 | dev->name, priv->firmware_id); |
3875 | return 0; | 3886 | return err; |
3876 | } | 3887 | } |
3877 | } else { | 3888 | } else { |
3878 | int fw_index = 0; | 3889 | int fw_index = 0; |
@@ -3901,7 +3912,7 @@ static int reset_atmel_card(struct net_device *dev) | |||
3901 | "%s: firmware %s is missing, cannot start.\n", | 3912 | "%s: firmware %s is missing, cannot start.\n", |
3902 | dev->name, priv->firmware_id); | 3913 | dev->name, priv->firmware_id); |
3903 | priv->firmware_id[0] = '\0'; | 3914 | priv->firmware_id[0] = '\0'; |
3904 | return 0; | 3915 | return -ENOENT; |
3905 | } | 3916 | } |
3906 | } | 3917 | } |
3907 | 3918 | ||
@@ -3926,8 +3937,9 @@ static int reset_atmel_card(struct net_device *dev) | |||
3926 | release_firmware(fw_entry); | 3937 | release_firmware(fw_entry); |
3927 | } | 3938 | } |
3928 | 3939 | ||
3929 | if (!atmel_wakeup_firmware(priv)) | 3940 | err = atmel_wakeup_firmware(priv); |
3930 | return 0; | 3941 | if (err != 0) |
3942 | return err; | ||
3931 | 3943 | ||
3932 | /* Check the version and set the correct flag for wpa stuff, | 3944 | /* Check the version and set the correct flag for wpa stuff, |
3933 | old and new firmware is incompatible. | 3945 | old and new firmware is incompatible. |
@@ -3968,10 +3980,9 @@ static int reset_atmel_card(struct net_device *dev) | |||
3968 | if (!priv->radio_on_broken) { | 3980 | if (!priv->radio_on_broken) { |
3969 | if (atmel_send_command_wait(priv, CMD_EnableRadio, NULL, 0) == | 3981 | if (atmel_send_command_wait(priv, CMD_EnableRadio, NULL, 0) == |
3970 | CMD_STATUS_REJECTED_RADIO_OFF) { | 3982 | CMD_STATUS_REJECTED_RADIO_OFF) { |
3971 | printk(KERN_INFO | 3983 | printk(KERN_INFO "%s: cannot turn the radio on.\n", |
3972 | "%s: cannot turn the radio on. (Hey radio, you're beautiful!)\n", | ||
3973 | dev->name); | 3984 | dev->name); |
3974 | return 0; | 3985 | return -EIO; |
3975 | } | 3986 | } |
3976 | } | 3987 | } |
3977 | 3988 | ||
@@ -4006,7 +4017,7 @@ static int reset_atmel_card(struct net_device *dev) | |||
4006 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); | 4017 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
4007 | } | 4018 | } |
4008 | 4019 | ||
4009 | return 1; | 4020 | return 0; |
4010 | } | 4021 | } |
4011 | 4022 | ||
4012 | static void atmel_send_command(struct atmel_private *priv, int command, | 4023 | static void atmel_send_command(struct atmel_private *priv, int command, |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 475f89a8aee1..8165df578c92 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -248,8 +248,8 @@ IEEE80211_IF_WFILE(min_discovery_timeout, | |||
248 | static void add_sta_files(struct ieee80211_sub_if_data *sdata) | 248 | static void add_sta_files(struct ieee80211_sub_if_data *sdata) |
249 | { | 249 | { |
250 | DEBUGFS_ADD(drop_unencrypted, sta); | 250 | DEBUGFS_ADD(drop_unencrypted, sta); |
251 | DEBUGFS_ADD(force_unicast_rateidx, ap); | 251 | DEBUGFS_ADD(force_unicast_rateidx, sta); |
252 | DEBUGFS_ADD(max_ratectrl_rateidx, ap); | 252 | DEBUGFS_ADD(max_ratectrl_rateidx, sta); |
253 | 253 | ||
254 | DEBUGFS_ADD(state, sta); | 254 | DEBUGFS_ADD(state, sta); |
255 | DEBUGFS_ADD(bssid, sta); | 255 | DEBUGFS_ADD(bssid, sta); |
@@ -283,8 +283,8 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata) | |||
283 | static void add_wds_files(struct ieee80211_sub_if_data *sdata) | 283 | static void add_wds_files(struct ieee80211_sub_if_data *sdata) |
284 | { | 284 | { |
285 | DEBUGFS_ADD(drop_unencrypted, wds); | 285 | DEBUGFS_ADD(drop_unencrypted, wds); |
286 | DEBUGFS_ADD(force_unicast_rateidx, ap); | 286 | DEBUGFS_ADD(force_unicast_rateidx, wds); |
287 | DEBUGFS_ADD(max_ratectrl_rateidx, ap); | 287 | DEBUGFS_ADD(max_ratectrl_rateidx, wds); |
288 | 288 | ||
289 | DEBUGFS_ADD(peer, wds); | 289 | DEBUGFS_ADD(peer, wds); |
290 | } | 290 | } |
@@ -292,8 +292,8 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata) | |||
292 | static void add_vlan_files(struct ieee80211_sub_if_data *sdata) | 292 | static void add_vlan_files(struct ieee80211_sub_if_data *sdata) |
293 | { | 293 | { |
294 | DEBUGFS_ADD(drop_unencrypted, vlan); | 294 | DEBUGFS_ADD(drop_unencrypted, vlan); |
295 | DEBUGFS_ADD(force_unicast_rateidx, ap); | 295 | DEBUGFS_ADD(force_unicast_rateidx, vlan); |
296 | DEBUGFS_ADD(max_ratectrl_rateidx, ap); | 296 | DEBUGFS_ADD(max_ratectrl_rateidx, vlan); |
297 | } | 297 | } |
298 | 298 | ||
299 | static void add_monitor_files(struct ieee80211_sub_if_data *sdata) | 299 | static void add_monitor_files(struct ieee80211_sub_if_data *sdata) |
@@ -381,8 +381,8 @@ static void add_files(struct ieee80211_sub_if_data *sdata) | |||
381 | static void del_sta_files(struct ieee80211_sub_if_data *sdata) | 381 | static void del_sta_files(struct ieee80211_sub_if_data *sdata) |
382 | { | 382 | { |
383 | DEBUGFS_DEL(drop_unencrypted, sta); | 383 | DEBUGFS_DEL(drop_unencrypted, sta); |
384 | DEBUGFS_DEL(force_unicast_rateidx, ap); | 384 | DEBUGFS_DEL(force_unicast_rateidx, sta); |
385 | DEBUGFS_DEL(max_ratectrl_rateidx, ap); | 385 | DEBUGFS_DEL(max_ratectrl_rateidx, sta); |
386 | 386 | ||
387 | DEBUGFS_DEL(state, sta); | 387 | DEBUGFS_DEL(state, sta); |
388 | DEBUGFS_DEL(bssid, sta); | 388 | DEBUGFS_DEL(bssid, sta); |
@@ -416,8 +416,8 @@ static void del_ap_files(struct ieee80211_sub_if_data *sdata) | |||
416 | static void del_wds_files(struct ieee80211_sub_if_data *sdata) | 416 | static void del_wds_files(struct ieee80211_sub_if_data *sdata) |
417 | { | 417 | { |
418 | DEBUGFS_DEL(drop_unencrypted, wds); | 418 | DEBUGFS_DEL(drop_unencrypted, wds); |
419 | DEBUGFS_DEL(force_unicast_rateidx, ap); | 419 | DEBUGFS_DEL(force_unicast_rateidx, wds); |
420 | DEBUGFS_DEL(max_ratectrl_rateidx, ap); | 420 | DEBUGFS_DEL(max_ratectrl_rateidx, wds); |
421 | 421 | ||
422 | DEBUGFS_DEL(peer, wds); | 422 | DEBUGFS_DEL(peer, wds); |
423 | } | 423 | } |
@@ -425,8 +425,8 @@ static void del_wds_files(struct ieee80211_sub_if_data *sdata) | |||
425 | static void del_vlan_files(struct ieee80211_sub_if_data *sdata) | 425 | static void del_vlan_files(struct ieee80211_sub_if_data *sdata) |
426 | { | 426 | { |
427 | DEBUGFS_DEL(drop_unencrypted, vlan); | 427 | DEBUGFS_DEL(drop_unencrypted, vlan); |
428 | DEBUGFS_DEL(force_unicast_rateidx, ap); | 428 | DEBUGFS_DEL(force_unicast_rateidx, vlan); |
429 | DEBUGFS_DEL(max_ratectrl_rateidx, ap); | 429 | DEBUGFS_DEL(max_ratectrl_rateidx, vlan); |
430 | } | 430 | } |
431 | 431 | ||
432 | static void del_monitor_files(struct ieee80211_sub_if_data *sdata) | 432 | static void del_monitor_files(struct ieee80211_sub_if_data *sdata) |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index ec59345af65b..586a9b49b0fc 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -470,6 +470,8 @@ struct ieee80211_sub_if_data { | |||
470 | struct dentry *auth_transaction; | 470 | struct dentry *auth_transaction; |
471 | struct dentry *flags; | 471 | struct dentry *flags; |
472 | struct dentry *num_beacons_sta; | 472 | struct dentry *num_beacons_sta; |
473 | struct dentry *force_unicast_rateidx; | ||
474 | struct dentry *max_ratectrl_rateidx; | ||
473 | } sta; | 475 | } sta; |
474 | struct { | 476 | struct { |
475 | struct dentry *drop_unencrypted; | 477 | struct dentry *drop_unencrypted; |
@@ -483,9 +485,13 @@ struct ieee80211_sub_if_data { | |||
483 | struct { | 485 | struct { |
484 | struct dentry *drop_unencrypted; | 486 | struct dentry *drop_unencrypted; |
485 | struct dentry *peer; | 487 | struct dentry *peer; |
488 | struct dentry *force_unicast_rateidx; | ||
489 | struct dentry *max_ratectrl_rateidx; | ||
486 | } wds; | 490 | } wds; |
487 | struct { | 491 | struct { |
488 | struct dentry *drop_unencrypted; | 492 | struct dentry *drop_unencrypted; |
493 | struct dentry *force_unicast_rateidx; | ||
494 | struct dentry *max_ratectrl_rateidx; | ||
489 | } vlan; | 495 | } vlan; |
490 | struct { | 496 | struct { |
491 | struct dentry *mode; | 497 | struct dentry *mode; |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index b5933b271491..35f2f95f2fa7 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -383,7 +383,7 @@ errcopy: | |||
383 | hlist_for_each_safe(p, q, &newtbl->hash_buckets[i]) | 383 | hlist_for_each_safe(p, q, &newtbl->hash_buckets[i]) |
384 | tbl->free_node(p, 0); | 384 | tbl->free_node(p, 0); |
385 | } | 385 | } |
386 | __mesh_table_free(tbl); | 386 | __mesh_table_free(newtbl); |
387 | endgrow: | 387 | endgrow: |
388 | return NULL; | 388 | return NULL; |
389 | } | 389 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1e97fb9fb34b..9bb68c6a8f44 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -478,51 +478,21 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info( | |||
478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, | 478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, |
479 | struct ieee80211_if_sta *ifsta) | 479 | struct ieee80211_if_sta *ifsta) |
480 | { | 480 | { |
481 | char *buf; | ||
482 | size_t len; | ||
483 | int i; | ||
484 | union iwreq_data wrqu; | 481 | union iwreq_data wrqu; |
485 | 482 | ||
486 | if (!ifsta->assocreq_ies && !ifsta->assocresp_ies) | ||
487 | return; | ||
488 | |||
489 | buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + | ||
490 | ifsta->assocresp_ies_len), GFP_KERNEL); | ||
491 | if (!buf) | ||
492 | return; | ||
493 | |||
494 | len = sprintf(buf, "ASSOCINFO("); | ||
495 | if (ifsta->assocreq_ies) { | 483 | if (ifsta->assocreq_ies) { |
496 | len += sprintf(buf + len, "ReqIEs="); | 484 | memset(&wrqu, 0, sizeof(wrqu)); |
497 | for (i = 0; i < ifsta->assocreq_ies_len; i++) { | 485 | wrqu.data.length = ifsta->assocreq_ies_len; |
498 | len += sprintf(buf + len, "%02x", | 486 | wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, |
499 | ifsta->assocreq_ies[i]); | 487 | ifsta->assocreq_ies); |
500 | } | ||
501 | } | 488 | } |
502 | if (ifsta->assocresp_ies) { | ||
503 | if (ifsta->assocreq_ies) | ||
504 | len += sprintf(buf + len, " "); | ||
505 | len += sprintf(buf + len, "RespIEs="); | ||
506 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | ||
507 | len += sprintf(buf + len, "%02x", | ||
508 | ifsta->assocresp_ies[i]); | ||
509 | } | ||
510 | } | ||
511 | len += sprintf(buf + len, ")"); | ||
512 | 489 | ||
513 | if (len > IW_CUSTOM_MAX) { | 490 | if (ifsta->assocresp_ies) { |
514 | len = sprintf(buf, "ASSOCRESPIE="); | 491 | memset(&wrqu, 0, sizeof(wrqu)); |
515 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | 492 | wrqu.data.length = ifsta->assocresp_ies_len; |
516 | len += sprintf(buf + len, "%02x", | 493 | wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, |
517 | ifsta->assocresp_ies[i]); | 494 | ifsta->assocresp_ies); |
518 | } | ||
519 | } | 495 | } |
520 | |||
521 | memset(&wrqu, 0, sizeof(wrqu)); | ||
522 | wrqu.data.length = len; | ||
523 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); | ||
524 | |||
525 | kfree(buf); | ||
526 | } | 496 | } |
527 | 497 | ||
528 | 498 | ||
@@ -813,7 +783,7 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
813 | } | 783 | } |
814 | } | 784 | } |
815 | 785 | ||
816 | if (count == 8) { | 786 | if (rates_len > count) { |
817 | pos = skb_put(skb, rates_len - count + 2); | 787 | pos = skb_put(skb, rates_len - count + 2); |
818 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | 788 | *pos++ = WLAN_EID_EXT_SUPP_RATES; |
819 | *pos++ = rates_len - count; | 789 | *pos++ = rates_len - count; |
@@ -2868,7 +2838,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
2868 | jiffies); | 2838 | jiffies); |
2869 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 2839 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
2870 | if (beacon_timestamp > rx_timestamp) { | 2840 | if (beacon_timestamp > rx_timestamp) { |
2871 | #ifndef CONFIG_MAC80211_IBSS_DEBUG | 2841 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
2872 | printk(KERN_DEBUG "%s: beacon TSF higher than " | 2842 | printk(KERN_DEBUG "%s: beacon TSF higher than " |
2873 | "local TSF - IBSS merge with BSSID %s\n", | 2843 | "local TSF - IBSS merge with BSSID %s\n", |
2874 | dev->name, print_mac(mac, mgmt->bssid)); | 2844 | dev->name, print_mac(mac, mgmt->bssid)); |
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 35a9994e2339..74aecc098bad 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -377,7 +377,7 @@ static ssize_t rfkill_claim_show(struct device *dev, | |||
377 | { | 377 | { |
378 | struct rfkill *rfkill = to_rfkill(dev); | 378 | struct rfkill *rfkill = to_rfkill(dev); |
379 | 379 | ||
380 | return sprintf(buf, "%d", rfkill->user_claim); | 380 | return sprintf(buf, "%d\n", rfkill->user_claim); |
381 | } | 381 | } |
382 | 382 | ||
383 | static ssize_t rfkill_claim_store(struct device *dev, | 383 | static ssize_t rfkill_claim_store(struct device *dev, |