Skip to content

Commit 368bd88

Browse files
author
Kalle Valo
committed
Merge tag 'iwlwifi-for-kalle-2017-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
Some fixes in iwlwifi for 4.13 * Some simple PCI HW ID fix-ups and additions for family 9000; * A couple of bugzilla fixes: - Remove a bogus warning message with new FWs (196915) - Don't allow illegal channel options to be used (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;
2 parents 5f5d031 + 558f479 commit 368bd88

File tree

9 files changed

+63
-28
lines changed

9 files changed

+63
-28
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/9000.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
154154
const struct iwl_cfg iwl9160_2ac_cfg = {
155155
.name = "Intel(R) Dual Band Wireless AC 9160",
156156
.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,
158158
IWL_DEVICE_9000,
159159
.ht_params = &iwl9000_ht_params,
160160
.nvm_ver = IWL9000_NVM_VERSION,
@@ -165,7 +165,7 @@ const struct iwl_cfg iwl9160_2ac_cfg = {
165165
const struct iwl_cfg iwl9260_2ac_cfg = {
166166
.name = "Intel(R) Dual Band Wireless AC 9260",
167167
.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,
169169
IWL_DEVICE_9000,
170170
.ht_params = &iwl9000_ht_params,
171171
.nvm_ver = IWL9000_NVM_VERSION,
@@ -176,7 +176,7 @@ const struct iwl_cfg iwl9260_2ac_cfg = {
176176
const struct iwl_cfg iwl9270_2ac_cfg = {
177177
.name = "Intel(R) Dual Band Wireless AC 9270",
178178
.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,
180180
IWL_DEVICE_9000,
181181
.ht_params = &iwl9000_ht_params,
182182
.nvm_ver = IWL9000_NVM_VERSION,
@@ -186,8 +186,8 @@ const struct iwl_cfg iwl9270_2ac_cfg = {
186186

187187
const struct iwl_cfg iwl9460_2ac_cfg = {
188188
.name = "Intel(R) Dual Band Wireless AC 9460",
189-
.fw_name_pre = IWL9000_FW_PRE,
190-
.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
189+
.fw_name_pre = IWL9260A_FW_PRE,
190+
.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
191191
IWL_DEVICE_9000,
192192
.ht_params = &iwl9000_ht_params,
193193
.nvm_ver = IWL9000_NVM_VERSION,
@@ -198,8 +198,8 @@ const struct iwl_cfg iwl9460_2ac_cfg = {
198198

199199
const struct iwl_cfg iwl9560_2ac_cfg = {
200200
.name = "Intel(R) Dual Band Wireless AC 9560",
201-
.fw_name_pre = IWL9000_FW_PRE,
202-
.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
201+
.fw_name_pre = IWL9260A_FW_PRE,
202+
.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
203203
IWL_DEVICE_9000,
204204
.ht_params = &iwl9000_ht_params,
205205
.nvm_ver = IWL9000_NVM_VERSION,

drivers/net/wireless/intel/iwlwifi/fw/file.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
328328
* @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger
329329
* command size (command version 4) that supports toggling ACK TX
330330
* power reduction.
331+
* @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload
331332
*
332333
* @NUM_IWL_UCODE_TLV_CAPA: number of bits used
333334
*/
@@ -373,6 +374,7 @@ enum iwl_ucode_tlv_capa {
373374
IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80,
374375
IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81,
375376
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,
376378

377379
NUM_IWL_UCODE_TLV_CAPA
378380
#ifdef __CHECKER__

drivers/net/wireless/intel/iwlwifi/iwl-config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ struct iwl_pwr_tx_backoff {
276276
* @fw_name_pre: Firmware filename prefix. The api version and extension
277277
* (.ucode) will be added to filename before loading from disk. The
278278
* 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
280280
* (if supported)
281-
* @fw_name_pre_rf_next_step: same as @fw_name_pre_next_step, only for rf next
282-
* step. Supported only in integrated solutions.
281+
* @fw_name_pre_rf_next_step: same as @fw_name_pre_b_or_c_step, only for rf
282+
* next step. Supported only in integrated solutions.
283283
* @ucode_api_max: Highest version of uCode API supported by driver.
284284
* @ucode_api_min: Lowest version of uCode API supported by driver.
285285
* @max_inst_size: The maximal length of the fw inst section
@@ -330,7 +330,7 @@ struct iwl_cfg {
330330
/* params specific to an individual device within a device family */
331331
const char *name;
332332
const char *fw_name_pre;
333-
const char *fw_name_pre_next_step;
333+
const char *fw_name_pre_b_or_c_step;
334334
const char *fw_name_pre_rf_next_step;
335335
/* params not likely to change within a device family */
336336
const struct iwl_base_params *base_params;

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
216216
const char *fw_pre_name;
217217

218218
if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
219-
CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP)
220-
fw_pre_name = cfg->fw_name_pre_next_step;
219+
(CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_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;
221222
else if (drv->trans->cfg->integrated &&
222223
CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP &&
223224
cfg->fw_name_pre_rf_next_step)

drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
785785
int num_of_ch, __le32 *channels, u16 fw_mcc)
786786
{
787787
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;
789790
const u8 *nvm_chan = cfg->ext_nvm ?
790791
iwl_ext_nvm_channels : iwl_nvm_channels;
791792
struct ieee80211_regdomain *regd;
@@ -834,8 +835,11 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
834835
continue;
835836
}
836837

838+
reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx,
839+
ch_flags, cfg);
840+
837841
/* 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 ||
839843
center_freq - prev_center_freq > 20) {
840844
valid_rules++;
841845
new_rule = true;
@@ -854,18 +858,17 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
854858
rule->power_rule.max_eirp =
855859
DBM_TO_MBM(IWL_DEFAULT_MAX_TX_POWER);
856860

857-
rule->flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx,
858-
ch_flags, cfg);
861+
rule->flags = reg_rule_flags;
859862

860863
/* rely on auto-calculation to merge BW of contiguous chans */
861864
rule->flags |= NL80211_RRF_AUTO_BW;
862865
rule->freq_range.max_bandwidth_khz = 0;
863866

864-
prev_ch_flags = ch_flags;
865867
prev_center_freq = center_freq;
868+
prev_reg_rule_flags = reg_rule_flags;
866869

867870
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",
869872
center_freq,
870873
band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
871874
CHECK_AND_PRINT_I(VALID),
@@ -877,10 +880,10 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
877880
CHECK_AND_PRINT_I(160MHZ),
878881
CHECK_AND_PRINT_I(INDOOR_ONLY),
879882
CHECK_AND_PRINT_I(GO_CONCURRENT),
880-
ch_flags,
883+
ch_flags, reg_rule_flags,
881884
((ch_flags & NVM_CHANNEL_ACTIVE) &&
882885
!(ch_flags & NVM_CHANNEL_RADAR))
883-
? "" : "not ");
886+
? "Ad-Hoc" : "");
884887
}
885888

886889
regd->n_reg_rules = valid_rules;

drivers/net/wireless/intel/iwlwifi/mvm/rs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
12911291
* first index into rate scale table.
12921292
*/
12931293
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,
12951295
info->status.ampdu_len,
12961296
info->status.ampdu_ack_len,
12971297
reduced_txp);
@@ -1312,7 +1312,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
13121312
if (info->status.ampdu_ack_len == 0)
13131313
info->status.ampdu_len = 1;
13141314

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,
13161316
info->status.ampdu_len,
13171317
info->status.ampdu_ack_len);
13181318

@@ -1348,11 +1348,11 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
13481348
continue;
13491349

13501350
rs_collect_tpc_data(mvm, lq_sta, tmp_tbl,
1351-
lq_rate.index, 1,
1351+
tx_resp_rate.index, 1,
13521352
i < retries ? 0 : legacy_success,
13531353
reduced_txp);
13541354
rs_collect_tlc_data(mvm, lq_sta, tmp_tbl,
1355-
lq_rate.index, 1,
1355+
tx_resp_rate.index, 1,
13561356
i < retries ? 0 : legacy_success);
13571357
}
13581358

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
121121
.mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color),
122122
.add_modify = update ? 1 : 0,
123123
.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),
125126
.tid_disable_tx = cpu_to_le16(mvm_sta->tid_disable_agg),
126127
};
127128
int ret;

drivers/net/wireless/intel/iwlwifi/mvm/tx.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,14 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
185185
else
186186
udp_hdr(skb)->check = 0;
187187

188-
/* mac header len should include IV, size is in words */
189-
if (info->control.hw_key)
188+
/*
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)
190196
mh_len += info->control.hw_key->iv_len;
191197
mh_len /= 2;
192198
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)
18151821
struct iwl_mvm_tid_data *tid_data;
18161822
struct iwl_mvm_sta *mvmsta;
18171823

1824+
ba_info.flags = IEEE80211_TX_STAT_AMPDU;
1825+
18181826
if (iwl_mvm_has_new_tx_api(mvm)) {
18191827
struct iwl_mvm_compressed_ba_notif *ba_res =
18201828
(void *)pkt->data;

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
510510

511511
/* 9000 Series */
512512
{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)},
513515
{IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)},
514516
{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)},
515522
{IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)},
523+
{IWL_PCI_DEVICE(0x2526, 0x1610, iwl9270_2ac_cfg)},
516524
{IWL_PCI_DEVICE(0x9DF0, 0x0A10, iwl9460_2ac_cfg)},
517525
{IWL_PCI_DEVICE(0x9DF0, 0x0010, iwl9460_2ac_cfg)},
518526
{IWL_PCI_DEVICE(0x9DF0, 0x0210, iwl9460_2ac_cfg)},
@@ -527,10 +535,22 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
527535
{IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl9460_2ac_cfg)},
528536
{IWL_PCI_DEVICE(0x30DC, 0x0060, iwl9460_2ac_cfg)},
529537
{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)},
530545
{IWL_PCI_DEVICE(0x9DF0, 0x0060, iwl9460_2ac_cfg)},
531546
{IWL_PCI_DEVICE(0xA370, 0x0060, iwl9460_2ac_cfg)},
532547
{IWL_PCI_DEVICE(0x31DC, 0x0060, iwl9460_2ac_cfg)},
533548
{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)},
534554
{IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)},
535555
{IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)},
536556
{IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)},

0 commit comments

Comments
 (0)