aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/rxon.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c5
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c19
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c65
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c3
6 files changed, 37 insertions, 68 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c
index ed50de6362ed..6dc5dd3ced44 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rxon.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c
@@ -1068,13 +1068,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
1068 /* recalculate basic rates */ 1068 /* recalculate basic rates */
1069 iwl_calc_basic_rates(priv, ctx); 1069 iwl_calc_basic_rates(priv, ctx);
1070 1070
1071 /*
1072 * force CTS-to-self frames protection if RTS-CTS is not preferred
1073 * one aggregation protection method
1074 */
1075 if (!priv->hw_params.use_rts_for_aggregation)
1076 ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
1077
1078 if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) || 1071 if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
1079 !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK)) 1072 !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK))
1080 ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK; 1073 ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
@@ -1480,11 +1473,6 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
1480 else 1473 else
1481 ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 1474 ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
1482 1475
1483 if (bss_conf->use_cts_prot)
1484 ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
1485 else
1486 ctx->staging.flags &= ~RXON_FLG_SELF_CTS_EN;
1487
1488 memcpy(ctx->staging.bssid_addr, bss_conf->bssid, ETH_ALEN); 1476 memcpy(ctx->staging.bssid_addr, bss_conf->bssid, ETH_ALEN);
1489 1477
1490 if (vif->type == NL80211_IFTYPE_AP || 1478 if (vif->type == NL80211_IFTYPE_AP ||
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/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 8b5302777632..725ba49576bf 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -667,10 +667,9 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
667 if (vif->bss_conf.qos) 667 if (vif->bss_conf.qos)
668 cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA); 668 cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA);
669 669
670 if (vif->bss_conf.use_cts_prot) { 670 if (vif->bss_conf.use_cts_prot)
671 cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT); 671 cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT);
672 cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_SELF_CTS_EN); 672
673 }
674 IWL_DEBUG_RATE(mvm, "use_cts_prot %d, ht_operation_mode %d\n", 673 IWL_DEBUG_RATE(mvm, "use_cts_prot %d, ht_operation_mode %d\n",
675 vif->bss_conf.use_cts_prot, 674 vif->bss_conf.use_cts_prot,
676 vif->bss_conf.ht_operation_mode); 675 vif->bss_conf.ht_operation_mode);
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 7215f5980186..9bfb90680cdc 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);
@@ -1159,8 +1166,12 @@ static void iwl_mvm_bcast_filter_iterator(void *_data, u8 *mac,
1159 1166
1160 bcast_mac = &cmd->macs[mvmvif->id]; 1167 bcast_mac = &cmd->macs[mvmvif->id];
1161 1168
1162 /* enable filtering only for associated stations */ 1169 /*
1163 if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc) 1170 * enable filtering only for associated stations, but not for P2P
1171 * Clients
1172 */
1173 if (vif->type != NL80211_IFTYPE_STATION || vif->p2p ||
1174 !vif->bss_conf.assoc)
1164 return; 1175 return;
1165 1176
1166 bcast_mac->default_discard = 1; 1177 bcast_mac->default_discard = 1;
@@ -1237,10 +1248,6 @@ static int iwl_mvm_configure_bcast_filter(struct iwl_mvm *mvm,
1237 if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BCAST_FILTERING)) 1248 if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BCAST_FILTERING))
1238 return 0; 1249 return 0;
1239 1250
1240 /* bcast filtering isn't supported for P2P client */
1241 if (vif->p2p)
1242 return 0;
1243
1244 if (!iwl_mvm_bcast_filter_build_cmd(mvm, &cmd)) 1251 if (!iwl_mvm_bcast_filter_build_cmd(mvm, &cmd))
1245 return 0; 1252 return 0;
1246 1253
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)},