diff options
| author | David S. Miller <davem@davemloft.net> | 2012-10-21 20:57:37 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-10-21 20:57:37 -0400 |
| commit | e6e71054cd9f98c8ebb3a5f66f2776a9736afc87 (patch) | |
| tree | bdbfa01832b970f550170fd2a28042e3def18d85 | |
| parent | 9a4da2cd99e4edfee1e48c5e2b4928eaefb56006 (diff) | |
| parent | 06f40a41b80e25e88a2b612ea3b2a94f93c94f72 (diff) | |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says:
====================
This is a batch of fixes intended for the 3.7 stream.
Dan Carpenter brings a fix for a simple signedness bug that could
prevent the proper termination of a loop.
Felix Fietkau found a few more places that need to use
ieee80211_free_txskb for properly releasing SKBs used by mac80211.
Franky Lin offers a pair of brcmfmac fixes, both fixing simple state
reporting errors.
Hante Meuleman corrects an error reporting case that wasn't handling
all types of errors properly.
Johan Hedberg offers a fix for an issue discovered at the Bluetooth
UnPlug Fest. Gustavo says "the patch fixes a failure to pair with
devices that support the LE Secure Connections feature."
Johannes Berg sends an iwlwifi fix to handle a message type that
is too large for the normal command mechanism. He also provides a
mac80211 fix to use HT20 channels when HT40 channels are not permitted.
Jouni Malinen offers a mac80211 fix for a masking error that was
incorrectly marking some frames.
Piotr Haber provides a fix to make sure bcma devices are unregistered
properly.
Stanislav Yakovlev gives us a fix for a panic in the ipw2200 driver.
Stanislaw Gruszka sends a pair of fixes: one prevents a mismatch on
connection states between cfg80211 and mac80211; the other prevents
some frame corruption related to handling encryption.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/bcma/main.c | 5 | ||||
| -rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 68 | ||||
| -rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/devices.c | 39 | ||||
| -rw-r--r-- | include/net/cfg80211.h | 1 | ||||
| -rw-r--r-- | net/bluetooth/smp.c | 6 | ||||
| -rw-r--r-- | net/mac80211/iface.c | 2 | ||||
| -rw-r--r-- | net/mac80211/mlme.c | 35 | ||||
| -rw-r--r-- | net/mac80211/sta_info.c | 4 | ||||
| -rw-r--r-- | net/mac80211/util.c | 4 | ||||
| -rw-r--r-- | net/mac80211/wpa.c | 14 | ||||
| -rw-r--r-- | net/wireless/mlme.c | 12 |
13 files changed, 99 insertions, 95 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 432aeeedfd5e..d865470bc951 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
| @@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus) | |||
| 158 | 158 | ||
| 159 | static void bcma_unregister_cores(struct bcma_bus *bus) | 159 | static void bcma_unregister_cores(struct bcma_bus *bus) |
| 160 | { | 160 | { |
| 161 | struct bcma_device *core; | 161 | struct bcma_device *core, *tmp; |
| 162 | 162 | ||
| 163 | list_for_each_entry(core, &bus->cores, list) { | 163 | list_for_each_entry_safe(core, tmp, &bus->cores, list) { |
| 164 | list_del(&core->list); | ||
| 164 | if (core->dev_registered) | 165 | if (core->dev_registered) |
| 165 | device_unregister(&core->dev); | 166 | device_unregister(&core->dev); |
| 166 | } | 167 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index a2b4b1e71017..7a6dfdc67b6c 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c | |||
| @@ -1339,7 +1339,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, | |||
| 1339 | } | 1339 | } |
| 1340 | 1340 | ||
| 1341 | ret = brcmf_bus_start(dev); | 1341 | ret = brcmf_bus_start(dev); |
| 1342 | if (ret == -ENOLINK) { | 1342 | if (ret) { |
| 1343 | brcmf_dbg(ERROR, "dongle is not responding\n"); | 1343 | brcmf_dbg(ERROR, "dongle is not responding\n"); |
| 1344 | brcmf_detach(dev); | 1344 | brcmf_detach(dev); |
| 1345 | goto fail; | 1345 | goto fail; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index c1abaa6db59e..411dfe7c7ff0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
| @@ -3972,7 +3972,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, | |||
| 3972 | u8 *iovar_ie_buf; | 3972 | u8 *iovar_ie_buf; |
| 3973 | u8 *curr_ie_buf; | 3973 | u8 *curr_ie_buf; |
| 3974 | u8 *mgmt_ie_buf = NULL; | 3974 | u8 *mgmt_ie_buf = NULL; |
| 3975 | u32 mgmt_ie_buf_len = 0; | 3975 | int mgmt_ie_buf_len; |
| 3976 | u32 *mgmt_ie_len = 0; | 3976 | u32 *mgmt_ie_len = 0; |
| 3977 | u32 del_add_ie_buf_len = 0; | 3977 | u32 del_add_ie_buf_len = 0; |
| 3978 | u32 total_ie_buf_len = 0; | 3978 | u32 total_ie_buf_len = 0; |
| @@ -3982,7 +3982,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, | |||
| 3982 | struct parsed_vndr_ie_info *vndrie_info; | 3982 | struct parsed_vndr_ie_info *vndrie_info; |
| 3983 | s32 i; | 3983 | s32 i; |
| 3984 | u8 *ptr; | 3984 | u8 *ptr; |
| 3985 | u32 remained_buf_len; | 3985 | int remained_buf_len; |
| 3986 | 3986 | ||
| 3987 | WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag); | 3987 | WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag); |
| 3988 | iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); | 3988 | iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); |
| @@ -4606,12 +4606,13 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, | |||
| 4606 | struct brcmf_cfg80211_profile *profile = cfg->profile; | 4606 | struct brcmf_cfg80211_profile *profile = cfg->profile; |
| 4607 | struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); | 4607 | struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); |
| 4608 | struct wiphy *wiphy = cfg_to_wiphy(cfg); | 4608 | struct wiphy *wiphy = cfg_to_wiphy(cfg); |
| 4609 | struct brcmf_channel_info_le channel_le; | 4609 | struct ieee80211_channel *notify_channel = NULL; |
| 4610 | struct ieee80211_channel *notify_channel; | ||
| 4611 | struct ieee80211_supported_band *band; | 4610 | struct ieee80211_supported_band *band; |
| 4611 | struct brcmf_bss_info_le *bi; | ||
| 4612 | u32 freq; | 4612 | u32 freq; |
| 4613 | s32 err = 0; | 4613 | s32 err = 0; |
| 4614 | u32 target_channel; | 4614 | u32 target_channel; |
| 4615 | u8 *buf; | ||
| 4615 | 4616 | ||
| 4616 | WL_TRACE("Enter\n"); | 4617 | WL_TRACE("Enter\n"); |
| 4617 | 4618 | ||
| @@ -4619,11 +4620,22 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, | |||
| 4619 | memcpy(profile->bssid, e->addr, ETH_ALEN); | 4620 | memcpy(profile->bssid, e->addr, ETH_ALEN); |
| 4620 | brcmf_update_bss_info(cfg); | 4621 | brcmf_update_bss_info(cfg); |
| 4621 | 4622 | ||
| 4622 | brcmf_exec_dcmd(ndev, BRCMF_C_GET_CHANNEL, &channel_le, | 4623 | buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL); |
| 4623 | sizeof(channel_le)); | 4624 | if (buf == NULL) { |
| 4625 | err = -ENOMEM; | ||
| 4626 | goto done; | ||
| 4627 | } | ||
| 4628 | |||
| 4629 | /* data sent to dongle has to be little endian */ | ||
| 4630 | *(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX); | ||
| 4631 | err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX); | ||
| 4632 | |||
| 4633 | if (err) | ||
| 4634 | goto done; | ||
| 4624 | 4635 | ||
| 4625 | target_channel = le32_to_cpu(channel_le.target_channel); | 4636 | bi = (struct brcmf_bss_info_le *)(buf + 4); |
| 4626 | WL_CONN("Roamed to channel %d\n", target_channel); | 4637 | target_channel = bi->ctl_ch ? bi->ctl_ch : |
| 4638 | CHSPEC_CHANNEL(le16_to_cpu(bi->chanspec)); | ||
| 4627 | 4639 | ||
| 4628 | if (target_channel <= CH_MAX_2G_CHANNEL) | 4640 | if (target_channel <= CH_MAX_2G_CHANNEL) |
| 4629 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 4641 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; |
| @@ -4633,6 +4645,8 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, | |||
| 4633 | freq = ieee80211_channel_to_frequency(target_channel, band->band); | 4645 | freq = ieee80211_channel_to_frequency(target_channel, band->band); |
| 4634 | notify_channel = ieee80211_get_channel(wiphy, freq); | 4646 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| 4635 | 4647 | ||
| 4648 | done: | ||
| 4649 | kfree(buf); | ||
| 4636 | cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid, | 4650 | cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid, |
| 4637 | conn_info->req_ie, conn_info->req_ie_len, | 4651 | conn_info->req_ie, conn_info->req_ie_len, |
| 4638 | conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); | 4652 | conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); |
| @@ -5186,41 +5200,6 @@ brcmf_cfg80211_event(struct net_device *ndev, | |||
| 5186 | schedule_work(&cfg->event_work); | 5200 | schedule_work(&cfg->event_work); |
| 5187 | } | 5201 | } |
| 5188 | 5202 | ||
| 5189 | static s32 brcmf_dongle_mode(struct net_device *ndev, s32 iftype) | ||
| 5190 | { | ||
| 5191 | s32 infra = 0; | ||
| 5192 | s32 err = 0; | ||
| 5193 | |||
| 5194 | switch (iftype) { | ||
| 5195 | case NL80211_IFTYPE_MONITOR: | ||
| 5196 | case NL80211_IFTYPE_WDS: | ||
| 5197 | WL_ERR("type (%d) : currently we do not support this mode\n", | ||
| 5198 | iftype); | ||
| 5199 | err = -EINVAL; | ||
| 5200 | return err; | ||
| 5201 | case NL80211_IFTYPE_ADHOC: | ||
| 5202 | infra = 0; | ||
| 5203 | break; | ||
| 5204 | case NL80211_IFTYPE_STATION: | ||
| 5205 | infra = 1; | ||
| 5206 | break; | ||
| 5207 | case NL80211_IFTYPE_AP: | ||
| 5208 | infra = 1; | ||
| 5209 | break; | ||
| 5210 | default: | ||
| 5211 | err = -EINVAL; | ||
| 5212 | WL_ERR("invalid type (%d)\n", iftype); | ||
| 5213 | return err; | ||
| 5214 | } | ||
| 5215 | err = brcmf_exec_dcmd_u32(ndev, BRCMF_C_SET_INFRA, &infra); | ||
| 5216 | if (err) { | ||
| 5217 | WL_ERR("WLC_SET_INFRA error (%d)\n", err); | ||
| 5218 | return err; | ||
| 5219 | } | ||
| 5220 | |||
