OSDN Git Service

Merge tag 'wireless-drivers-next-2020-03-27' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 22:40:24 +0000 (15:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 22:40:24 +0000 (15:40 -0700)
Kalle Valo says:

====================
wireless-drivers-next patches for v5.7

Third set of patches for v5.7. Nothing really special this time,
business as usual.

When pulling this to net-next there's again a conflict in:

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

To solve this drop these three lines from the conflict (the first hunk
from "HEAD") as the whole AX200 block was moved above in the same
file:

IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name),
IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name),
IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name),

And keep all the __IWL_DEV_INFO() entries (the second hunk). In other
words, take everything from wireless-drivers-next. When running 'git
diff' after the resolution the output should be empty.

Major changes:

brcmfmac

* add USB autosuspend support

ath11k

* handle RX fragments

* enable PN offload

* add support for HE BSS color

iwlwifi

* support new FW API version

* support for EDCA measurements

* new scan API features

* enable new firmware debugging code
====================

Kalle gave me directions on how to resolve the iwlwifi conflict
as follows:

====================
When pulling this to net-next there's again a conflict in:

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

To solve this drop these three lines from the conflict (the first hunk
from "HEAD") as the whole AX200 block was moved above in the same
file:

IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name),
IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name),
IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name),

And keep all the __IWL_DEV_INFO() entries (the second hunk). In other
words, take everything from wireless-drivers-next. When running 'git
diff' after the resolution the output should be empty.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
drivers/net/wireless/intel/iwlwifi/cfg/22000.c
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/iwl-drv.c
drivers/net/wireless/intel/iwlwifi/mvm/fw.c
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c

@@@ -57,7 -57,7 +57,7 @@@
  #include "iwl-prph.h"
  
  /* Highest firmware API version supported */
- #define IWL_22000_UCODE_API_MAX       52
+ #define IWL_22000_UCODE_API_MAX       53
  
  /* Lowest firmware API version supported */
  #define IWL_22000_UCODE_API_MIN       39
  #define IWL_22000_JF_FW_PRE           "iwlwifi-Qu-a0-jf-b0-"
  #define IWL_22000_HR_FW_PRE           "iwlwifi-Qu-a0-hr-a0-"
  #define IWL_22000_HR_CDB_FW_PRE               "iwlwifi-QuIcp-z0-hrcdb-a0-"
- #define IWL_22000_HR_A_F0_FW_PRE      "iwlwifi-QuQnj-f0-hr-a0-"
  #define IWL_22000_QU_B_HR_B_FW_PRE    "iwlwifi-Qu-b0-hr-b0-"
  #define IWL_22000_HR_B_FW_PRE         "iwlwifi-QuQnj-b0-hr-b0-"
- #define IWL_22000_HR_A0_FW_PRE                "iwlwifi-QuQnj-a0-hr-a0-"
  #define IWL_QU_C_HR_B_FW_PRE          "iwlwifi-Qu-c0-hr-b0-"
  #define IWL_QU_B_JF_B_FW_PRE          "iwlwifi-Qu-b0-jf-b0-"
  #define IWL_QU_C_JF_B_FW_PRE          "iwlwifi-Qu-c0-jf-b0-"
        IWL_22000_HR_FW_PRE __stringify(api) ".ucode"
  #define IWL_22000_JF_MODULE_FIRMWARE(api) \
        IWL_22000_JF_FW_PRE __stringify(api) ".ucode"
- #define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \
-       IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode"
  #define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \
        IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
  #define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api)       \
        IWL_22000_HR_B_FW_PRE __stringify(api) ".ucode"
- #define IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(api) \
-       IWL_22000_HR_A0_FW_PRE __stringify(api) ".ucode"
  #define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
        IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
  #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \
@@@ -235,6 -229,38 +229,38 @@@ static const struct iwl_ht_params iwl_2
                },                                                      \
        }
  
+ const struct iwl_cfg_trans_params iwl_qu_trans_cfg = {
+       .mq_rx_supported = true,
+       .use_tfh = true,
+       .rf_id = true,
+       .gen2 = true,
+       .device_family = IWL_DEVICE_FAMILY_22000,
+       .base_params = &iwl_22000_base_params,
+       .integrated = true,
+       .xtal_latency = 5000,
+ };
+ const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
+       .mq_rx_supported = true,
+       .use_tfh = true,
+       .rf_id = true,
+       .gen2 = true,
+       .device_family = IWL_DEVICE_FAMILY_22000,
+       .base_params = &iwl_22000_base_params,
+       .integrated = true,
+       .xtal_latency = 12000,
+       .low_latency_xtal = true,
+ };
+ const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = {
+       .mq_rx_supported = true,
+       .use_tfh = true,
+       .rf_id = true,
+       .gen2 = true,
+       .device_family = IWL_DEVICE_FAMILY_22000,
+       .base_params = &iwl_22000_base_params,
+ };
  /*
   * If the device doesn't support HE, no need to have that many buffers.
   * 22000 devices can split multiple frames into a single RB, so fewer are
  #define IWL_NUM_RBDS_22000_HE         2048
  #define IWL_NUM_RBDS_AX210_HE         4096
  
+ /*
+  * All JF radio modules are part of the 9000 series, but the MAC part
+  * looks more like 22000.  That's why this device is here, but called
+  * 9560 nevertheless.
+  */
+ const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg = {
+       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
+       IWL_DEVICE_22500,
+       .num_rbds = IWL_NUM_RBDS_NON_HE,
+ };
+ const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg = {
+       .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
+       IWL_DEVICE_22500,
+       .num_rbds = IWL_NUM_RBDS_NON_HE,
+ };
+ const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = {
+       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
+       IWL_DEVICE_22500,
+       /*
+        * This device doesn't support receiving BlockAck with a large bitmap
+        * so we need to restrict the size of transmitted aggregation to the
+        * HT size; mac80211 would otherwise pick the HE max (256) by default.
+        */
+       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
+       .num_rbds = IWL_NUM_RBDS_NON_HE,
+ };
+ const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg = {
+       .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
+       IWL_DEVICE_22500,
+       /*
+        * This device doesn't support receiving BlockAck with a large bitmap
+        * so we need to restrict the size of transmitted aggregation to the
+        * HT size; mac80211 would otherwise pick the HE max (256) by default.
+        */
+       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
+       .num_rbds = IWL_NUM_RBDS_NON_HE,
+ };
  const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
        .device_family = IWL_DEVICE_FAMILY_22000,
        .base_params = &iwl_22000_base_params,
@@@ -300,7 -367,6 +367,7 @@@ const struct iwl_cfg iwl_ax101_cfg_qu_c
         * HT size; mac80211 would otherwise pick the HE max (256) by default.
         */
        .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
 +      .tx_with_siso_diversity = true,
        .num_rbds = IWL_NUM_RBDS_22000_HE,
  };
  
@@@ -327,7 -393,6 +394,7 @@@ const struct iwl_cfg iwl_ax101_cfg_quz_
         * HT size; mac80211 would otherwise pick the HE max (256) by default.
         */
        .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
 +      .tx_with_siso_diversity = true,
        .num_rbds = IWL_NUM_RBDS_22000_HE,
  };
  
@@@ -382,184 -447,6 +449,6 @@@ const struct iwl_cfg iwl_ax200_cfg_cc 
        .num_rbds = IWL_NUM_RBDS_22000_HE,
  };
  
- /*
-  * All JF radio modules are part of the 9000 series, but the MAC part
-  * looks more like 22000.  That's why this device is here, but called
-  * 9560 nevertheless.
-  */
- const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9461",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9462",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9560",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9560 160MHz",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9461",
-       .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9462",
-       .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9560",
-       .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9560 160MHz",
-       .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = {
-       .name = "Intel(R) Wireless-AC 9560 160MHz",
-       .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_cfg_quz_a0_jf_b0_soc = {
-       .name = "Intel(R) Wireless-AC 9560 160MHz",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc = {
-       .name = "Intel(R) Wireless-AC 9560 160MHz",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9461_2ac_cfg_quz_a0_jf_b0_soc = {
-       .name = "Intel(R) Dual Band Wireless AC 9461",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9462_2ac_cfg_quz_a0_jf_b0_soc = {
-       .name = "Intel(R) Dual Band Wireless AC 9462",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_killer_s_2ac_cfg_quz_a0_jf_b0_soc = {
-       .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg iwl9560_killer_i_2ac_cfg_quz_a0_jf_b0_soc = {
-       .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
-       .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .integrated = true,
-       .soc_latency = 5000,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0 = {
-       .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
- const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0 = {
-       .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       .num_rbds = IWL_NUM_RBDS_NON_HE,
- };
  const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
        .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
        .fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
@@@ -612,32 -499,6 +501,6 @@@ const struct iwl_cfg killer1650i_2ax_cf
        .num_rbds = IWL_NUM_RBDS_22000_HE,
  };
  
- const struct iwl_cfg iwl22000_2ax_cfg_jf = {
-       .name = "Intel(R) Dual Band Wireless AX 22000",
-       .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .num_rbds = IWL_NUM_RBDS_22000_HE,
- };
- const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0_f0 = {
-       .name = "Intel(R) Dual Band Wireless AX 22000",
-       .fw_name_pre = IWL_22000_HR_A_F0_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .num_rbds = IWL_NUM_RBDS_22000_HE,
- };
  const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0 = {
        .name = "Intel(R) Dual Band Wireless AX 22000",
        .fw_name_pre = IWL_22000_HR_B_FW_PRE,
        .num_rbds = IWL_NUM_RBDS_22000_HE,
  };
  
- const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0 = {
-       .name = "Intel(R) Dual Band Wireless AX 22000",
-       .fw_name_pre = IWL_22000_HR_A0_FW_PRE,
-       IWL_DEVICE_22500,
-       /*
-        * This device doesn't support receiving BlockAck with a large bitmap
-        * so we need to restrict the size of transmitted aggregation to the
-        * HT size; mac80211 would otherwise pick the HE max (256) by default.
-        */
-       .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
-       .num_rbds = IWL_NUM_RBDS_22000_HE,
- };
  const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0 = {
        .name = "Intel(R) Wireless-AC 9560 160MHz",
        .fw_name_pre = IWL_22000_SO_A_JF_B_FW_PRE,
@@@ -712,9 -560,7 +562,7 @@@ const struct iwl_cfg iwlax411_2ax_cfg_s
  
  MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
  MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
- MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
  MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
- MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
  MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
  MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
  MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
@@@ -8,7 -8,7 +8,7 @@@
   * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
   * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
   * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 - * Copyright(c) 2018 - 2019 Intel Corporation
 + * Copyright(c) 2018 - 2020 Intel Corporation
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of version 2 of the GNU General Public License as
@@@ -31,7 -31,7 +31,7 @@@
   * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
   * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
   * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 - * Copyright(c) 2018 - 2019 Intel Corporation
 + * Copyright(c) 2018 - 2020 Intel Corporation
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -1108,6 -1108,38 +1108,38 @@@ static int iwl_dump_ini_csr_iter(struc
        return sizeof(*range) + le32_to_cpu(range->range_data_size);
  }
  
+ static int iwl_dump_ini_config_iter(struct iwl_fw_runtime *fwrt,
+                                   struct iwl_dump_ini_region_data *reg_data,
+                                   void *range_ptr, int idx)
+ {
+       struct iwl_trans *trans = fwrt->trans;
+       struct iwl_fw_ini_region_tlv *reg = (void *)reg_data->reg_tlv->data;
+       struct iwl_fw_ini_error_dump_range *range = range_ptr;
+       __le32 *val = range->data;
+       u32 addr = le32_to_cpu(reg->addrs[idx]) +
+                  le32_to_cpu(reg->dev_addr.offset);
+       int i;
+       /* we shouldn't get here if the trans doesn't have read_config32 */
+       if (WARN_ON_ONCE(!trans->ops->read_config32))
+               return -EOPNOTSUPP;
+       range->internal_base_addr = cpu_to_le32(addr);
+       range->range_data_size = reg->dev_addr.size;
+       for (i = 0; i < le32_to_cpu(reg->dev_addr.size); i += 4) {
+               int ret;
+               u32 tmp;
+               ret = trans->ops->read_config32(trans, addr + i, &tmp);
+               if (ret < 0)
+                       return ret;
+               *val++ = cpu_to_le32(tmp);
+       }
+       return sizeof(*range) + le32_to_cpu(range->range_data_size);
+ }
  static int iwl_dump_ini_dev_mem_iter(struct iwl_fw_runtime *fwrt,
                                     struct iwl_dump_ini_region_data *reg_data,
                                     void *range_ptr, int idx)
@@@ -1409,7 -1441,11 +1441,7 @@@ static int iwl_dump_ini_rxf_iter(struc
                goto out;
        }
  
 -      /*
 -       * region register have absolute value so apply rxf offset after
 -       * reading the registers
 -       */
 -      offs += rxf_data.offset;
 +      offs = rxf_data.offset;
  
        /* Lock fence */
        iwl_write_prph_no_grab(fwrt->trans, RXF_SET_FENCE_MODE + offs, 0x1);
@@@ -1701,13 -1737,7 +1733,7 @@@ iwl_dump_ini_mon_smem_get_size(struct i
                               struct iwl_dump_ini_region_data *reg_data)
  {
        struct iwl_fw_ini_region_tlv *reg = (void *)reg_data->reg_tlv->data;
-       struct iwl_fw_ini_allocation_tlv *fw_mon_cfg;
-       u32 alloc_id = le32_to_cpu(reg->internal_buffer.alloc_id), size;
-       fw_mon_cfg = &fwrt->trans->dbg.fw_mon_cfg[alloc_id];
-       if (le32_to_cpu(fw_mon_cfg->buf_location) !=
-           IWL_FW_INI_LOCATION_SRAM_PATH)
-               return 0;
+       u32 size;
  
        size = le32_to_cpu(reg->internal_buffer.size);
        if (!size)
@@@ -2048,7 -2078,12 +2074,12 @@@ static const struct iwl_dump_ini_mem_op
                .fill_range = iwl_dump_ini_csr_iter,
        },
        [IWL_FW_INI_REGION_DRAM_IMR] = {},
-       [IWL_FW_INI_REGION_PCI_IOSF_CONFIG] = {},
+       [IWL_FW_INI_REGION_PCI_IOSF_CONFIG] = {
+               .get_num_of_ranges = iwl_dump_ini_mem_ranges,
+               .get_size = iwl_dump_ini_mem_get_size,
+               .fill_mem_hdr = iwl_dump_ini_mem_fill_header,
+               .fill_range = iwl_dump_ini_config_iter,
+       },
  };
  
  static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
@@@ -2490,7 -2525,10 +2521,7 @@@ static void iwl_fw_dbg_collect_sync(str
                goto out;
        }
  
 -      if (iwl_fw_dbg_stop_restart_recording(fwrt, &params, true)) {
 -              IWL_ERR(fwrt, "Failed to stop DBGC recording, aborting dump\n");
 -              goto out;
 -      }
 +      iwl_fw_dbg_stop_restart_recording(fwrt, &params, true);
  
        IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection start\n");
        if (iwl_trans_dbg_ini_valid(fwrt->trans))
@@@ -2655,14 -2693,14 +2686,14 @@@ static int iwl_fw_dbg_restart_recording
        return 0;
  }
  
 -int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
 -                                    struct iwl_fw_dbg_params *params,
 -                                    bool stop)
 +void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
 +                                     struct iwl_fw_dbg_params *params,
 +                                     bool stop)
  {
        int ret = 0;
  
        if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status))
 -              return 0;
 +              return;
  
        if (fw_has_capa(&fwrt->fw->ucode_capa,
                        IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP))
                        iwl_fw_set_dbg_rec_on(fwrt);
        }
  #endif
 -
 -      return ret;
  }
  IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_restart_recording);
@@@ -1467,7 -1467,7 +1467,7 @@@ static void iwl_req_fw_callback(const s
                                kmemdup(pieces->dbg_conf_tlv[i],
                                        pieces->dbg_conf_tlv_len[i],
                                        GFP_KERNEL);
 -                      if (!pieces->dbg_conf_tlv_len[i])
 +                      if (!pieces->dbg_conf_tlv[i])
                                goto out_free_fw;
                }
        }
@@@ -1715,6 -1715,7 +1715,7 @@@ struct iwl_mod_params iwlwifi_mod_param
        .bt_coex_active = true,
        .power_level = IWL_POWER_INDEX_1,
        .uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
+       .enable_ini = true,
        /* the rest are 0 by default */
  };
  IWL_EXPORT_SYMBOL(iwlwifi_mod_params);
@@@ -1837,7 -1838,7 +1838,7 @@@ MODULE_PARM_DESC(uapsd_disable
  module_param_named(enable_ini, iwlwifi_mod_params.enable_ini,
                   bool, S_IRUGO | S_IWUSR);
  MODULE_PARM_DESC(enable_ini,
-                "Enable debug INI TLV FW debug infrastructure (default: 0");
+                "Enable debug INI TLV FW debug infrastructure (default: true");
  
  /*
   * set bt_coex_active to true, uCode will do kill/defer
@@@ -5,10 -5,9 +5,9 @@@
   *
   * GPL LICENSE SUMMARY
   *
-  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
   * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
   * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
-  * Copyright(c) 2018 - 2019        Intel Corporation
+  * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of version 2 of the GNU General Public License as
   *
   * BSD LICENSE
   *
-  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
   * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
   * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
-  * Copyright(c) 2018 - 2019       Intel Corporation
+  * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -89,6 -87,36 +87,36 @@@ struct iwl_mvm_alive_data 
        u32 scd_base_addr;
  };
  
+ /* set device type and latency */
+ static int iwl_set_soc_latency(struct iwl_mvm *mvm)
+ {
+       struct iwl_soc_configuration_cmd cmd = {};
+       int ret;
+       /*
+        * In VER_1 of this command, the discrete value is considered
+        * an integer; In VER_2, it's a bitmask.  Since we have only 2
+        * values in VER_1, this is backwards-compatible with VER_2,
+        * as long as we don't set any other bits.
+        */
+       if (!mvm->trans->trans_cfg->integrated)
+               cmd.flags = cpu_to_le32(SOC_CONFIG_CMD_FLAGS_DISCRETE);
+       if (iwl_mvm_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP,
+                                  SCAN_REQ_UMAC) >= 2 &&
+           (mvm->trans->trans_cfg->low_latency_xtal))
+               cmd.flags |= cpu_to_le32(SOC_CONFIG_CMD_FLAGS_LOW_LATENCY);
+       cmd.latency = cpu_to_le32(mvm->trans->trans_cfg->xtal_latency);
+       ret = iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(SOC_CONFIGURATION_CMD,
+                                                  SYSTEM_GROUP, 0), 0,
+                                  sizeof(cmd), &cmd);
+       if (ret)
+               IWL_ERR(mvm, "Failed to set soc latency: %d\n", ret);
+       return ret;
+ }
  static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant)
  {
        struct iwl_tx_ant_cfg_cmd tx_ant_cmd = {
@@@ -544,7 -572,8 +572,8 @@@ static int iwl_send_phy_cfg_cmd(struct 
        phy_cfg_cmd.phy_cfg = cpu_to_le32(iwl_mvm_get_phy_config(mvm));
  
        /* set flags extra PHY configuration flags from the device's cfg */
-       phy_cfg_cmd.phy_cfg |= cpu_to_le32(mvm->cfg->extra_phy_cfg_flags);
+       phy_cfg_cmd.phy_cfg |=
+               cpu_to_le32(mvm->trans->trans_cfg->extra_phy_cfg_flags);
  
        phy_cfg_cmd.calib_control.event_trigger =
                mvm->fw->default_calib[ucode_type].event_trigger;
@@@ -762,17 -791,10 +791,17 @@@ static int iwl_mvm_sar_geo_init(struct 
        u16 cmd_wide_id =  WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);
        union geo_tx_power_profiles_cmd cmd;
        u16 len;
 +      int ret;
  
        cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES);
  
 -      iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table);
 +      ret = iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table);
 +      /*
 +       * It is a valid scenario to not support SAR, or miss wgds table,
 +       * but in that case there is no need to send the command.
 +       */
 +      if (ret)
 +              return 0;
  
        cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
  
@@@ -1110,6 -1132,13 +1139,13 @@@ int iwl_mvm_up(struct iwl_mvm *mvm
        if (ret)
                goto error;
  
+       if (fw_has_capa(&mvm->fw->ucode_capa,
+                       IWL_UCODE_TLV_CAPA_SOC_LATENCY_SUPPORT)) {
+               ret = iwl_set_soc_latency(mvm);
+               if (ret)
+                       goto error;
+       }
        /* Init RSS configuration */
        if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
                ret = iwl_configure_rxq(mvm);
@@@ -6,7 -6,7 +6,7 @@@
   * GPL LICENSE SUMMARY
   *
   * Copyright(c) 2017        Intel Deutschland GmbH
 - * Copyright(c) 2018 - 2019 Intel Corporation
 + * Copyright(c) 2018 - 2020 Intel Corporation
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of version 2 of the GNU General Public License as
@@@ -27,7 -27,7 +27,7 @@@
   * BSD LICENSE
   *
   * Copyright(c) 2017        Intel Deutschland GmbH
 - * Copyright(c) 2018 - 2019 Intel Corporation
 + * Copyright(c) 2018 - 2020 Intel Corporation
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
@@@ -147,11 -147,7 +147,11 @@@ static u16 rs_fw_get_config_flags(struc
             (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))))
                flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
  
 -      /* consider our LDPC support in case of HE */
 +      /* consider LDPC support in case of HE */
 +      if (he_cap->has_he && (he_cap->he_cap_elem.phy_cap_info[1] &
 +          IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD))
 +              flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
 +
        if (sband->iftype_data && sband->iftype_data->he_cap.has_he &&
            !(sband->iftype_data->he_cap.he_cap_elem.phy_cap_info[1] &
             IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD))
@@@ -195,13 -191,11 +195,13 @@@ rs_fw_vht_set_enabled_rates(const struc
  {
        u16 supp;
        int i, highest_mcs;
 +      u8 nss = sta->rx_nss;
  
 -      for (i = 0; i < sta->rx_nss; i++) {
 -              if (i == IWL_TLC_NSS_MAX)
 -                      break;
 +      /* the station support only a single receive chain */
 +      if (sta->smps_mode == IEEE80211_SMPS_STATIC)
 +              nss = 1;
  
 +      for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) {
                highest_mcs = rs_fw_vht_highest_rx_mcs_index(vht_cap, i + 1);
                if (!highest_mcs)
                        continue;
@@@ -247,13 -241,8 +247,13 @@@ rs_fw_he_set_enabled_rates(const struc
        u16 tx_mcs_160 =
                le16_to_cpu(sband->iftype_data->he_cap.he_mcs_nss_supp.tx_mcs_160);
        int i;
 +      u8 nss = sta->rx_nss;
  
 -      for (i = 0; i < sta->rx_nss && i < IWL_TLC_NSS_MAX; i++) {
 +      /* the station support only a single receive chain */
 +      if (sta->smps_mode == IEEE80211_SMPS_STATIC)
 +              nss = 1;
 +
 +      for (i = 0; i < nss && i < IWL_TLC_NSS_MAX; i++) {
                u16 _mcs_160 = (mcs_160 >> (2 * i)) & 0x3;
                u16 _mcs_80 = (mcs_80 >> (2 * i)) & 0x3;
                u16 _tx_mcs_160 = (tx_mcs_160 >> (2 * i)) & 0x3;
@@@ -314,14 -303,8 +314,14 @@@ static void rs_fw_set_supp_rates(struc
                cmd->mode = IWL_TLC_MNG_MODE_HT;
                cmd->ht_rates[IWL_TLC_NSS_1][IWL_TLC_HT_BW_NONE_160] =
                        cpu_to_le16(ht_cap->mcs.rx_mask[0]);
 -              cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
 -                      cpu_to_le16(ht_cap->mcs.rx_mask[1]);
 +
 +              /* the station support only a single receive chain */
 +              if (sta->smps_mode == IEEE80211_SMPS_STATIC)
 +                      cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
 +                              0;
 +              else
 +                      cmd->ht_rates[IWL_TLC_NSS_2][IWL_TLC_HT_BW_NONE_160] =
 +                              cpu_to_le16(ht_cap->mcs.rx_mask[1]);
        }
  }
  
@@@ -416,8 -399,7 +416,7 @@@ u16 rs_fw_get_max_amsdu_len(struct ieee
                        return IEEE80211_MAX_MPDU_LEN_VHT_7991;
                default:
                        return IEEE80211_MAX_MPDU_LEN_VHT_3895;
-       }
+               }
        } else if (ht_cap->ht_supported) {
                if (ht_cap->cap & IEEE80211_HT_CAP_MAX_AMSDU)
                        /*