aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bcma/main.c5
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c68
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/devices.c39
5 files changed, 53 insertions, 63 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 7f473cf0469e..a9718893000b 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -170,9 +170,10 @@ static int bcma_register_cores(struct bcma_bus *bus)
170 170
171static void bcma_unregister_cores(struct bcma_bus *bus) 171static void bcma_unregister_cores(struct bcma_bus *bus)
172{ 172{
173 struct bcma_device *core; 173 struct bcma_device *core, *tmp;
174 174
175 list_for_each_entry(core, &bus->cores, list) { 175 list_for_each_entry_safe(core, tmp, &bus->cores, list) {
176 list_del(&core->list);
176 if (core->dev_registered) 177 if (core->dev_registered)
177 device_unregister(&core->dev); 178 device_unregister(&core->dev);
178 } 179 }
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 b27e245c2a11..fdbfa204e5d2 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; 3975 int mgmt_ie_buf_len;
3976 u32 *mgmt_ie_len; 3976 u32 *mgmt_ie_len;
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);
@@ -4605,12 +4605,13 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
4605 struct brcmf_cfg80211_profile *profile = cfg->profile; 4605 struct brcmf_cfg80211_profile *profile = cfg->profile;
4606 struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); 4606 struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
4607 struct wiphy *wiphy = cfg_to_wiphy(cfg); 4607 struct wiphy *wiphy = cfg_to_wiphy(cfg);
4608 struct brcmf_channel_info_le channel_le; 4608 struct ieee80211_channel *notify_channel = NULL;
4609 struct ieee80211_channel *notify_channel;
4610 struct ieee80211_supported_band *band; 4609 struct ieee80211_supported_band *band;
4610 struct brcmf_bss_info_le *bi;
4611 u32 freq; 4611 u32 freq;
4612 s32 err = 0; 4612 s32 err = 0;
4613 u32 target_channel; 4613 u32 target_channel;
4614 u8 *buf;
4614 4615
4615 WL_TRACE("Enter\n"); 4616 WL_TRACE("Enter\n");
4616 4617
@@ -4618,11 +4619,22 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
4618 memcpy(profile->bssid, e->addr, ETH_ALEN); 4619 memcpy(profile->bssid, e->addr, ETH_ALEN);
4619 brcmf_update_bss_info(cfg); 4620 brcmf_update_bss_info(cfg);
4620 4621
4621 brcmf_exec_dcmd(ndev, BRCMF_C_GET_CHANNEL, &channel_le, 4622 buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL);
4622 sizeof(channel_le)); 4623 if (buf == NULL) {
4624 err = -ENOMEM;
4625 goto done;
4626 }
4627
4628 /* data sent to dongle has to be little endian */
4629 *(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);
4630 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX);
4631
4632 if (err)
4633 goto done;
4623 4634
4624 target_channel = le32_to_cpu(channel_le.target_channel); 4635 bi = (struct brcmf_bss_info_le *)(buf + 4);
4625 WL_CONN("Roamed to channel %d\n", target_channel); 4636 target_channel = bi->ctl_ch ? bi->ctl_ch :
4637 CHSPEC_CHANNEL(le16_to_cpu(bi->chanspec));
4626 4638
4627 if (target_channel <= CH_MAX_2G_CHANNEL) 4639 if (target_channel <= CH_MAX_2G_CHANNEL)
4628 band = wiphy->bands[IEEE80211_BAND_2GHZ]; 4640 band = wiphy->bands[IEEE80211_BAND_2GHZ];
@@ -4632,6 +4644,8 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
4632 freq = ieee80211_channel_to_frequency(target_channel, band->band); 4644 freq = ieee80211_channel_to_frequency(target_channel, band->band);
4633 notify_channel = ieee80211_get_channel(wiphy, freq); 4645 notify_channel = ieee80211_get_channel(wiphy, freq);
4634 4646
4647done:
4648 kfree(buf);
4635 cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid, 4649 cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
4636 conn_info->req_ie, conn_info->req_ie_len, 4650 conn_info->req_ie, conn_info->req_ie_len,
4637 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL); 4651 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
@@ -5185,41 +5199,6 @@ brcmf_cfg80211_event(struct net_device *ndev,
5185 schedule_work(&cfg->event_work); 5199 schedule_work(&cfg->event_work);
5186} 5200}
5187 5201
5188static s32 brcmf_dongle_mode(struct net_device *ndev, s32 iftype)
5189{
5190 s32 infra = 0;
5191 s32 err = 0;
5192
5193 switch (iftype) {
5194 case NL80211_IFTYPE_MONITOR:
5195 case NL80211_IFTYPE_WDS:
5196 WL_ERR("type (%d) : currently we do not support this mode\n",
5197 iftype);
5198 err = -EINVAL;
5199 return err;
5200 case NL80211_IFTYPE_ADHOC:
5201 infra = 0;
5202 break;
5203 case NL80211_IFTYPE_STATION:
5204 infra = 1;
5205 break;
5206 case NL80211_IFTYPE_AP:
5207 infra = 1;
5208 break;
5209 default:
5210 err = -EINVAL;
5211 WL_ERR("invalid type (%d)\n", iftype);
5212 return err;
5213 }
5214 err = brcmf_exec_dcmd_u32(ndev, BRCMF_C_SET_INFRA, &infra);
5215 if (err) {
5216 WL_ERR("WLC_SET_INFRA error (%d)\n", err);
5217 return err;
5218 }
5219
5220 return 0;
5221}
5222
5223static s32 brcmf_dongle_eventmsg(struct net_device *ndev) 5202static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
5224{ 5203{
5225 /* Room for "event_msgs" + '\0' + bitvec */ 5204 /* Room for "event_msgs" + '\0' + bitvec */
@@ -5438,7 +5417,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
5438 WL_BEACON_TIMEOUT); 5417 WL_BEACON_TIMEOUT);
5439 if (err) 5418 if (err)
5440 goto default_conf_out; 5419 goto default_conf_out;
5441 err = brcmf_dongle_mode(ndev, wdev->iftype); 5420 err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype,
5421 NULL, NULL);
5442 if (err && err != -EINPROGRESS) 5422 if (err && err != -EINPROGRESS)
5443 goto default_conf_out; 5423 goto default_conf_out;
5444 err = brcmf_dongle_probecap(cfg); 5424 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
576struct iwl_lib_ops iwl6000_lib = { 585struct iwl_lib_ops iwl6000_lib = {