Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'iwlwifi-for-kalle-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

First batch of fixes intended for v5.6

* Fix a locking issue in time events handling;
* A fix in rate-scaling;
* Fix for a potential NULL pointer deref;
* Enable antenna diversity in some devices that were erroneously not
doing it;
* Allow FW dumps to continue when the FW is stuck;
* A fix in the HE capabilities handling;
* Another fix for FW dumps where we were reading wrong addresses.

+44 -30
+2
drivers/net/wireless/intel/iwlwifi/cfg/22000.c
··· 283 283 * HT size; mac80211 would otherwise pick the HE max (256) by default. 284 284 */ 285 285 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, 286 + .tx_with_siso_diversity = true, 286 287 .num_rbds = IWL_NUM_RBDS_22000_HE, 287 288 }; 288 289 ··· 310 309 * HT size; mac80211 would otherwise pick the HE max (256) by default. 311 310 */ 312 311 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, 312 + .tx_with_siso_diversity = true, 313 313 .num_rbds = IWL_NUM_RBDS_22000_HE, 314 314 }; 315 315
+8 -17
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
··· 8 8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 9 9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 10 10 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH 11 - * Copyright(c) 2018 - 2019 Intel Corporation 11 + * Copyright(c) 2018 - 2020 Intel Corporation 12 12 * 13 13 * This program is free software; you can redistribute it and/or modify 14 14 * it under the terms of version 2 of the GNU General Public License as ··· 31 31 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 32 32 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH 33 33 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH 34 - * Copyright(c) 2018 - 2019 Intel Corporation 34 + * Copyright(c) 2018 - 2020 Intel Corporation 35 35 * All rights reserved. 36 36 * 37 37 * Redistribution and use in source and binary forms, with or without ··· 1409 1409 goto out; 1410 1410 } 1411 1411 1412 - /* 1413 - * region register have absolute value so apply rxf offset after 1414 - * reading the registers 1415 - */ 1416 - offs += rxf_data.offset; 1412 + offs = rxf_data.offset; 1417 1413 1418 1414 /* Lock fence */ 1419 1415 iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1); ··· 2490 2494 goto out; 2491 2495 } 2492 2496 2493 - if (iwl_fw_dbg_stop_restart_recording(fwrt, &params, true)) { 2494 - IWL_ERR(fwrt, "Failed to stop DBGC recording, aborting dump\n"); 2495 - goto out; 2496 - } 2497 + iwl_fw_dbg_stop_restart_recording(fwrt, &params, true); 2497 2498 2498 2499 IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection start\n"); 2499 2500 if (iwl_trans_dbg_ini_valid(fwrt->trans)) ··· 2655 2662 return 0; 2656 2663 } 2657 2664 2658 - int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, 2659 - struct iwl_fw_dbg_params *params, 2660 - bool stop) 2665 + void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, 2666 + struct iwl_fw_dbg_params *params, 2667 + bool stop) 2661 2668 { 2662 2669 int ret = 0; 2663 2670 2664 2671 if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status)) 2665 - return 0; 2672 + return; 2666 2673 2667 2674 if (fw_has_capa(&fwrt->fw->ucode_capa, 2668 2675 IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP)) ··· 2679 2686 iwl_fw_set_dbg_rec_on(fwrt); 2680 2687 } 2681 2688 #endif 2682 - 2683 - return ret; 2684 2689 } 2685 2690 IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_restart_recording);
+3 -3
drivers/net/wireless/intel/iwlwifi/fw/dbg.h
··· 239 239 _iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \ 240 240 iwl_fw_dbg_get_trigger((fwrt)->fw,\ 241 241 (trig))) 242 - int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, 243 - struct iwl_fw_dbg_params *params, 244 - bool stop); 242 + void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, 243 + struct iwl_fw_dbg_params *params, 244 + bool stop); 245 245 246 246 #ifdef CONFIG_IWLWIFI_DEBUGFS 247 247 static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)
+1 -1
drivers/net/wireless/intel/iwlwifi/iwl-drv.c
··· 1467 1467 kmemdup(pieces->dbg_conf_tlv[i], 1468 1468 pieces->dbg_conf_tlv_len[i], 1469 1469 GFP_KERNEL); 1470 - if (!pieces->dbg_conf_tlv_len[i]) 1470 + if (!pieces->dbg_conf_tlv[i]) 1471 1471 goto out_free_fw; 1472 1472 } 1473 1473 }
+26 -9
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
··· 6 6 * GPL LICENSE SUMMARY 7 7 * 8 8 * Copyright(c) 2017 Intel Deutschland GmbH 9 - * Copyright(c) 2018 - 2019 Intel Corporation 9 + * Copyright(c) 2018 - 2020 Intel Corporation 10 10 * 11 11 * This program is free software; you can redistribute it and/or modify 12 12 * it under the terms of version 2 of the GNU General Public License as ··· 27 27 * BSD LICENSE 28 28 * 29 29 * Copyright(c) 2017 Intel Deutschland GmbH 30 - * Copyright(c) 2018 - 2019 Intel Corporation 30 + * Copyright(c) 2018 - 2020 Intel Corporation 31 31 * All rights reserved. 32 32 * 33 33 * Redistribution and use in source and binary forms, with or without ··· 147 147 (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC)))) 148 148 flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK; 149 149 150 - /* consider our LDPC support in case of HE */ 150 + /* consider LDPC support in case of HE */ 151 + if (he_cap->has_he && (he_cap->he_cap_elem.phy_cap_info[1] & 152 + IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD)) 153 + flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK; 154 + 151 155 if (sband->iftype_data && sband->iftype_data->he_cap.has_he && 152 156 !(sband->iftype_data->he_cap.he_cap_elem.phy_cap_info[1] & 153 157 IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD)) ··· 195 191 { 196 192 u16 supp; 197 193 int i, highest_mcs; 194 + u8 nss = sta->rx_nss; 198 195 199 - for (i = 0; i < sta->rx_nss; i++) { 200 - if (i == IWL_TLC_NSS_MAX) 201 - break; 196 + /* the station support only a single receive chain */ 197 + if (sta->smps_mode == IEEE80211_SMPS_STATIC) 198 + nss = 1; 202 199 200 + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { 203 201 highest_mcs = rs_fw_vht_highest_rx_mcs_index(vht_cap, i + 1); 204 202 if (!highest_mcs) 205 203 continue; ··· 247 241 u16 tx_mcs_160 = 248 242 le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160); 249 243 int i; 244 + u8 nss = sta->rx_nss; 250 245 251 - for (i = 0; i < sta->rx_nss && i < IWL_TLC_NSS_MAX; i++) { 246 + /* the station support only a single receive chain */ 247 + if (sta->smps_mode == IEEE80211_SMPS_STATIC) 248 + nss = 1; 249 + 250 + for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) { 252 251 u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3; 253 252 u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3; 254 253 u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3; ··· 314 303 cmd->mode = IWL_TLC_MNG_MODE_HT; 315 304 cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] = 316 305 cpu_to_le16(ht_cap->mcs.rx_mask[0]); 317 - cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = 318 - cpu_to_le16(ht_cap->mcs.rx_mask[1]); 306 + 307 + /* the station support only a single receive chain */ 308 + if (sta->smps_mode == IEEE80211_SMPS_STATIC) 309 + cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = 310 + 0; 311 + else 312 + cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] = 313 + cpu_to_le16(ht_cap->mcs.rx_mask[1]); 319 314 } 320 315 } 321 316
+4
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
··· 785 785 if (!le32_to_cpu(notif->status)) { 786 786 iwl_mvm_te_check_disconnect(mvm, vif, 787 787 "Session protection failure"); 788 + spin_lock_bh(&mvm->time_event_lock); 788 789 iwl_mvm_te_clear_data(mvm, te_data); 790 + spin_unlock_bh(&mvm->time_event_lock); 789 791 } 790 792 791 793 if (le32_to_cpu(notif->start)) { ··· 803 801 */ 804 802 iwl_mvm_te_check_disconnect(mvm, vif, 805 803 "No beacon heard and the session protection is over already..."); 804 + spin_lock_bh(&mvm->time_event_lock); 806 805 iwl_mvm_te_clear_data(mvm, te_data); 806 + spin_unlock_bh(&mvm->time_event_lock); 807 807 } 808 808 809 809 goto out_unlock;