diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-15 13:19:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-15 13:19:14 -0400 |
commit | 0a6f04184d3d9c21cb6aa12140732aac6930922a (patch) | |
tree | cbb22e8c7c52d59523775cf9e50d4e5bfdf3f295 | |
parent | d624d276d1ddacbcb12ad96832ce0c7b82cd25db (diff) | |
parent | e9bf53ab1ee34bb05c104bbfd2b77c844773f8e6 (diff) |
Merge tag 'wireless-drivers-for-davem-2017-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says:
====================
wireless-drivers fixes for 4.13
This time quite a few fixes for iwlwifi and one major regression fix
for brcmfmac. For the iwlwifi aggregation bug a small change was
needed for mac80211, but as Johannes is still away the mac80211 patch
is taken via wireless-drivers tree.
brcmfmac
* fix firmware crash (a recent regression in bcm4343{0,1,8}
iwlwifi
* Some simple PCI HW ID fix-ups and additions for family 9000
* Remove a bogus warning message with new FWs (bug #196915)
* Don't allow illegal channel options to be used (bug #195299)
* A fix for checksum offload in family 9000
* A fix serious throughput degradation in 11ac with multiple streams
* An old bug in SMPS where the firmware was not aware of SMPS changes
* Fix a memory leak in the SAR code
* Fix a stuck queue case in AP mode;
* Convert a WARN to a simple debug in a legitimate race case (from
which we can recover)
* Fix a severe throughput aggregation on 9000-family devices due to
aggregation issues, needed a small change in mac80211
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-config.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 20 | ||||
-rw-r--r-- | include/net/mac80211.h | 15 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 22 |
15 files changed, 126 insertions, 40 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c index d21258d277ce..f1b60740e020 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | |||
@@ -159,8 +159,10 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) | |||
159 | 159 | ||
160 | brcmf_feat_firmware_capabilities(ifp); | 160 | brcmf_feat_firmware_capabilities(ifp); |
161 | memset(&gscan_cfg, 0, sizeof(gscan_cfg)); | 161 | memset(&gscan_cfg, 0, sizeof(gscan_cfg)); |
162 | brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg", | 162 | if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID) |
163 | &gscan_cfg, sizeof(gscan_cfg)); | 163 | brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, |
164 | "pfn_gscan_cfg", | ||
165 | &gscan_cfg, sizeof(gscan_cfg)); | ||
164 | brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn"); | 166 | brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn"); |
165 | if (drvr->bus_if->wowl_supported) | 167 | if (drvr->bus_if->wowl_supported) |
166 | brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl"); | 168 | brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl"); |
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c index b4ecd1fe1374..97208ce19f92 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c | |||
@@ -154,7 +154,7 @@ static const struct iwl_tt_params iwl9000_tt_params = { | |||
154 | const struct iwl_cfg iwl9160_2ac_cfg = { | 154 | const struct iwl_cfg iwl9160_2ac_cfg = { |
155 | .name = "Intel(R) Dual Band Wireless AC 9160", | 155 | .name = "Intel(R) Dual Band Wireless AC 9160", |
156 | .fw_name_pre = IWL9260A_FW_PRE, | 156 | .fw_name_pre = IWL9260A_FW_PRE, |
157 | .fw_name_pre_next_step = IWL9260B_FW_PRE, | 157 | .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
158 | IWL_DEVICE_9000, | 158 | IWL_DEVICE_9000, |
159 | .ht_params = &iwl9000_ht_params, | 159 | .ht_params = &iwl9000_ht_params, |
160 | .nvm_ver = IWL9000_NVM_VERSION, | 160 | .nvm_ver = IWL9000_NVM_VERSION, |
@@ -165,7 +165,7 @@ const struct iwl_cfg iwl9160_2ac_cfg = { | |||
165 | const struct iwl_cfg iwl9260_2ac_cfg = { | 165 | const struct iwl_cfg iwl9260_2ac_cfg = { |
166 | .name = "Intel(R) Dual Band Wireless AC 9260", | 166 | .name = "Intel(R) Dual Band Wireless AC 9260", |
167 | .fw_name_pre = IWL9260A_FW_PRE, | 167 | .fw_name_pre = IWL9260A_FW_PRE, |
168 | .fw_name_pre_next_step = IWL9260B_FW_PRE, | 168 | .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
169 | IWL_DEVICE_9000, | 169 | IWL_DEVICE_9000, |
170 | .ht_params = &iwl9000_ht_params, | 170 | .ht_params = &iwl9000_ht_params, |
171 | .nvm_ver = IWL9000_NVM_VERSION, | 171 | .nvm_ver = IWL9000_NVM_VERSION, |
@@ -176,7 +176,7 @@ const struct iwl_cfg iwl9260_2ac_cfg = { | |||
176 | const struct iwl_cfg iwl9270_2ac_cfg = { | 176 | const struct iwl_cfg iwl9270_2ac_cfg = { |
177 | .name = "Intel(R) Dual Band Wireless AC 9270", | 177 | .name = "Intel(R) Dual Band Wireless AC 9270", |
178 | .fw_name_pre = IWL9260A_FW_PRE, | 178 | .fw_name_pre = IWL9260A_FW_PRE, |
179 | .fw_name_pre_next_step = IWL9260B_FW_PRE, | 179 | .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
180 | IWL_DEVICE_9000, | 180 | IWL_DEVICE_9000, |
181 | .ht_params = &iwl9000_ht_params, | 181 | .ht_params = &iwl9000_ht_params, |
182 | .nvm_ver = IWL9000_NVM_VERSION, | 182 | .nvm_ver = IWL9000_NVM_VERSION, |
@@ -186,8 +186,8 @@ const struct iwl_cfg iwl9270_2ac_cfg = { | |||
186 | 186 | ||
187 | const struct iwl_cfg iwl9460_2ac_cfg = { | 187 | const struct iwl_cfg iwl9460_2ac_cfg = { |
188 | .name = "Intel(R) Dual Band Wireless AC 9460", | 188 | .name = "Intel(R) Dual Band Wireless AC 9460", |
189 | .fw_name_pre = IWL9000_FW_PRE, | 189 | .fw_name_pre = IWL9260A_FW_PRE, |
190 | .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, | 190 | .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
191 | IWL_DEVICE_9000, | 191 | IWL_DEVICE_9000, |
192 | .ht_params = &iwl9000_ht_params, | 192 | .ht_params = &iwl9000_ht_params, |
193 | .nvm_ver = IWL9000_NVM_VERSION, | 193 | .nvm_ver = IWL9000_NVM_VERSION, |
@@ -198,8 +198,8 @@ const struct iwl_cfg iwl9460_2ac_cfg = { | |||
198 | 198 | ||
199 | const struct iwl_cfg iwl9560_2ac_cfg = { | 199 | const struct iwl_cfg iwl9560_2ac_cfg = { |
200 | .name = "Intel(R) Dual Band Wireless AC 9560", | 200 | .name = "Intel(R) Dual Band Wireless AC 9560", |
201 | .fw_name_pre = IWL9000_FW_PRE, | 201 | .fw_name_pre = IWL9260A_FW_PRE, |
202 | .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, | 202 | .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, |
203 | IWL_DEVICE_9000, | 203 | IWL_DEVICE_9000, |
204 | .ht_params = &iwl9000_ht_params, | 204 | .ht_params = &iwl9000_ht_params, |
205 | .nvm_ver = IWL9000_NVM_VERSION, | 205 | .nvm_ver = IWL9000_NVM_VERSION, |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index 0fa8c473f1e2..c73a6438ce8f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |||
@@ -328,6 +328,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t; | |||
328 | * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger | 328 | * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger |
329 | * command size (command version 4) that supports toggling ACK TX | 329 | * command size (command version 4) that supports toggling ACK TX |
330 | * power reduction. | 330 | * power reduction. |
331 | * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload | ||
331 | * | 332 | * |
332 | * @NUM_IWL_UCODE_TLV_CAPA: number of bits used | 333 | * @NUM_IWL_UCODE_TLV_CAPA: number of bits used |
333 | */ | 334 | */ |
@@ -373,6 +374,7 @@ enum iwl_ucode_tlv_capa { | |||
373 | IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80, | 374 | IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80, |
374 | IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81, | 375 | IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81, |
375 | IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84, | 376 | IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84, |
377 | IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96, | ||
376 | 378 | ||
377 | NUM_IWL_UCODE_TLV_CAPA | 379 | NUM_IWL_UCODE_TLV_CAPA |
378 | #ifdef __CHECKER__ | 380 | #ifdef __CHECKER__ |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index c52623cb7c2a..d19c74827fbb 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
@@ -276,10 +276,10 @@ struct iwl_pwr_tx_backoff { | |||
276 | * @fw_name_pre: Firmware filename prefix. The api version and extension | 276 | * @fw_name_pre: Firmware filename prefix. The api version and extension |
277 | * (.ucode) will be added to filename before loading from disk. The | 277 | * (.ucode) will be added to filename before loading from disk. The |
278 | * filename is constructed as fw_name_pre<api>.ucode. | 278 | * filename is constructed as fw_name_pre<api>.ucode. |
279 | * @fw_name_pre_next_step: same as @fw_name_pre, only for next step | 279 | * @fw_name_pre_b_or_c_step: same as @fw_name_pre, only for b or c steps |
280 | * (if supported) | 280 | * (if supported) |
281 | * @fw_name_pre_rf_next_step: same as @fw_name_pre_next_step, only for rf next | 281 | * @fw_name_pre_rf_next_step: same as @fw_name_pre_b_or_c_step, only for rf |
282 | * step. Supported only in integrated solutions. | 282 | * next step. Supported only in integrated solutions. |
283 | * @ucode_api_max: Highest version of uCode API supported by driver. | 283 | * @ucode_api_max: Highest version of uCode API supported by driver. |
284 | * @ucode_api_min: Lowest version of uCode API supported by driver. | 284 | * @ucode_api_min: Lowest version of uCode API supported by driver. |
285 | * @max_inst_size: The maximal length of the fw inst section | 285 | * @max_inst_size: The maximal length of the fw inst section |
@@ -330,7 +330,7 @@ struct iwl_cfg { | |||
330 | /* params specific to an individual device within a device family */ | 330 | /* params specific to an individual device within a device family */ |
331 | const char *name; | 331 | const char *name; |
332 | const char *fw_name_pre; | 332 | const char *fw_name_pre; |
333 | const char *fw_name_pre_next_step; | 333 | const char *fw_name_pre_b_or_c_step; |
334 | const char *fw_name_pre_rf_next_step; | 334 | const char *fw_name_pre_rf_next_step; |
335 | /* params not likely to change within a device family */ | 335 | /* params not likely to change within a device family */ |
336 | const struct iwl_base_params *base_params; | 336 | const struct iwl_base_params *base_params; |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 6fdb5921e17f..4e0f86fe0a6f 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
@@ -216,8 +216,9 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) | |||
216 | const char *fw_pre_name; | 216 | const char *fw_pre_name; |
217 | 217 | ||
218 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 && | 218 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 && |
219 | CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP) | 219 | (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP || |
220 | fw_pre_name = cfg->fw_name_pre_next_step; | 220 | CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_C_STEP)) |
221 | fw_pre_name = cfg->fw_name_pre_b_or_c_step; | ||
221 | else if (drv->trans->cfg->integrated && | 222 | else if (drv->trans->cfg->integrated && |
222 | CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP && | 223 | CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP && |
223 | cfg->fw_name_pre_rf_next_step) | 224 | cfg->fw_name_pre_rf_next_step) |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 5c08f4d40f6a..3ee6767392b6 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
@@ -785,7 +785,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
785 | int num_of_ch, __le32 *channels, u16 fw_mcc) | 785 | int num_of_ch, __le32 *channels, u16 fw_mcc) |
786 | { | 786 | { |
787 | int ch_idx; | 787 | int ch_idx; |
788 | u16 ch_flags, prev_ch_flags = 0; | 788 | u16 ch_flags; |
789 | u32 reg_rule_flags, prev_reg_rule_flags = 0; | ||
789 | const u8 *nvm_chan = cfg->ext_nvm ? | 790 | const u8 *nvm_chan = cfg->ext_nvm ? |
790 | iwl_ext_nvm_channels : iwl_nvm_channels; | 791 | iwl_ext_nvm_channels : iwl_nvm_channels; |
791 | struct ieee80211_regdomain *regd; | 792 | struct ieee80211_regdomain *regd; |
@@ -834,8 +835,11 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
834 | continue; | 835 | continue; |
835 | } | 836 | } |
836 | 837 | ||
838 | reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx, | ||
839 | ch_flags, cfg); | ||
840 | |||
837 | /* we can't continue the same rule */ | 841 | /* we can't continue the same rule */ |
838 | if (ch_idx == 0 || prev_ch_flags != ch_flags || | 842 | if (ch_idx == 0 || prev_reg_rule_flags != reg_rule_flags || |
839 | center_freq - prev_center_freq > 20) { | 843 | center_freq - prev_center_freq > 20) { |
840 | valid_rules++; | 844 | valid_rules++; |
841 | new_rule = true; | 845 | new_rule = true; |
@@ -854,18 +858,17 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
854 | rule->power_rule.max_eirp = | 858 | rule->power_rule.max_eirp = |
855 | DBM_TO_MBM(IWL_DEFAULT_MAX_TX_POWER); | 859 | DBM_TO_MBM(IWL_DEFAULT_MAX_TX_POWER); |
856 | 860 | ||
857 | rule->flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx, | 861 | rule->flags = reg_rule_flags; |
858 | ch_flags, cfg); | ||
859 | 862 | ||
860 | /* rely on auto-calculation to merge BW of contiguous chans */ | 863 | /* rely on auto-calculation to merge BW of contiguous chans */ |
861 | rule->flags |= NL80211_RRF_AUTO_BW; | 864 | rule->flags |= NL80211_RRF_AUTO_BW; |
862 | rule->freq_range.max_bandwidth_khz = 0; | 865 | rule->freq_range.max_bandwidth_khz = 0; |
863 | 866 | ||
864 | prev_ch_flags = ch_flags; | ||
865 | prev_center_freq = center_freq; | 867 | prev_center_freq = center_freq; |
868 | prev_reg_rule_flags = reg_rule_flags; | ||
866 | 869 | ||
867 | IWL_DEBUG_DEV(dev, IWL_DL_LAR, | 870 | IWL_DEBUG_DEV(dev, IWL_DL_LAR, |
868 | "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", | 871 | "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x) reg_flags 0x%x: %s\n", |
869 | center_freq, | 872 | center_freq, |
870 | band == NL80211_BAND_5GHZ ? "5.2" : "2.4", | 873 | band == NL80211_BAND_5GHZ ? "5.2" : "2.4", |
871 | CHECK_AND_PRINT_I(VALID), | 874 | CHECK_AND_PRINT_I(VALID), |
@@ -877,10 +880,10 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
877 | CHECK_AND_PRINT_I(160MHZ), | 880 | CHECK_AND_PRINT_I(160MHZ), |
878 | CHECK_AND_PRINT_I(INDOOR_ONLY), | 881 | CHECK_AND_PRINT_I(INDOOR_ONLY), |
879 | CHECK_AND_PRINT_I(GO_CONCURRENT), | 882 | CHECK_AND_PRINT_I(GO_CONCURRENT), |
880 | ch_flags, | 883 | ch_flags, reg_rule_flags, |
881 | ((ch_flags & NVM_CHANNEL_ACTIVE) && | 884 | ((ch_flags & NVM_CHANNEL_ACTIVE) && |
882 | !(ch_flags & NVM_CHANNEL_RADAR)) | 885 | !(ch_flags & NVM_CHANNEL_RADAR)) |
883 | ? "" : "not "); | 886 | ? "Ad-Hoc" : ""); |
884 | } | 887 | } |
885 | 888 | ||
886 | regd->n_reg_rules = valid_rules; | 889 | regd->n_reg_rules = valid_rules; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 79e7a7a285dc..82863e9273eb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
@@ -1275,8 +1275,10 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm) | |||
1275 | 1275 | ||
1276 | entry = &wifi_pkg->package.elements[idx++]; | 1276 | entry = &wifi_pkg->package.elements[idx++]; |
1277 | if ((entry->type != ACPI_TYPE_INTEGER) || | 1277 | if ((entry->type != ACPI_TYPE_INTEGER) || |
1278 | (entry->integer.value > U8_MAX)) | 1278 | (entry->integer.value > U8_MAX)) { |
1279 | return -EINVAL; | 1279 | ret = -EINVAL; |
1280 | goto out_free; | ||
1281 | } | ||
1280 | 1282 | ||
1281 | mvm->geo_profiles[i].values[j] = entry->integer.value; | 1283 | mvm->geo_profiles[i].values[j] = entry->integer.value; |
1282 | } | 1284 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index c7b1e58e3384..ce901be5fba8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
@@ -2597,8 +2597,18 @@ static void iwl_mvm_purge_deferred_tx_frames(struct iwl_mvm *mvm, | |||
2597 | spin_lock_bh(&mvm_sta->lock); | 2597 | spin_lock_bh(&mvm_sta->lock); |
2598 | for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { | 2598 | for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { |
2599 | tid_data = &mvm_sta->tid_data[i]; | 2599 | tid_data = &mvm_sta->tid_data[i]; |
2600 | while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) | 2600 | |
2601 | while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) { | ||
2602 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
2603 | |||
2604 | /* | ||
2605 | * The first deferred frame should've stopped the MAC | ||
2606 | * queues, so we should never get a second deferred | ||
2607 | * frame for the RA/TID. | ||
2608 | */ | ||
2609 | iwl_mvm_start_mac_queues(mvm, info->hw_queue); | ||
2601 | ieee80211_free_txskb(mvm->hw, skb); | 2610 | ieee80211_free_txskb(mvm->hw, skb); |
2611 | } | ||
2602 | } | 2612 | } |
2603 | spin_unlock_bh(&mvm_sta->lock); | 2613 | spin_unlock_bh(&mvm_sta->lock); |
2604 | } | 2614 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 65beca3a457a..8999a1199d60 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
@@ -1291,7 +1291,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
1291 | * first index into rate scale table. | 1291 | * first index into rate scale table. |
1292 | */ | 1292 | */ |
1293 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { | 1293 | if (info->flags & IEEE80211_TX_STAT_AMPDU) { |
1294 | rs_collect_tpc_data(mvm, lq_sta, curr_tbl, lq_rate.index, | 1294 | rs_collect_tpc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index, |
1295 | info->status.ampdu_len, | 1295 | info->status.ampdu_len, |
1296 | info->status.ampdu_ack_len, | 1296 | info->status.ampdu_ack_len, |
1297 | reduced_txp); | 1297 | reduced_txp); |
@@ -1312,7 +1312,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
1312 | if (info->status.ampdu_ack_len == 0) | 1312 | if (info->status.ampdu_ack_len == 0) |
1313 | info->status.ampdu_len = 1; | 1313 | info->status.ampdu_len = 1; |
1314 | 1314 | ||
1315 | rs_collect_tlc_data(mvm, lq_sta, curr_tbl, lq_rate.index, | 1315 | rs_collect_tlc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index, |
1316 | info->status.ampdu_len, | 1316 | info->status.ampdu_len, |
1317 | info->status.ampdu_ack_len); | 1317 | info->status.ampdu_ack_len); |
1318 | 1318 | ||
@@ -1348,11 +1348,11 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
1348 | continue; | 1348 | continue; |
1349 | 1349 | ||
1350 | rs_collect_tpc_data(mvm, lq_sta, tmp_tbl, | 1350 | rs_collect_tpc_data(mvm, lq_sta, tmp_tbl, |
1351 | lq_rate.index, 1, | 1351 | tx_resp_rate.index, 1, |
1352 | i < retries ? 0 : legacy_success, | 1352 | i < retries ? 0 : legacy_success, |
1353 | reduced_txp); | 1353 | reduced_txp); |
1354 | rs_collect_tlc_data(mvm, lq_sta, tmp_tbl, | 1354 | rs_collect_tlc_data(mvm, lq_sta, tmp_tbl, |
1355 | lq_rate.index, 1, | 1355 | tx_resp_rate.index, 1, |
1356 | i < retries ? 0 : legacy_success); | 1356 | i < retries ? 0 : legacy_success); |
1357 | } | 1357 | } |
1358 | 1358 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index f3e608196369..71c8b800ffa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -636,9 +636,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, | |||
636 | 636 | ||
637 | baid_data = rcu_dereference(mvm->baid_map[baid]); | 637 | baid_data = rcu_dereference(mvm->baid_map[baid]); |
638 | if (!baid_data) { | 638 | if (!baid_data) { |
639 | WARN(!(reorder & IWL_RX_MPDU_REORDER_BA_OLD_SN), | 639 | IWL_DEBUG_RX(mvm, |
640 | "Received baid %d, but no data exists for this BAID\n", | 640 | "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n", |
641 | baid); | 641 | baid, reorder); |
642 | return false; | 642 | return false; |
643 | } | 643 | } |
644 | 644 | ||
@@ -759,7 +759,9 @@ static void iwl_mvm_agg_rx_received(struct iwl_mvm *mvm, | |||
759 | 759 | ||
760 | data = rcu_dereference(mvm->baid_map[baid]); | 760 | data = rcu_dereference(mvm->baid_map[baid]); |
761 | if (!data) { | 761 | if (!data) { |
762 | WARN_ON(!(reorder_data & IWL_RX_MPDU_REORDER_BA_OLD_SN)); | 762 | IWL_DEBUG_RX(mvm, |
763 | "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n", | ||
764 | baid, reorder_data); | ||
763 | goto out; | 765 | goto out; |
764 | } | 766 | } |
765 | 767 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index ab66b4394dfc..027ee5e72172 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -121,7 +121,8 @@ int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
121 | .mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color), | 121 | .mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color), |
122 | .add_modify = update ? 1 : 0, | 122 | .add_modify = update ? 1 : 0, |
123 | .station_flags_msk = cpu_to_le32(STA_FLG_FAT_EN_MSK | | 123 | .station_flags_msk = cpu_to_le32(STA_FLG_FAT_EN_MSK | |
124 | STA_FLG_MIMO_EN_MSK), | 124 | STA_FLG_MIMO_EN_MSK | |
125 | STA_FLG_RTS_MIMO_PROT), | ||
125 | .tid_disable_tx = cpu_to_le16(mvm_sta->tid_disable_agg), | 126 | .tid_disable_tx = cpu_to_le16(mvm_sta->tid_disable_agg), |
126 | }; | 127 | }; |
127 | int ret; | 128 | int ret; |
@@ -290,8 +291,8 @@ static void iwl_mvm_rx_agg_session_expired(unsigned long data) | |||
290 | goto unlock; | 291 | goto unlock; |
291 | 292 | ||
292 | mvm_sta = iwl_mvm_sta_from_mac80211(sta); | 293 | mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
293 | ieee80211_stop_rx_ba_session_offl(mvm_sta->vif, | 294 | ieee80211_rx_ba_timer_expired(mvm_sta->vif, |
294 | sta->addr, ba_data->tid); | 295 | sta->addr, ba_data->tid); |
295 | unlock: | 296 | unlock: |
296 | rcu_read_unlock(); | 297 | rcu_read_unlock(); |
297 | } | 298 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 60360ed73f26..5fcc9dd6be56 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
@@ -185,8 +185,14 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
185 | else | 185 | else |
186 | udp_hdr(skb)->check = 0; | 186 | udp_hdr(skb)->check = 0; |
187 | 187 | ||
188 | /* mac header len should include IV, size is in words */ | 188 | /* |
189 | if (info->control.hw_key) | 189 | * mac header len should include IV, size is in words unless |
190 | * the IV is added by the firmware like in WEP. | ||
191 | * In new Tx API, the IV is always added by the firmware. | ||
192 | */ | ||
193 | if (!iwl_mvm_has_new_tx_api(mvm) && info->control.hw_key && | ||
194 | info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP40 && | ||
195 | info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP104) | ||
190 | mh_len += info->control.hw_key->iv_len; | 196 | mh_len += info->control.hw_key->iv_len; |
191 | mh_len /= 2; | 197 | mh_len /= 2; |
192 | offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE; | 198 | offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE; |
@@ -1815,6 +1821,8 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) | |||
1815 | struct iwl_mvm_tid_data *tid_data; | 1821 | struct iwl_mvm_tid_data *tid_data; |
1816 | struct iwl_mvm_sta *mvmsta; | 1822 | struct iwl_mvm_sta *mvmsta; |
1817 | 1823 | ||
1824 | ba_info.flags = IEEE80211_TX_STAT_AMPDU; | ||
1825 | |||
1818 | if (iwl_mvm_has_new_tx_api(mvm)) { | 1826 | if (iwl_mvm_has_new_tx_api(mvm)) { |
1819 | struct iwl_mvm_compressed_ba_notif *ba_res = | 1827 | struct iwl_mvm_compressed_ba_notif *ba_res = |
1820 | (void *)pkt->data; | 1828 | (void *)pkt->data; |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index f16c1bb9bf94..84f4ba01e14f 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
@@ -510,9 +510,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
510 | 510 | ||
511 | /* 9000 Series */ | 511 | /* 9000 Series */ |
512 | {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)}, | 512 | {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)}, |
513 | {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, | ||
514 | {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)}, | ||
513 | {IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)}, | 515 | {IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)}, |
514 | {IWL_PCI_DEVICE(0x2526, 0x0010, iwl9260_2ac_cfg)}, | 516 | {IWL_PCI_DEVICE(0x2526, 0x0010, iwl9260_2ac_cfg)}, |
517 | {IWL_PCI_DEVICE(0x2526, 0x0014, iwl9260_2ac_cfg)}, | ||
518 | {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_cfg)}, | ||
519 | {IWL_PCI_DEVICE(0x2526, 0x4010, iwl9260_2ac_cfg)}, | ||
520 | {IWL_PCI_DEVICE(0x2526, 0x0210, iwl9260_2ac_cfg)}, | ||
521 | {IWL_PCI_DEVICE(0x2526, 0x0214, iwl9260_2ac_cfg)}, | ||
515 | {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)}, | 522 | {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)}, |
523 | {IWL_PCI_DEVICE(0x2526, 0x1610, iwl9270_2ac_cfg)}, | ||
516 | {IWL_PCI_DEVICE(0x9DF0, 0x0A10, iwl9460_2ac_cfg)}, | 524 | {IWL_PCI_DEVICE(0x9DF0, 0x0A10, iwl9460_2ac_cfg)}, |
517 | {IWL_PCI_DEVICE(0x9DF0, 0x0010, iwl9460_2ac_cfg)}, | 525 | {IWL_PCI_DEVICE(0x9DF0, 0x0010, iwl9460_2ac_cfg)}, |
518 | {IWL_PCI_DEVICE(0x9DF0, 0x0210, iwl9460_2ac_cfg)}, | 526 | {IWL_PCI_DEVICE(0x9DF0, 0x0210, iwl9460_2ac_cfg)}, |
@@ -527,10 +535,22 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
527 | {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl9460_2ac_cfg)}, | 535 | {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl9460_2ac_cfg)}, |
528 | {IWL_PCI_DEVICE(0x30DC, 0x0060, iwl9460_2ac_cfg)}, | 536 | {IWL_PCI_DEVICE(0x30DC, 0x0060, iwl9460_2ac_cfg)}, |
529 | {IWL_PCI_DEVICE(0x2526, 0x0060, iwl9460_2ac_cfg)}, | 537 | {IWL_PCI_DEVICE(0x2526, 0x0060, iwl9460_2ac_cfg)}, |
538 | {IWL_PCI_DEVICE(0x2526, 0x0260, iwl9460_2ac_cfg)}, | ||
539 | {IWL_PCI_DEVICE(0x2526, 0x0064, iwl9460_2ac_cfg)}, | ||
540 | {IWL_PCI_DEVICE(0x2526, 0x00A4, iwl9460_2ac_cfg)}, | ||
541 | {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, | ||
542 | {IWL_PCI_DEVICE(0x2526, 0x02A4, iwl9460_2ac_cfg)}, | ||
543 | {IWL_PCI_DEVICE(0x2526, 0x00A0, iwl9460_2ac_cfg)}, | ||
544 | {IWL_PCI_DEVICE(0x2526, 0x02A0, iwl9460_2ac_cfg)}, | ||
530 | {IWL_PCI_DEVICE(0x9DF0, 0x0060, iwl9460_2ac_cfg)}, | 545 | {IWL_PCI_DEVICE(0x9DF0, 0x0060, iwl9460_2ac_cfg)}, |
531 | {IWL_PCI_DEVICE(0xA370, 0x0060, iwl9460_2ac_cfg)}, | 546 | {IWL_PCI_DEVICE(0xA370, 0x0060, iwl9460_2ac_cfg)}, |
532 | {IWL_PCI_DEVICE(0x31DC, 0x0060, iwl9460_2ac_cfg)}, | 547 | {IWL_PCI_DEVICE(0x31DC, 0x0060, iwl9460_2ac_cfg)}, |
533 | {IWL_PCI_DEVICE(0x2526, 0x0030, iwl9560_2ac_cfg)}, | 548 | {IWL_PCI_DEVICE(0x2526, 0x0030, iwl9560_2ac_cfg)}, |
549 | {IWL_PCI_DEVICE(0x2526, 0x4030, iwl9560_2ac_cfg)}, | ||
550 | {IWL_PCI_DEVICE(0x2526, 0x0230, iwl9560_2ac_cfg)}, | ||
551 | {IWL_PCI_DEVICE(0x2526, 0x0234, iwl9560_2ac_cfg)}, | ||
552 | {IWL_PCI_DEVICE(0x2526, 0x0238, iwl9560_2ac_cfg)}, | ||
553 | {IWL_PCI_DEVICE(0x2526, 0x023C, iwl9560_2ac_cfg)}, | ||
534 | {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)}, | 554 | {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)}, |
535 | {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)}, | 555 | {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)}, |
536 | {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)}, | 556 | {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)}, |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b2b5419467cc..f8149ca192b4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -5499,6 +5499,21 @@ static inline void ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, | |||
5499 | ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS); | 5499 | ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS); |
5500 | } | 5500 | } |
5501 | 5501 | ||
5502 | /** | ||
5503 | * ieee80211_rx_ba_timer_expired - stop a Rx BA session due to timeout | ||
5504 | * | ||
5505 | * Some device drivers do not offload AddBa/DelBa negotiation, but handle rx | ||
5506 | * buffer reording internally, and therefore also handle the session timer. | ||
5507 | * | ||
5508 | * Trigger the timeout flow, which sends a DelBa. | ||
5509 | * | ||
5510 | * @vif: &struct ieee80211_vif pointer from the add_interface callback | ||
5511 | * @addr: station mac address | ||
5512 | * @tid: the rx tid | ||
5513 | */ | ||
5514 | void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, | ||
5515 | const u8 *addr, unsigned int tid); | ||
5516 | |||
5502 | /* Rate control API */ | 5517 | /* Rate control API */ |
5503 | 5518 | ||
5504 | /** | 5519 | /** |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 8708cbe8af5b..2b36eff5d97e 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 7 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 8 | * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
9 | * Copyright 2007-2010, Intel Corporation | 9 | * Copyright 2007-2010, Intel Corporation |
10 | * Copyright(c) 2015 Intel Deutschland GmbH | 10 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
13 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
@@ -466,3 +466,23 @@ void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif, | |||
466 | rcu_read_unlock(); | 466 | rcu_read_unlock(); |
467 | } | 467 | } |
468 | EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl); | 468 | EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl); |
469 | |||
470 | void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, | ||
471 | const u8 *addr, unsigned int tid) | ||
472 | { | ||
473 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
474 | struct ieee80211_local *local = sdata->local; | ||
475 | struct sta_info *sta; | ||
476 | |||
477 | rcu_read_lock(); | ||
478 | sta = sta_info_get_bss(sdata, addr); | ||
479 | if (!sta) | ||
480 | goto unlock; | ||
481 | |||
482 | set_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired); | ||
483 | ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work); | ||
484 | |||
485 | unlock: | ||
486 | rcu_read_unlock(); | ||
487 | } | ||
488 | EXPORT_SYMBOL(ieee80211_rx_ba_timer_expired); | ||