aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-02 02:47:33 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-02 02:47:33 -0400
commiteb608d2b99d993a4b4ee9cb70e6cf66f96bb1168 (patch)
tree0f6dfa1dd1616bed670de8b0bed540a37adfa66f /drivers/net
parentb758858c5ceb1b30ae7d04dea6c74821bd7c7d69 (diff)
parentf9fa39e9ace5a8abbe9597c2970828ced67261da (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== pull request: wireless 2014-06-27 Please pull the following batch of fixes for the 3.16 stream... For the mac80211 bits, Johannes says: "We have a fix from Eliad for a time calculation, a fix from Max for head/tailroom when sending authentication packets, a revert that Felix requested since the patch in question broke regulatory and a fix from myself for an issue with a new command that we advertised in the wrong place." For the bluetooth bits, Gustavo says: "A few fixes for 3.16. This pull request contains a NULL dereference fix, and some security/pairing fixes." For the iwlwifi bits, Emmanuel says: "I have here a fix from Eliad for scheduled scan: it fixes a firmware assertion. Arik reverts a patch I made that didn't take into account that 3160 doesn't have UAPSD and hence, we can't assume that all newer firmwares support the feature. Here too, the visible effect is a firmware assertion. Along with that, we have a few fixes and additions to the device list." For the ath10k bits, Kalle says: "Bartosz fixed an issue where we were not able to create 8 vdevs when using DFS. Michal removed a false warning which was just confusing people." On top of that... Arend van Spriel fixes a 'divide by zero' regression in brcmfmac. Amitkumar Karwar corrects a transmit timeout in mwifiex. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/core.c6
-rw-r--r--drivers/net/wireless/ath/ath10k/htt_rx.c18
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c7
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c65
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c3
-rw-r--r--drivers/net/wireless/mwifiex/main.c1
8 files changed, 38 insertions, 68 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 82017f56e661..e6c56c5bb0f6 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -795,7 +795,11 @@ int ath10k_core_start(struct ath10k *ar)
795 if (status) 795 if (status)
796 goto err_htc_stop; 796 goto err_htc_stop;
797 797
798 ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1; 798 if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
799 ar->free_vdev_map = (1 << TARGET_10X_NUM_VDEVS) - 1;
800 else
801 ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1;
802
799 INIT_LIST_HEAD(&ar->arvifs); 803 INIT_LIST_HEAD(&ar->arvifs);
800 804
801 if (!test_bit(ATH10K_FLAG_FIRST_BOOT_DONE, &ar->dev_flags)) 805 if (!test_bit(ATH10K_FLAG_FIRST_BOOT_DONE, &ar->dev_flags))
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 6c102b1312ff..eebc860c3655 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -312,7 +312,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
312 int msdu_len, msdu_chaining = 0; 312 int msdu_len, msdu_chaining = 0;
313 struct sk_buff *msdu; 313 struct sk_buff *msdu;
314 struct htt_rx_desc *rx_desc; 314 struct htt_rx_desc *rx_desc;
315 bool corrupted = false;
316 315
317 lockdep_assert_held(&htt->rx_ring.lock); 316 lockdep_assert_held(&htt->rx_ring.lock);
318 317
@@ -439,9 +438,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
439 last_msdu = __le32_to_cpu(rx_desc->msdu_end.info0) & 438 last_msdu = __le32_to_cpu(rx_desc->msdu_end.info0) &
440 RX_MSDU_END_INFO0_LAST_MSDU; 439 RX_MSDU_END_INFO0_LAST_MSDU;
441 440
442 if (msdu_chaining && !last_msdu)
443 corrupted = true;
444
445 if (last_msdu) { 441 if (last_msdu) {
446 msdu->next = NULL; 442 msdu->next = NULL;
447 break; 443 break;
@@ -457,20 +453,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
457 msdu_chaining = -1; 453 msdu_chaining = -1;
458 454
459 /* 455 /*
460 * Apparently FW sometimes reports weird chained MSDU sequences with
461 * more than one rx descriptor. This seems like a bug but needs more
462 * analyzing. For the time being fix it by dropping such sequences to
463 * avoid blowing up the host system.
464 */
465 if (corrupted) {
466 ath10k_warn("failed to pop chained msdus, dropping\n");
467 ath10k_htt_rx_free_msdu_chain(*head_msdu);
468 *head_msdu = NULL;
469 *tail_msdu = NULL;
470 msdu_chaining = -EINVAL;
471 }
472
473 /*
474 * Don't refill the ring yet. 456 * Don't refill the ring yet.
475 * 457 *
476 * First, the elements popped here are still in use - it is not 458 * First, the elements popped here are still in use - it is not
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 6db51a666f61..d06fcb05adf2 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -1184,8 +1184,6 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
1184 bus->bus_priv.usb = bus_pub; 1184 bus->bus_priv.usb = bus_pub;
1185 dev_set_drvdata(dev, bus); 1185 dev_set_drvdata(dev, bus);
1186 bus->ops = &brcmf_usb_bus_ops; 1186 bus->ops = &brcmf_usb_bus_ops;
1187 bus->chip = bus_pub->devid;
1188 bus->chiprev = bus_pub->chiprev;
1189 bus->proto_type = BRCMF_PROTO_BCDC; 1187 bus->proto_type = BRCMF_PROTO_BCDC;
1190 bus->always_use_fws_queue = true; 1188 bus->always_use_fws_queue = true;
1191 1189
@@ -1194,6 +1192,9 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
1194 if (ret) 1192 if (ret)
1195 goto fail; 1193 goto fail;
1196 } 1194 }
1195 bus->chip = bus_pub->devid;
1196 bus->chiprev = bus_pub->chiprev;
1197
1197 /* request firmware here */ 1198 /* request firmware here */
1198 brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), NULL, 1199 brcmf_fw_get_firmwares(dev, 0, brcmf_usb_get_fwname(devinfo), NULL,
1199 brcmf_usb_probe_phase2); 1200 brcmf_usb_probe_phase2);
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h
index 0aa7c0085c9f..b1a33322b9ba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@ -88,6 +88,7 @@
88 * P2P client interfaces simultaneously if they are in different bindings. 88 * P2P client interfaces simultaneously if they are in different bindings.
89 * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_SCM: support power save on BSS station and 89 * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_SCM: support power save on BSS station and
90 * P2P client interfaces simultaneously if they are in same bindings. 90 * P2P client interfaces simultaneously if they are in same bindings.
91 * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD
91 * @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save 92 * @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save
92 * @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering. 93 * @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering.
93 * @IWL_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients 94 * @IWL_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 7215f5980186..1cef708cb74d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -303,6 +303,13 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
303 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; 303 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP;
304 } 304 }
305 305
306 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT &&
307 !iwlwifi_mod_params.uapsd_disable) {
308 hw->flags |= IEEE80211_HW_SUPPORTS_UAPSD;
309 hw->uapsd_queues = IWL_UAPSD_AC_INFO;
310 hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP;
311 }
312
306 hw->sta_data_size = sizeof(struct iwl_mvm_sta); 313 hw->sta_data_size = sizeof(struct iwl_mvm_sta);
307 hw->vif_data_size = sizeof(struct iwl_mvm_vif); 314 hw->vif_data_size = sizeof(struct iwl_mvm_vif);
308 hw->chanctx_data_size = sizeof(u16); 315 hw->chanctx_data_size = sizeof(u16);
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 4b6c7d4bd199..eac2b424f6a0 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -588,9 +588,7 @@ static void iwl_build_scan_cmd(struct iwl_mvm *mvm,
588 struct iwl_scan_offload_cmd *scan, 588 struct iwl_scan_offload_cmd *scan,
589 struct iwl_mvm_scan_params *params) 589 struct iwl_mvm_scan_params *params)
590{ 590{
591 scan->channel_count = 591 scan->channel_count = req->n_channels;
592 mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels +
593 mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
594 scan->quiet_time = cpu_to_le16(IWL_ACTIVE_QUIET_TIME); 592 scan->quiet_time = cpu_to_le16(IWL_ACTIVE_QUIET_TIME);
595 scan->quiet_plcp_th = cpu_to_le16(IWL_PLCP_QUIET_THRESH); 593 scan->quiet_plcp_th = cpu_to_le16(IWL_PLCP_QUIET_THRESH);
596 scan->good_CRC_th = IWL_GOOD_CRC_TH_DEFAULT; 594 scan->good_CRC_th = IWL_GOOD_CRC_TH_DEFAULT;
@@ -669,61 +667,37 @@ static void iwl_build_channel_cfg(struct iwl_mvm *mvm,
669 struct cfg80211_sched_scan_request *req, 667 struct cfg80211_sched_scan_request *req,
670 struct iwl_scan_channel_cfg *channels, 668 struct iwl_scan_channel_cfg *channels,
671 enum ieee80211_band band, 669 enum ieee80211_band band,
672 int *head, int *tail, 670 int *head,
673 u32 ssid_bitmap, 671 u32 ssid_bitmap,
674 struct iwl_mvm_scan_params *params) 672 struct iwl_mvm_scan_params *params)
675{ 673{
676 struct ieee80211_supported_band *s_band; 674 int i, index = 0;
677 int n_channels = req->n_channels;
678 int i, j, index = 0;
679 bool partial;
680 675
681 /* 676 for (i = 0; i < req->n_channels; i++) {
682 * We have to configure all supported channels, even if we don't want to 677 struct ieee80211_channel *chan = req->channels[i];
683 * scan on them, but we have to send channels in the order that we want 678
684 * to scan. So add requested channels to head of the list and others to 679 if (chan->band != band)
685 * the end. 680 continue;
686 */ 681
687 s_band = &mvm->nvm_data->bands[band]; 682 index = *head;
688 683 (*head)++;
689 for (i = 0; i < s_band->n_channels && *head <= *tail; i++) { 684
690 partial = false; 685 channels->channel_number[index] = cpu_to_le16(chan->hw_value);
691 for (j = 0; j < n_channels; j++)
692 if (s_band->channels[i].center_freq ==
693 req->channels[j]->center_freq) {
694 index = *head;
695 (*head)++;
696 /*
697 * Channels that came with the request will be
698 * in partial scan .
699 */
700 partial = true;
701 break;
702 }
703 if (!partial) {
704 index = *tail;
705 (*tail)--;
706 }
707 channels->channel_number[index] =
708 cpu_to_le16(ieee80211_frequency_to_channel(
709 s_band->channels[i].center_freq));
710 channels->dwell_time[index][0] = params->dwell[band].active; 686 channels->dwell_time[index][0] = params->dwell[band].active;
711 channels->dwell_time[index][1] = params->dwell[band].passive; 687 channels->dwell_time[index][1] = params->dwell[band].passive;
712 688
713 channels->iter_count[index] = cpu_to_le16(1); 689 channels->iter_count[index] = cpu_to_le16(1);
714 channels->iter_interval[index] = 0; 690 channels->iter_interval[index] = 0;
715 691
716 if (!(s_band->channels[i].flags & IEEE80211_CHAN_NO_IR)) 692 if (!(chan->flags & IEEE80211_CHAN_NO_IR))
717 channels->type[index] |= 693 channels->type[index] |=
718 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_ACTIVE); 694 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_ACTIVE);
719 695
720 channels->type[index] |= 696 channels->type[index] |=
721 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_FULL); 697 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_FULL |
722 if (partial) 698 IWL_SCAN_OFFLOAD_CHANNEL_PARTIAL);
723 channels->type[index] |=
724 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_PARTIAL);
725 699
726 if (s_band->channels[i].flags & IEEE80211_CHAN_NO_HT40) 700 if (chan->flags & IEEE80211_CHAN_NO_HT40)
727 channels->type[index] |= 701 channels->type[index] |=
728 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_NARROW); 702 cpu_to_le32(IWL_SCAN_OFFLOAD_CHANNEL_NARROW);
729 703
@@ -740,7 +714,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
740 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; 714 int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels;
741 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; 715 int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
742 int head = 0; 716 int head = 0;
743 int tail = band_2ghz + band_5ghz - 1;
744 u32 ssid_bitmap; 717 u32 ssid_bitmap;
745 int cmd_len; 718 int cmd_len;
746 int ret; 719 int ret;
@@ -772,7 +745,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
772 &scan_cfg->scan_cmd.tx_cmd[0], 745 &scan_cfg->scan_cmd.tx_cmd[0],
773 scan_cfg->data); 746 scan_cfg->data);
774 iwl_build_channel_cfg(mvm, req, &scan_cfg->channel_cfg, 747 iwl_build_channel_cfg(mvm, req, &scan_cfg->channel_cfg,
775 IEEE80211_BAND_2GHZ, &head, &tail, 748 IEEE80211_BAND_2GHZ, &head,
776 ssid_bitmap, &params); 749 ssid_bitmap, &params);
777 } 750 }
778 if (band_5ghz) { 751 if (band_5ghz) {
@@ -782,7 +755,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
782 scan_cfg->data + 755 scan_cfg->data +
783 SCAN_OFFLOAD_PROBE_REQ_SIZE); 756 SCAN_OFFLOAD_PROBE_REQ_SIZE);
784 iwl_build_channel_cfg(mvm, req, &scan_cfg->channel_cfg, 757 iwl_build_channel_cfg(mvm, req, &scan_cfg->channel_cfg,
785 IEEE80211_BAND_5GHZ, &head, &tail, 758 IEEE80211_BAND_5GHZ, &head,
786 ssid_bitmap, &params); 759 ssid_bitmap, &params);
787 } 760 }
788 761
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 7091a18d5a72..98950e45c7b0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -367,6 +367,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
367 {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)}, 367 {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
368 {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)}, 368 {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)},
369 {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, 369 {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
370 {IWL_PCI_DEVICE(0x095A, 0x5510, iwl7265_2ac_cfg)},
370 {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)}, 371 {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
371 {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, 372 {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
372 {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, 373 {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
@@ -380,7 +381,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
380 {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)}, 381 {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
381 {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)}, 382 {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)},
382 {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, 383 {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
383 {IWL_PCI_DEVICE(0x095A, 0x9200, iwl7265_2ac_cfg)}, 384 {IWL_PCI_DEVICE(0x095B, 0x9200, iwl7265_2ac_cfg)},
384 {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)}, 385 {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)},
385 {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)}, 386 {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)},
386 {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, 387 {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index cbabc12fbda3..e91cd0fa5ca8 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -645,6 +645,7 @@ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
645 } 645 }
646 646
647 tx_info = MWIFIEX_SKB_TXCB(skb); 647 tx_info = MWIFIEX_SKB_TXCB(skb);
648 memset(tx_info, 0, sizeof(*tx_info));
648 tx_info->bss_num = priv->bss_num; 649 tx_info->bss_num = priv->bss_num;
649 tx_info->bss_type = priv->bss_type; 650 tx_info->bss_type = priv->bss_type;
650 tx_info->pkt_len = skb->len; 651 tx_info->pkt_len = skb->len;