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 /drivers | |
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>
Diffstat (limited to 'drivers')
-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 |
5 files changed, 53 insertions, 63 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 | |||
5221 | return 0; | ||
5222 | } | ||
5223 | |||
5224 | static s32 brcmf_dongle_eventmsg(struct net_device *ndev) | 5203 | static s32 brcmf_dongle_eventmsg(struct net_device *ndev) |
5225 | { | 5204 | { |
5226 | /* Room for "event_msgs" + '\0' + bitvec */ | 5205 | /* Room for "event_msgs" + '\0' + bitvec */ |
@@ -5439,7 +5418,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg) | |||
5439 | WL_BEACON_TIMEOUT); | 5418 | WL_BEACON_TIMEOUT); |
5440 | if (err) | 5419 | if (err) |
5441 | goto default_conf_out; | 5420 | goto default_conf_out; |
5442 | err = brcmf_dongle_mode(ndev, wdev->iftype); | 5421 | err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype, |
5422 | NULL, NULL); | ||
5443 | if (err && err != -EINPROGRESS) | 5423 | if (err && err != -EINPROGRESS) |
5444 | goto default_conf_out; | 5424 | goto default_conf_out; |
5445 | err = brcmf_dongle_probecap(cfg); | 5425 | err = brcmf_dongle_probecap(cfg); |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 935120fc8c93..768bf612533e 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -10472,7 +10472,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, | |||
10472 | } else | 10472 | } else |
10473 | len = src->len; | 10473 | len = src->len; |
10474 | 10474 | ||
10475 | dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC); | 10475 | dst = alloc_skb(len + sizeof(*rt_hdr) + sizeof(u16)*2, GFP_ATOMIC); |
10476 | if (!dst) | 10476 | if (!dst) |
10477 | continue; | 10477 | continue; |
10478 | 10478 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c index 349c205d5f62..da5862064195 100644 --- a/drivers/net/wireless/iwlwifi/dvm/devices.c +++ b/drivers/net/wireless/iwlwifi/dvm/devices.c | |||
@@ -518,7 +518,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
518 | * See iwlagn_mac_channel_switch. | 518 | * See iwlagn_mac_channel_switch. |
519 | */ | 519 | */ |
520 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 520 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
521 | struct iwl6000_channel_switch_cmd cmd; | 521 | struct iwl6000_channel_switch_cmd *cmd; |
522 | u32 switch_time_in_usec, ucode_switch_time; | 522 | u32 switch_time_in_usec, ucode_switch_time; |
523 | u16 ch; | 523 | u16 ch; |
524 | u32 tsf_low; | 524 | u32 tsf_low; |
@@ -527,18 +527,25 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
527 | struct ieee80211_vif *vif = ctx->vif; | 527 | struct ieee80211_vif *vif = ctx->vif; |
528 | struct iwl_host_cmd hcmd = { | 528 | struct iwl_host_cmd hcmd = { |
529 | .id = REPLY_CHANNEL_SWITCH, | 529 | .id = REPLY_CHANNEL_SWITCH, |
530 | .len = { sizeof(cmd), }, | 530 | .len = { sizeof(*cmd), }, |
531 | .flags = CMD_SYNC, | 531 | .flags = CMD_SYNC, |
532 | .data = { &cmd, }, | 532 | .dataflags[0] = IWL_HCMD_DFL_NOCOPY, |
533 | }; | 533 | }; |
534 | int err; | ||
534 | 535 | ||
535 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | 536 | cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); |
537 | if (!cmd) | ||
538 | return -ENOMEM; | ||
539 | |||
540 | hcmd.data[0] = cmd; | ||
541 | |||
542 | cmd->band = priv->band == IEEE80211_BAND_2GHZ; | ||
536 | ch = ch_switch->channel->hw_value; | 543 | ch = ch_switch->channel->hw_value; |
537 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", | 544 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
538 | ctx->active.channel, ch); | 545 | ctx->active.channel, ch); |
539 | cmd.channel = cpu_to_le16(ch); | 546 | cmd->channel = cpu_to_le16(ch); |
540 | cmd.rxon_flags = ctx->staging.flags; | 547 | cmd->rxon_flags = ctx->staging.flags; |
541 | cmd.rxon_filter_flags = ctx->staging.filter_flags; | 548 | cmd->rxon_filter_flags = ctx->staging.filter_flags; |
542 | switch_count = ch_switch->count; | 549 | switch_count = ch_switch->count; |
543 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | 550 | tsf_low = ch_switch->timestamp & 0x0ffffffff; |
544 | /* | 551 | /* |
@@ -554,23 +561,25 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
554 | switch_count = 0; | 561 | switch_count = 0; |
555 | } | 562 | } |
556 | if (switch_count <= 1) | 563 | if (switch_count <= 1) |
557 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); | 564 | cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time); |
558 | else { | 565 | else { |
559 | switch_time_in_usec = | 566 | switch_time_in_usec = |
560 | vif->bss_conf.beacon_int * switch_count * TIME_UNIT; | 567 | vif->bss_conf.beacon_int * switch_count * TIME_UNIT; |
561 | ucode_switch_time = iwl_usecs_to_beacons(priv, | 568 | ucode_switch_time = iwl_usecs_to_beacons(priv, |
562 | switch_time_in_usec, | 569 | switch_time_in_usec, |
563 | beacon_interval); | 570 | beacon_interval); |
564 | cmd.switch_time = iwl_add_beacon_time(priv, | 571 | cmd->switch_time = iwl_add_beacon_time(priv, |
565 | priv->ucode_beacon_time, | 572 | priv->ucode_beacon_time, |
566 | ucode_switch_time, | 573 | ucode_switch_time, |
567 | beacon_interval); | 574 | beacon_interval); |
568 | } | 575 | } |
569 | IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", | 576 | IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", |
570 | cmd.switch_time); | 577 | cmd->switch_time); |
571 | cmd.expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; | 578 | cmd->expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR; |
572 | 579 | ||
573 | return iwl_dvm_send_cmd(priv, &hcmd); | 580 | err = iwl_dvm_send_cmd(priv, &hcmd); |
581 | kfree(cmd); | ||
582 | return err; | ||
574 | } | 583 | } |
575 | 584 | ||
576 | struct iwl_lib_ops iwl6000_lib = { | 585 | struct iwl_lib_ops iwl6000_lib = { |