Commit 67e974c3 authored by Kalle Valo's avatar Kalle Valo

Merge tag 'iwlwifi-next-for-kalle-2019-09-06' of...

Merge tag 'iwlwifi-next-for-kalle-2019-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Patches intended for v5.4

* Remove (broken) d0i3 support;
* Debug infrastructure work continues;
* Bump support FW API version to 50;
* Fix for the SN value in certain suspend/resume situations;
* Some work on new FW scan APIs;
* Work on LTR FW APIs;
* New FW channel-switch support;
* Support new ACPI value for per-platform antenna gain;
* Support for single antenna diversity;
* Support for new WoWLAN FW API;
* Initial refactoring of the device selection code;
* A bunch of clean-ups;
* Other small fixes and improvements;
parents d13b12c3 787350ef
...@@ -92,20 +92,6 @@ config IWLWIFI_BCAST_FILTERING ...@@ -92,20 +92,6 @@ config IWLWIFI_BCAST_FILTERING
If unsure, don't enable this option, as some programs might If unsure, don't enable this option, as some programs might
expect incoming broadcasts for their normal operations. expect incoming broadcasts for their normal operations.
config IWLWIFI_PCIE_RTPM
bool "Enable runtime power management mode for PCIe devices"
depends on IWLMVM && PM && EXPERT
help
Say Y here to enable runtime power management for PCIe
devices. If enabled, the device will go into low power mode
when idle for a short period of time, allowing for improved
power saving during runtime. Note that this feature requires
a tight integration with the platform. It is not recommended
to enable this feature without proper validation with the
specific target platform.
If unsure, say N.
menu "Debugging Options" menu "Debugging Options"
config IWLWIFI_DEBUG config IWLWIFI_DEBUG
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -69,16 +69,16 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = { ...@@ -69,16 +69,16 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = {
.fw_name_pre = IWL1000_FW_PRE, \ .fw_name_pre = IWL1000_FW_PRE, \
.ucode_api_max = IWL1000_UCODE_API_MAX, \ .ucode_api_max = IWL1000_UCODE_API_MAX, \
.ucode_api_min = IWL1000_UCODE_API_MIN, \ .ucode_api_min = IWL1000_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_1000, \ .trans.device_family = IWL_DEVICE_FAMILY_1000, \
.max_inst_size = IWLAGN_RTC_INST_SIZE, \ .max_inst_size = IWLAGN_RTC_INST_SIZE, \
.max_data_size = IWLAGN_RTC_DATA_SIZE, \ .max_data_size = IWLAGN_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \ .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
.base_params = &iwl1000_base_params, \ .trans.base_params = &iwl1000_base_params, \
.eeprom_params = &iwl1000_eeprom_params, \ .eeprom_params = &iwl1000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl1000_bgn_cfg = { const struct iwl_cfg iwl1000_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
...@@ -95,17 +95,17 @@ const struct iwl_cfg iwl1000_bg_cfg = { ...@@ -95,17 +95,17 @@ const struct iwl_cfg iwl1000_bg_cfg = {
.fw_name_pre = IWL100_FW_PRE, \ .fw_name_pre = IWL100_FW_PRE, \
.ucode_api_max = IWL100_UCODE_API_MAX, \ .ucode_api_max = IWL100_UCODE_API_MAX, \
.ucode_api_min = IWL100_UCODE_API_MIN, \ .ucode_api_min = IWL100_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_100, \ .trans.device_family = IWL_DEVICE_FAMILY_100, \
.max_inst_size = IWLAGN_RTC_INST_SIZE, \ .max_inst_size = IWLAGN_RTC_INST_SIZE, \
.max_data_size = IWLAGN_RTC_DATA_SIZE, \ .max_data_size = IWLAGN_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \ .nvm_ver = EEPROM_1000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
.base_params = &iwl1000_base_params, \ .trans.base_params = &iwl1000_base_params, \
.eeprom_params = &iwl1000_eeprom_params, \ .eeprom_params = &iwl1000_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.rx_with_siso_diversity = true, \ .rx_with_siso_diversity = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl100_bgn_cfg = { const struct iwl_cfg iwl100_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 100 BGN", .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -95,16 +95,16 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = { ...@@ -95,16 +95,16 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
.fw_name_pre = IWL2000_FW_PRE, \ .fw_name_pre = IWL2000_FW_PRE, \
.ucode_api_max = IWL2000_UCODE_API_MAX, \ .ucode_api_max = IWL2000_UCODE_API_MAX, \
.ucode_api_min = IWL2000_UCODE_API_MIN, \ .ucode_api_min = IWL2000_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_2000, \ .trans.device_family = IWL_DEVICE_FAMILY_2000, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \ .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
.base_params = &iwl2000_base_params, \ .trans.base_params = &iwl2000_base_params, \
.eeprom_params = &iwl20x0_eeprom_params, \ .eeprom_params = &iwl20x0_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl2000_2bgn_cfg = { const struct iwl_cfg iwl2000_2bgn_cfg = {
...@@ -123,16 +123,16 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = { ...@@ -123,16 +123,16 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = {
.fw_name_pre = IWL2030_FW_PRE, \ .fw_name_pre = IWL2030_FW_PRE, \
.ucode_api_max = IWL2030_UCODE_API_MAX, \ .ucode_api_max = IWL2030_UCODE_API_MAX, \
.ucode_api_min = IWL2030_UCODE_API_MIN, \ .ucode_api_min = IWL2030_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_2030, \ .trans.device_family = IWL_DEVICE_FAMILY_2030, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \ .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
.base_params = &iwl2030_base_params, \ .trans.base_params = &iwl2030_base_params, \
.eeprom_params = &iwl20x0_eeprom_params, \ .eeprom_params = &iwl20x0_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl2030_2bgn_cfg = { const struct iwl_cfg iwl2030_2bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 2230 BGN", .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
...@@ -144,17 +144,17 @@ const struct iwl_cfg iwl2030_2bgn_cfg = { ...@@ -144,17 +144,17 @@ const struct iwl_cfg iwl2030_2bgn_cfg = {
.fw_name_pre = IWL105_FW_PRE, \ .fw_name_pre = IWL105_FW_PRE, \
.ucode_api_max = IWL105_UCODE_API_MAX, \ .ucode_api_max = IWL105_UCODE_API_MAX, \
.ucode_api_min = IWL105_UCODE_API_MIN, \ .ucode_api_min = IWL105_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_105, \ .trans.device_family = IWL_DEVICE_FAMILY_105, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \ .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
.base_params = &iwl2000_base_params, \ .trans.base_params = &iwl2000_base_params, \
.eeprom_params = &iwl20x0_eeprom_params, \ .eeprom_params = &iwl20x0_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.rx_with_siso_diversity = true, \ .rx_with_siso_diversity = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl105_bgn_cfg = { const struct iwl_cfg iwl105_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 105 BGN", .name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
...@@ -172,17 +172,17 @@ const struct iwl_cfg iwl105_bgn_d_cfg = { ...@@ -172,17 +172,17 @@ const struct iwl_cfg iwl105_bgn_d_cfg = {
.fw_name_pre = IWL135_FW_PRE, \ .fw_name_pre = IWL135_FW_PRE, \
.ucode_api_max = IWL135_UCODE_API_MAX, \ .ucode_api_max = IWL135_UCODE_API_MAX, \
.ucode_api_min = IWL135_UCODE_API_MIN, \ .ucode_api_min = IWL135_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_135, \ .trans.device_family = IWL_DEVICE_FAMILY_135, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \ .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
.base_params = &iwl2030_base_params, \ .trans.base_params = &iwl2030_base_params, \
.eeprom_params = &iwl20x0_eeprom_params, \ .eeprom_params = &iwl20x0_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.rx_with_siso_diversity = true, \ .rx_with_siso_diversity = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl135_bgn_cfg = { const struct iwl_cfg iwl135_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N 135 BGN", .name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#include "iwl-config.h" #include "iwl-config.h"
/* Highest firmware API version supported */ /* Highest firmware API version supported */
#define IWL_22000_UCODE_API_MAX 48 #define IWL_22000_UCODE_API_MAX 50
/* Lowest firmware API version supported */ /* Lowest firmware API version supported */
#define IWL_22000_UCODE_API_MIN 39 #define IWL_22000_UCODE_API_MIN 39
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
#define IWL_22000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-" #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_CDB_FW_PRE "iwlwifi-QuIcp-z0-hrcdb-a0-"
#define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-" #define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-"
#define IWL_22000_HR_B_F0_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
#define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" #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_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
#define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-" #define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-"
...@@ -99,8 +98,6 @@ ...@@ -99,8 +98,6 @@
IWL_22000_JF_FW_PRE __stringify(api) ".ucode" IWL_22000_JF_FW_PRE __stringify(api) ".ucode"
#define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \ #define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \
IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode" IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode"
#define IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(api) \
IWL_22000_HR_B_F0_FW_PRE __stringify(api) ".ucode"
#define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \ #define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \
IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode" IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
#define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \ #define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \
...@@ -172,15 +169,15 @@ static const struct iwl_ht_params iwl_22000_ht_params = { ...@@ -172,15 +169,15 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
.smem_len = IWL_22000_SMEM_LEN, \ .smem_len = IWL_22000_SMEM_LEN, \
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
.apmg_not_supported = true, \ .apmg_not_supported = true, \
.mq_rx_supported = true, \ .trans.mq_rx_supported = true, \
.vht_mu_mimo_supported = true, \ .vht_mu_mimo_supported = true, \
.mac_addr_from_csr = true, \ .mac_addr_from_csr = true, \
.ht_params = &iwl_22000_ht_params, \ .ht_params = &iwl_22000_ht_params, \
.nvm_ver = IWL_22000_NVM_VERSION, \ .nvm_ver = IWL_22000_NVM_VERSION, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.use_tfh = true, \ .trans.use_tfh = true, \
.rf_id = true, \ .trans.rf_id = true, \
.gen2 = true, \ .trans.gen2 = true, \
.nvm_type = IWL_NVM_EXT, \ .nvm_type = IWL_NVM_EXT, \
.dbgc_supported = true, \ .dbgc_supported = true, \
.min_umac_error_event_table = 0x400000, \ .min_umac_error_event_table = 0x400000, \
...@@ -191,28 +188,25 @@ static const struct iwl_ht_params iwl_22000_ht_params = { ...@@ -191,28 +188,25 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
.fw_mon_smem_cycle_cnt_ptr_addr = 0xa0c174, \ .fw_mon_smem_cycle_cnt_ptr_addr = 0xa0c174, \
.fw_mon_smem_cycle_cnt_ptr_msk = 0xfffff .fw_mon_smem_cycle_cnt_ptr_msk = 0xfffff
#define IWL_DEVICE_AX200_COMMON \
IWL_DEVICE_22000_COMMON, \
.umac_prph_offset = 0x300000
#define IWL_DEVICE_22500 \ #define IWL_DEVICE_22500 \
IWL_DEVICE_22000_COMMON, \ IWL_DEVICE_22000_COMMON, \
.device_family = IWL_DEVICE_FAMILY_22000, \ .trans.device_family = IWL_DEVICE_FAMILY_22000, \
.base_params = &iwl_22000_base_params, \ .trans.base_params = &iwl_22000_base_params, \
.csr = &iwl_csr_v1, \ .trans.csr = &iwl_csr_v1, \
.gp2_reg_addr = 0xa02c68 .gp2_reg_addr = 0xa02c68
#define IWL_DEVICE_22560 \ #define IWL_DEVICE_22560 \
IWL_DEVICE_22000_COMMON, \ IWL_DEVICE_22000_COMMON, \
.device_family = IWL_DEVICE_FAMILY_22560, \ .trans.device_family = IWL_DEVICE_FAMILY_22560, \
.base_params = &iwl_22560_base_params, \ .trans.base_params = &iwl_22560_base_params, \
.csr = &iwl_csr_v2 .trans.csr = &iwl_csr_v2
#define IWL_DEVICE_AX210 \ #define IWL_DEVICE_AX210 \
IWL_DEVICE_AX200_COMMON, \ IWL_DEVICE_22000_COMMON, \
.device_family = IWL_DEVICE_FAMILY_AX210, \ .trans.umac_prph_offset = 0x300000, \
.base_params = &iwl_22560_base_params, \ .trans.device_family = IWL_DEVICE_FAMILY_AX210, \
.csr = &iwl_csr_v1, \ .trans.base_params = &iwl_22560_base_params, \
.trans.csr = &iwl_csr_v1, \
.min_txq_size = 128, \ .min_txq_size = 128, \
.gp2_reg_addr = 0xd02c68, \ .gp2_reg_addr = 0xd02c68, \
.min_256_ba_txq_size = 512 .min_256_ba_txq_size = 512
...@@ -246,6 +240,7 @@ const struct iwl_cfg iwl_ax101_cfg_qu_hr = { ...@@ -246,6 +240,7 @@ const struct iwl_cfg iwl_ax101_cfg_qu_hr = {
* HT size; mac80211 would otherwise pick the HE max (256) by default. * HT size; mac80211 would otherwise pick the HE max (256) by default.
*/ */
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
.tx_with_siso_diversity = true,
}; };
const struct iwl_cfg iwl_ax201_cfg_qu_hr = { const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
...@@ -342,7 +337,7 @@ const struct iwl_cfg iwl_ax200_cfg_cc = { ...@@ -342,7 +337,7 @@ const struct iwl_cfg iwl_ax200_cfg_cc = {
* HT size; mac80211 would otherwise pick the HE max (256) by default. * HT size; mac80211 would otherwise pick the HE max (256) by default.
*/ */
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
.bisr_workaround = 1, .trans.bisr_workaround = 1,
}; };
const struct iwl_cfg killer1650x_2ax_cfg = { const struct iwl_cfg killer1650x_2ax_cfg = {
...@@ -355,7 +350,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = { ...@@ -355,7 +350,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
* HT size; mac80211 would otherwise pick the HE max (256) by default. * HT size; mac80211 would otherwise pick the HE max (256) by default.
*/ */
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
.bisr_workaround = 1, .trans.bisr_workaround = 1,
}; };
const struct iwl_cfg killer1650w_2ax_cfg = { const struct iwl_cfg killer1650w_2ax_cfg = {
...@@ -368,7 +363,7 @@ const struct iwl_cfg killer1650w_2ax_cfg = { ...@@ -368,7 +363,7 @@ const struct iwl_cfg killer1650w_2ax_cfg = {
* HT size; mac80211 would otherwise pick the HE max (256) by default. * HT size; mac80211 would otherwise pick the HE max (256) by default.
*/ */
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
.bisr_workaround = 1, .trans.bisr_workaround = 1,
}; };
/* /*
...@@ -663,7 +658,6 @@ const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { ...@@ -663,7 +658,6 @@ const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 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_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_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_22000_HR_B_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_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_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_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
......
...@@ -67,16 +67,16 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = { ...@@ -67,16 +67,16 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = {
.fw_name_pre = IWL5000_FW_PRE, \ .fw_name_pre = IWL5000_FW_PRE, \
.ucode_api_max = IWL5000_UCODE_API_MAX, \ .ucode_api_max = IWL5000_UCODE_API_MAX, \
.ucode_api_min = IWL5000_UCODE_API_MIN, \ .ucode_api_min = IWL5000_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_5000, \ .trans.device_family = IWL_DEVICE_FAMILY_5000, \
.max_inst_size = IWLAGN_RTC_INST_SIZE, \ .max_inst_size = IWLAGN_RTC_INST_SIZE, \
.max_data_size = IWLAGN_RTC_DATA_SIZE, \ .max_data_size = IWLAGN_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_5000_EEPROM_VERSION, \ .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
.base_params = &iwl5000_base_params, \ .trans.base_params = &iwl5000_base_params, \
.eeprom_params = &iwl5000_eeprom_params, \ .eeprom_params = &iwl5000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl5300_agn_cfg = { const struct iwl_cfg iwl5300_agn_cfg = {
.name = "Intel(R) Ultimate N WiFi Link 5300 AGN", .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
...@@ -115,34 +115,34 @@ const struct iwl_cfg iwl5350_agn_cfg = { ...@@ -115,34 +115,34 @@ const struct iwl_cfg iwl5350_agn_cfg = {
.fw_name_pre = IWL5000_FW_PRE, .fw_name_pre = IWL5000_FW_PRE,
.ucode_api_max = IWL5000_UCODE_API_MAX, .ucode_api_max = IWL5000_UCODE_API_MAX,
.ucode_api_min = IWL5000_UCODE_API_MIN, .ucode_api_min = IWL5000_UCODE_API_MIN,
.device_family = IWL_DEVICE_FAMILY_5000, .trans.device_family = IWL_DEVICE_FAMILY_5000,
.max_inst_size = IWLAGN_RTC_INST_SIZE, .max_inst_size = IWLAGN_RTC_INST_SIZE,
.max_data_size = IWLAGN_RTC_DATA_SIZE, .max_data_size = IWLAGN_RTC_DATA_SIZE,
.nvm_ver = EEPROM_5050_EEPROM_VERSION, .nvm_ver = EEPROM_5050_EEPROM_VERSION,
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
.base_params = &iwl5000_base_params, .trans.base_params = &iwl5000_base_params,
.eeprom_params = &iwl5000_eeprom_params, .eeprom_params = &iwl5000_eeprom_params,
.ht_params = &iwl5000_ht_params, .ht_params = &iwl5000_ht_params,
.led_mode = IWL_LED_BLINK, .led_mode = IWL_LED_BLINK,
.internal_wimax_coex = true, .internal_wimax_coex = true,
.csr = &iwl_csr_v1, .trans.csr = &iwl_csr_v1,
}; };
#define IWL_DEVICE_5150 \ #define IWL_DEVICE_5150 \
.fw_name_pre = IWL5150_FW_PRE, \ .fw_name_pre = IWL5150_FW_PRE, \
.ucode_api_max = IWL5150_UCODE_API_MAX, \ .ucode_api_max = IWL5150_UCODE_API_MAX, \
.ucode_api_min = IWL5150_UCODE_API_MIN, \ .ucode_api_min = IWL5150_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_5150, \ .trans.device_family = IWL_DEVICE_FAMILY_5150, \
.max_inst_size = IWLAGN_RTC_INST_SIZE, \ .max_inst_size = IWLAGN_RTC_INST_SIZE, \
.max_data_size = IWLAGN_RTC_DATA_SIZE, \ .max_data_size = IWLAGN_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_5050_EEPROM_VERSION, \ .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
.base_params = &iwl5000_base_params, \ .trans.base_params = &iwl5000_base_params, \
.eeprom_params = &iwl5000_eeprom_params, \ .eeprom_params = &iwl5000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.internal_wimax_coex = true, \ .internal_wimax_coex = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl5150_agn_cfg = { const struct iwl_cfg iwl5150_agn_cfg = {
.name = "Intel(R) WiMAX/WiFi Link 5150 AGN", .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -116,16 +116,16 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = { ...@@ -116,16 +116,16 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = {
.fw_name_pre = IWL6005_FW_PRE, \ .fw_name_pre = IWL6005_FW_PRE, \
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \ .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6005, \ .trans.device_family = IWL_DEVICE_FAMILY_6005, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_6005_EEPROM_VERSION, \ .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
.base_params = &iwl6000_g2_base_params, \ .trans.base_params = &iwl6000_g2_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6005_2agn_cfg = { const struct iwl_cfg iwl6005_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6205 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
...@@ -171,16 +171,16 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = { ...@@ -171,16 +171,16 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
.fw_name_pre = IWL6030_FW_PRE, \ .fw_name_pre = IWL6030_FW_PRE, \
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \ .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6030, \ .trans.device_family = IWL_DEVICE_FAMILY_6030, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_6030_EEPROM_VERSION, \ .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
.base_params = &iwl6000_g2_base_params, \ .trans.base_params = &iwl6000_g2_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6030_2agn_cfg = { const struct iwl_cfg iwl6030_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
...@@ -208,16 +208,16 @@ const struct iwl_cfg iwl6030_2bg_cfg = { ...@@ -208,16 +208,16 @@ const struct iwl_cfg iwl6030_2bg_cfg = {
.fw_name_pre = IWL6030_FW_PRE, \ .fw_name_pre = IWL6030_FW_PRE, \
.ucode_api_max = IWL6035_UCODE_API_MAX, \ .ucode_api_max = IWL6035_UCODE_API_MAX, \
.ucode_api_min = IWL6035_UCODE_API_MIN, \ .ucode_api_min = IWL6035_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6030, \ .trans.device_family = IWL_DEVICE_FAMILY_6030, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_6030_EEPROM_VERSION, \ .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
.base_params = &iwl6000_g2_base_params, \ .trans.base_params = &iwl6000_g2_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6035_2agn_cfg = { const struct iwl_cfg iwl6035_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6235 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
...@@ -262,18 +262,18 @@ const struct iwl_cfg iwl130_bg_cfg = { ...@@ -262,18 +262,18 @@ const struct iwl_cfg iwl130_bg_cfg = {
.fw_name_pre = IWL6000_FW_PRE, \ .fw_name_pre = IWL6000_FW_PRE, \
.ucode_api_max = IWL6000_UCODE_API_MAX, \ .ucode_api_max = IWL6000_UCODE_API_MAX, \
.ucode_api_min = IWL6000_UCODE_API_MIN, \ .ucode_api_min = IWL6000_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6000i, \ .trans.device_family = IWL_DEVICE_FAMILY_6000i, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
.valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
.nvm_ver = EEPROM_6000_EEPROM_VERSION, \ .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
.base_params = &iwl6000_base_params, \ .trans.base_params = &iwl6000_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6000i_2agn_cfg = { const struct iwl_cfg iwl6000i_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
...@@ -295,19 +295,19 @@ const struct iwl_cfg iwl6000i_2bg_cfg = { ...@@ -295,19 +295,19 @@ const struct iwl_cfg iwl6000i_2bg_cfg = {
.fw_name_pre = IWL6050_FW_PRE, \ .fw_name_pre = IWL6050_FW_PRE, \
.ucode_api_max = IWL6050_UCODE_API_MAX, \ .ucode_api_max = IWL6050_UCODE_API_MAX, \
.ucode_api_min = IWL6050_UCODE_API_MIN, \ .ucode_api_min = IWL6050_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6050, \ .trans.device_family = IWL_DEVICE_FAMILY_6050, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
.valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
.nvm_ver = EEPROM_6050_EEPROM_VERSION, \ .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
.base_params = &iwl6050_base_params, \ .trans.base_params = &iwl6050_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.internal_wimax_coex = true, \ .internal_wimax_coex = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6050_2agn_cfg = { const struct iwl_cfg iwl6050_2agn_cfg = {
.name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
...@@ -324,17 +324,17 @@ const struct iwl_cfg iwl6050_2abg_cfg = { ...@@ -324,17 +324,17 @@ const struct iwl_cfg iwl6050_2abg_cfg = {
.fw_name_pre = IWL6050_FW_PRE, \ .fw_name_pre = IWL6050_FW_PRE, \
.ucode_api_max = IWL6050_UCODE_API_MAX, \ .ucode_api_max = IWL6050_UCODE_API_MAX, \
.ucode_api_min = IWL6050_UCODE_API_MIN, \ .ucode_api_min = IWL6050_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_6150, \ .trans.device_family = IWL_DEVICE_FAMILY_6150, \
.max_inst_size = IWL60_RTC_INST_SIZE, \ .max_inst_size = IWL60_RTC_INST_SIZE, \
.max_data_size = IWL60_RTC_DATA_SIZE, \ .max_data_size = IWL60_RTC_DATA_SIZE, \
.nvm_ver = EEPROM_6150_EEPROM_VERSION, \ .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
.nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
.base_params = &iwl6050_base_params, \ .trans.base_params = &iwl6050_base_params, \
.eeprom_params = &iwl6000_eeprom_params, \ .eeprom_params = &iwl6000_eeprom_params, \
.led_mode = IWL_LED_BLINK, \ .led_mode = IWL_LED_BLINK, \
.internal_wimax_coex = true, \ .internal_wimax_coex = true, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
const struct iwl_cfg iwl6150_bgn_cfg = { const struct iwl_cfg iwl6150_bgn_cfg = {
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
...@@ -352,16 +352,16 @@ const struct iwl_cfg iwl6000_3agn_cfg = { ...@@ -352,16 +352,16 @@ const struct iwl_cfg iwl6000_3agn_cfg = {
.fw_name_pre = IWL6000_FW_PRE, .fw_name_pre = IWL6000_FW_PRE,
.ucode_api_max = IWL6000_UCODE_API_MAX, .ucode_api_max = IWL6000_UCODE_API_MAX,
.ucode_api_min = IWL6000_UCODE_API_MIN, .ucode_api_min = IWL6000_UCODE_API_MIN,
.device_family = IWL_DEVICE_FAMILY_6000, .trans.device_family = IWL_DEVICE_FAMILY_6000,
.max_inst_size = IWL60_RTC_INST_SIZE, .max_inst_size = IWL60_RTC_INST_SIZE,
.max_data_size = IWL60_RTC_DATA_SIZE, .max_data_size = IWL60_RTC_DATA_SIZE,
.nvm_ver = EEPROM_6000_EEPROM_VERSION, .nvm_ver = EEPROM_6000_EEPROM_VERSION,
.nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
.base_params = &iwl6000_base_params, .trans.base_params = &iwl6000_base_params,
.eeprom_params = &iwl6000_eeprom_params, .eeprom_params = &iwl6000_eeprom_params,
.ht_params = &iwl6000_ht_params, .ht_params = &iwl6000_ht_params,
.led_mode = IWL_LED_BLINK, .led_mode = IWL_LED_BLINK,
.csr = &iwl_csr_v1, .trans.csr = &iwl_csr_v1,
}; };
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -148,14 +148,14 @@ static const struct iwl_ht_params iwl7000_ht_params = { ...@@ -148,14 +148,14 @@ static const struct iwl_ht_params iwl7000_ht_params = {
}; };
#define IWL_DEVICE_7000_COMMON \ #define IWL_DEVICE_7000_COMMON \
.device_family = IWL_DEVICE_FAMILY_7000, \ .trans.device_family = IWL_DEVICE_FAMILY_7000, \
.base_params = &iwl7000_base_params, \ .trans.base_params = &iwl7000_base_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.nvm_hw_section_num = 0, \ .nvm_hw_section_num = 0, \
.non_shared_ant = ANT_A, \ .non_shared_ant = ANT_A, \
.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
.dccm_offset = IWL7000_DCCM_OFFSET, \ .dccm_offset = IWL7000_DCCM_OFFSET, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
#define IWL_DEVICE_7000 \ #define IWL_DEVICE_7000 \
IWL_DEVICE_7000_COMMON, \ IWL_DEVICE_7000_COMMON, \
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Copyright(c) 2014 Intel Corporation. All rights reserved. * Copyright(c) 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 Intel Deutschland GmbH * Copyright(c) 2016 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* *
* Copyright(c) 2014 Intel Corporation. All rights reserved. * Copyright(c) 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -134,8 +134,8 @@ static const struct iwl_tt_params iwl8000_tt_params = { ...@@ -134,8 +134,8 @@ static const struct iwl_tt_params iwl8000_tt_params = {
}; };
#define IWL_DEVICE_8000_COMMON \ #define IWL_DEVICE_8000_COMMON \
.device_family = IWL_DEVICE_FAMILY_8000, \ .trans.device_family = IWL_DEVICE_FAMILY_8000, \
.base_params = &iwl8000_base_params, \ .trans.base_params = &iwl8000_base_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.nvm_hw_section_num = 10, \ .nvm_hw_section_num = 10, \
.features = NETIF_F_RXCSUM, \ .features = NETIF_F_RXCSUM, \
...@@ -152,7 +152,7 @@ static const struct iwl_tt_params iwl8000_tt_params = { ...@@ -152,7 +152,7 @@ static const struct iwl_tt_params iwl8000_tt_params = {
.nvm_type = IWL_NVM_EXT, \ .nvm_type = IWL_NVM_EXT, \
.dbgc_supported = true, \ .dbgc_supported = true, \
.min_umac_error_event_table = 0x800000, \ .min_umac_error_event_table = 0x800000, \
.csr = &iwl_csr_v1 .trans.csr = &iwl_csr_v1
#define IWL_DEVICE_8000 \ #define IWL_DEVICE_8000 \
IWL_DEVICE_8000_COMMON, \ IWL_DEVICE_8000_COMMON, \
......
...@@ -122,8 +122,8 @@ static const struct iwl_tt_params iwl9000_tt_params = { ...@@ -122,8 +122,8 @@ static const struct iwl_tt_params iwl9000_tt_params = {
#define IWL_DEVICE_9000 \ #define IWL_DEVICE_9000 \
.ucode_api_max = IWL9000_UCODE_API_MAX, \ .ucode_api_max = IWL9000_UCODE_API_MAX, \
.ucode_api_min = IWL9000_UCODE_API_MIN, \ .ucode_api_min = IWL9000_UCODE_API_MIN, \
.device_family = IWL_DEVICE_FAMILY_9000, \ .trans.device_family = IWL_DEVICE_FAMILY_9000, \
.base_params = &iwl9000_base_params, \ .trans.base_params = &iwl9000_base_params, \
.led_mode = IWL_LED_RF_STATE, \ .led_mode = IWL_LED_RF_STATE, \
.nvm_hw_section_num = 10, \ .nvm_hw_section_num = 10, \
.non_shared_ant = ANT_B, \ .non_shared_ant = ANT_B, \
...@@ -136,14 +136,14 @@ static const struct iwl_tt_params iwl9000_tt_params = { ...@@ -136,14 +136,14 @@ static const struct iwl_tt_params iwl9000_tt_params = {
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
.thermal_params = &iwl9000_tt_params, \ .thermal_params = &iwl9000_tt_params, \
.apmg_not_supported = true, \ .apmg_not_supported = true, \
.mq_rx_supported = true, \ .trans.mq_rx_supported = true, \
.vht_mu_mimo_supported = true, \ .vht_mu_mimo_supported = true, \
.mac_addr_from_csr = true, \ .mac_addr_from_csr = true, \
.rf_id = true, \ .trans.rf_id = true, \
.nvm_type = IWL_NVM_EXT, \ .nvm_type = IWL_NVM_EXT, \
.dbgc_supported = true, \ .dbgc_supported = true, \
.min_umac_error_event_table = 0x800000, \ .min_umac_error_event_table = 0x800000, \
.csr = &iwl_csr_v1, \ .trans.csr = &iwl_csr_v1, \
.d3_debug_data_base_addr = 0x401000, \ .d3_debug_data_base_addr = 0x401000, \
.d3_debug_data_length = 92 * 1024, \ .d3_debug_data_length = 92 * 1024, \
.ht_params = &iwl9000_ht_params, \ .ht_params = &iwl9000_ht_params, \
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -483,7 +484,7 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) ...@@ -483,7 +484,7 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
/* NIC configuration for 6000 series */ /* NIC configuration for 6000 series */
static void iwl6000_nic_config(struct iwl_priv *priv) static void iwl6000_nic_config(struct iwl_priv *priv)
{ {
switch (priv->cfg->device_family) { switch (priv->trans->trans_cfg->device_family) {
case IWL_DEVICE_FAMILY_6005: case IWL_DEVICE_FAMILY_6005:
case IWL_DEVICE_FAMILY_6030: case IWL_DEVICE_FAMILY_6030:
case IWL_DEVICE_FAMILY_6000: case IWL_DEVICE_FAMILY_6000:
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -120,9 +121,9 @@ static int iwl_led_cmd(struct iwl_priv *priv, ...@@ -120,9 +121,9 @@ static int iwl_led_cmd(struct iwl_priv *priv,
} }
led_cmd.on = iwl_blink_compensation(priv, on, led_cmd.on = iwl_blink_compensation(priv, on,
priv->cfg->base_params->led_compensation); priv->trans->trans_cfg->base_params->led_compensation);
led_cmd.off = iwl_blink_compensation(priv, off, led_cmd.off = iwl_blink_compensation(priv, off,
priv->cfg->base_params->led_compensation); priv->trans->trans_cfg->base_params->led_compensation);
ret = iwl_send_led_cmd(priv, &led_cmd); ret = iwl_send_led_cmd(priv, &led_cmd);
if (!ret) { if (!ret) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* *
* Portions of this file are derived from the ipw3945 project, as well * Portions of this file are derived from the ipw3945 project, as well
* as portions of the ieee80211 subsystem header files. * as portions of the ieee80211 subsystem header files.
...@@ -1099,7 +1099,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1099,7 +1099,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
goto done; goto done;
} }
scd_queues = BIT(priv->cfg->base_params->num_of_queues) - 1; scd_queues = BIT(priv->trans->trans_cfg->base_params->num_of_queues) - 1;
scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) | scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) |
BIT(IWL_DEFAULT_CMD_QUEUE_NUM)); BIT(IWL_DEFAULT_CMD_QUEUE_NUM));
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* *
* Portions of this file are derived from the ipw3945 project, as well * Portions of this file are derived from the ipw3945 project, as well
* as portions of the ieee80211 subsystem header files. * as portions of the ieee80211 subsystem header files.
...@@ -1267,7 +1267,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, ...@@ -1267,7 +1267,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
priv->cfg = cfg; priv->cfg = cfg;
priv->fw = fw; priv->fw = fw;
switch (priv->cfg->device_family) { switch (priv->trans->trans_cfg->device_family) {
case IWL_DEVICE_FAMILY_1000: case IWL_DEVICE_FAMILY_1000:
case IWL_DEVICE_FAMILY_100: case IWL_DEVICE_FAMILY_100:
priv->lib = &iwl_dvm_1000_cfg; priv->lib = &iwl_dvm_1000_cfg;
...@@ -1342,7 +1342,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, ...@@ -1342,7 +1342,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
driver_data[2]); driver_data[2]);
WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE < WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE <
priv->cfg->base_params->num_of_queues); priv->trans->trans_cfg->base_params->num_of_queues);
ucode_flags = fw->ucode_capa.flags; ucode_flags = fw->ucode_capa.flags;
...@@ -1405,7 +1405,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, ...@@ -1405,7 +1405,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
/* Reset chip to save power until we load uCode during "up". */ /* Reset chip to save power until we load uCode during "up". */
iwl_trans_stop_device(priv->trans); iwl_trans_stop_device(priv->trans);
priv->nvm_data = iwl_parse_eeprom_data(priv->trans->dev, priv->cfg, priv->nvm_data = iwl_parse_eeprom_data(priv->trans, priv->cfg,
priv->eeprom_blob, priv->eeprom_blob,
priv->eeprom_blob_size); priv->eeprom_blob_size);
if (!priv->nvm_data) if (!priv->nvm_data)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2019 Intel Corporation
* *
* Portions of this file are derived from the ipw3945 project, as well * Portions of this file are derived from the ipw3945 project, as well
* as portions of the ieee80211 subsystem header files. * as portions of the ieee80211 subsystem header files.
...@@ -199,7 +200,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, ...@@ -199,7 +200,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
else else
cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK;
if (priv->cfg->base_params->shadow_reg_enable) if (priv->trans->trans_cfg->base_params->shadow_reg_enable)
cmd->flags |= IWL_POWER_SHADOW_REG_ENA; cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
else else
cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright (C) 2019 Intel Corporation
* *
* Contact Information: * Contact Information:
* Intel Linux Wireless <linuxwifi@intel.com> * Intel Linux Wireless <linuxwifi@intel.com>
...@@ -467,7 +468,7 @@ static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int mq) ...@@ -467,7 +468,7 @@ static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int mq)
int q; int q;
for (q = IWLAGN_FIRST_AMPDU_QUEUE; for (q = IWLAGN_FIRST_AMPDU_QUEUE;
q < priv->cfg->base_params->num_of_queues; q++) { q < priv->trans->trans_cfg->base_params->num_of_queues; q++) {
if (!test_and_set_bit(q, priv->agg_q_alloc)) { if (!test_and_set_bit(q, priv->agg_q_alloc)) {
priv->queue_to_mac80211[q] = mq; priv->queue_to_mac80211[q] = mq;
return q; return q;
...@@ -1281,7 +1282,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, ...@@ -1281,7 +1282,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
* (in Tx queue's circular buffer) of first TFD/frame in window */ * (in Tx queue's circular buffer) of first TFD/frame in window */
u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);
if (scd_flow >= priv->cfg->base_params->num_of_queues) { if (scd_flow >= priv->trans->trans_cfg->base_params->num_of_queues) {
IWL_ERR(priv, IWL_ERR(priv,
"BUG_ON scd_flow is bigger than number of queues\n"); "BUG_ON scd_flow is bigger than number of queues\n");
return; return;
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#define ACPI_WRDD_METHOD "WRDD" #define ACPI_WRDD_METHOD "WRDD"
#define ACPI_SPLC_METHOD "SPLC" #define ACPI_SPLC_METHOD "SPLC"
#define ACPI_ECKV_METHOD "ECKV" #define ACPI_ECKV_METHOD "ECKV"
#define ACPI_PPAG_METHOD "PPAG"
#define ACPI_WIFI_DOMAIN (0x07) #define ACPI_WIFI_DOMAIN (0x07)
...@@ -92,6 +93,17 @@ ...@@ -92,6 +93,17 @@
#define ACPI_WGDS_NUM_BANDS 2 #define ACPI_WGDS_NUM_BANDS 2
#define ACPI_WGDS_TABLE_SIZE 3 #define ACPI_WGDS_TABLE_SIZE 3
#define ACPI_PPAG_NUM_CHAINS 2
#define ACPI_PPAG_NUM_SUB_BANDS 5
#define ACPI_PPAG_WIFI_DATA_SIZE ((ACPI_PPAG_NUM_CHAINS * \
ACPI_PPAG_NUM_SUB_BANDS) + 3)
/* PPAG gain value bounds in 1/8 dBm */
#define ACPI_PPAG_MIN_LB -16
#define ACPI_PPAG_MAX_LB 24
#define ACPI_PPAG_MIN_HB -16
#define ACPI_PPAG_MAX_HB 40
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
void *iwl_acpi_get_object(struct device *dev, acpi_string method); void *iwl_acpi_get_object(struct device *dev, acpi_string method);
......
...@@ -474,6 +474,13 @@ enum iwl_legacy_cmds { ...@@ -474,6 +474,13 @@ enum iwl_legacy_cmds {
*/ */
REPLY_RX_MPDU_CMD = 0xc1, REPLY_RX_MPDU_CMD = 0xc1,
/**
* @BAR_FRAME_RELEASE: Frame release from BAR notification, used for
* multi-TID BAR (previously, the BAR frame itself was reported
* instead). Uses &struct iwl_bar_frame_release.
*/
BAR_FRAME_RELEASE = 0xc2,
/** /**
* @FRAME_RELEASE: * @FRAME_RELEASE:
* Frame release (reorder helper) notification, uses * Frame release (reorder helper) notification, uses
......
...@@ -396,6 +396,7 @@ enum iwl_wowlan_flags { ...@@ -396,6 +396,7 @@ enum iwl_wowlan_flags {
* @is_11n_connection: indicates HT connection * @is_11n_connection: indicates HT connection
* @offloading_tid: TID reserved for firmware use * @offloading_tid: TID reserved for firmware use
* @flags: extra flags, see &enum iwl_wowlan_flags * @flags: extra flags, see &enum iwl_wowlan_flags
* @sta_id: station ID for wowlan.
* @reserved: reserved * @reserved: reserved
*/ */
struct iwl_wowlan_config_cmd { struct iwl_wowlan_config_cmd {
...@@ -406,8 +407,9 @@ struct iwl_wowlan_config_cmd { ...@@ -406,8 +407,9 @@ struct iwl_wowlan_config_cmd {
u8 is_11n_connection; u8 is_11n_connection;
u8 offloading_tid; u8 offloading_tid;
u8 flags; u8 flags;
u8 reserved[2]; u8 sta_id;
} __packed; /* WOWLAN_CONFIG_API_S_VER_4 */ u8 reserved;
} __packed; /* WOWLAN_CONFIG_API_S_VER_5 */
/* /*
* WOWLAN_TSC_RSC_PARAMS * WOWLAN_TSC_RSC_PARAMS
......
...@@ -140,17 +140,6 @@ struct iwl_fw_ini_hcmd_tlv { ...@@ -140,17 +140,6 @@ struct iwl_fw_ini_hcmd_tlv {
struct iwl_fw_ini_hcmd hcmd; struct iwl_fw_ini_hcmd hcmd;
} __packed; /* FW_DEBUG_TLV_HCMD_API_S_VER_1 */ } __packed; /* FW_DEBUG_TLV_HCMD_API_S_VER_1 */
/**
* struct iwl_fw_ini_debug_flow_tlv - (IWL_UCODE_TLV_TYPE_DEBUG_FLOW)
*
* @header: header
* @debug_flow_cfg: &enum iwl_fw_ini_debug_flow
*/
struct iwl_fw_ini_debug_flow_tlv {
struct iwl_fw_ini_header header;
__le32 debug_flow_cfg;
} __packed; /* FW_DEBUG_TLV_FLOW_TLV_S_VER_1 */
#define IWL_FW_INI_MAX_REGION_ID 64 #define IWL_FW_INI_MAX_REGION_ID 64
#define IWL_FW_INI_MAX_NAME 32 #define IWL_FW_INI_MAX_NAME 32
...@@ -408,27 +397,6 @@ enum iwl_fw_ini_trigger_id { ...@@ -408,27 +397,6 @@ enum iwl_fw_ini_trigger_id {
IWL_FW_TRIGGER_ID_NUM, IWL_FW_TRIGGER_ID_NUM,
}; /* FW_DEBUG_TLV_TRIGGER_ID_E_VER_1 */ }; /* FW_DEBUG_TLV_TRIGGER_ID_E_VER_1 */
/**
* enum iwl_fw_ini_apply_point
*
* @IWL_FW_INI_APPLY_INVALID: invalid
* @IWL_FW_INI_APPLY_EARLY: pre loading FW
* @IWL_FW_INI_APPLY_AFTER_ALIVE: first cmd from host after alive
* @IWL_FW_INI_APPLY_POST_INIT: last cmd in initialization sequence
* @IWL_FW_INI_APPLY_MISSED_BEACONS: missed beacons notification
* @IWL_FW_INI_APPLY_SCAN_COMPLETE: scan completed
* @IWL_FW_INI_APPLY_NUM: number of apply points
*/
enum iwl_fw_ini_apply_point {
IWL_FW_INI_APPLY_INVALID,
IWL_FW_INI_APPLY_EARLY,
IWL_FW_INI_APPLY_AFTER_ALIVE,
IWL_FW_INI_APPLY_POST_INIT,
IWL_FW_INI_APPLY_MISSED_BEACONS,
IWL_FW_INI_APPLY_SCAN_COMPLETE,
IWL_FW_INI_APPLY_NUM,
}; /* FW_DEBUG_TLV_APPLY_POINT_E_VER_1 */
/** /**
* enum iwl_fw_ini_allocation_id * enum iwl_fw_ini_allocation_id
* *
...@@ -439,6 +407,7 @@ enum iwl_fw_ini_apply_point { ...@@ -439,6 +407,7 @@ enum iwl_fw_ini_apply_point {
* @IWL_FW_INI_ALLOCATION_ID_SDFX: for SDFX module * @IWL_FW_INI_ALLOCATION_ID_SDFX: for SDFX module
* @IWL_FW_INI_ALLOCATION_ID_FW_DUMP: used for crash and runtime dumps * @IWL_FW_INI_ALLOCATION_ID_FW_DUMP: used for crash and runtime dumps
* @IWL_FW_INI_ALLOCATION_ID_USER_DEFINED: for future user scenarios * @IWL_FW_INI_ALLOCATION_ID_USER_DEFINED: for future user scenarios
* @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids
*/ */
enum iwl_fw_ini_allocation_id { enum iwl_fw_ini_allocation_id {
IWL_FW_INI_ALLOCATION_INVALID, IWL_FW_INI_ALLOCATION_INVALID,
...@@ -448,6 +417,7 @@ enum iwl_fw_ini_allocation_id { ...@@ -448,6 +417,7 @@ enum iwl_fw_ini_allocation_id {
IWL_FW_INI_ALLOCATION_ID_SDFX, IWL_FW_INI_ALLOCATION_ID_SDFX,
IWL_FW_INI_ALLOCATION_ID_FW_DUMP, IWL_FW_INI_ALLOCATION_ID_FW_DUMP,
IWL_FW_INI_ALLOCATION_ID_USER_DEFINED, IWL_FW_INI_ALLOCATION_ID_USER_DEFINED,
IWL_FW_INI_ALLOCATION_NUM,
}; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */ }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */
/** /**
...@@ -519,4 +489,72 @@ enum iwl_fw_ini_region_type { ...@@ -519,4 +489,72 @@ enum iwl_fw_ini_region_type {
IWL_FW_INI_REGION_NUM IWL_FW_INI_REGION_NUM
}; /* FW_DEBUG_TLV_REGION_TYPE_E_VER_1 */ }; /* FW_DEBUG_TLV_REGION_TYPE_E_VER_1 */
/**
* enum iwl_fw_ini_time_point
*
* Hard coded time points in which the driver can send hcmd or perform dump
* collection
*
* @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW
* @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif
* @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence
* @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert
* @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error
* @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang
* @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFOCATION: DHC cmd response and notif
* @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification.
* data field holds id and group
* @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point
* @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant
* intervals. data field holds the interval time in msec
* @IWL_FW_INI_TIME_POINT_WDG_TIMEOUT: watchdog timeout
* @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused
* @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout
* @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable
* @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable
* @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start
* @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end
* @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons
* @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure
* @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed
* @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action
* frame failed
* @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold
* @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred
* @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed
* @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx
* @IWL_FW_INI_TIME_POINT_DEASSOC: de association
* @IWL_FW_INI_TIME_POINT_NUM: number of time points
*/
enum iwl_fw_ini_time_point {
IWL_FW_INI_TIME_POINT_INVALID,
IWL_FW_INI_TIME_POINT_EARLY,
IWL_FW_INI_TIME_POINT_AFTER_ALIVE,
IWL_FW_INI_TIME_POINT_POST_INIT,
IWL_FW_INI_TIME_POINT_FW_ASSERT,
IWL_FW_INI_TIME_POINT_FW_HW_ERROR,
IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG,
IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFOCATION,
IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF,
IWL_FW_INI_TIME_POINT_USER_TRIGGER,
IWL_FW_INI_TIME_POINT_PERIODIC,
IWL_FW_INI_TIME_POINT_WDG_TIMEOUT,
IWL_FW_INI_TIME_POINT_HOST_ASSERT,
IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT,
IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE,
IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE,
IWL_FW_INI_TIME_POINT_HOST_D3_START,
IWL_FW_INI_TIME_POINT_HOST_D3_END,
IWL_FW_INI_TIME_POINT_MISSED_BEACONS,
IWL_FW_INI_TIME_POINT_ASSOC_FAILED,
IWL_FW_INI_TIME_POINT_TX_FAILED,
IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED,
IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD,
IWL_FW_INI_TIME_POINT_HANG_OCCURRED,
IWL_FW_INI_TIME_POINT_EAPOL_FAILED,
IWL_FW_INI_TIME_POINT_FAKE_TX,
IWL_FW_INI_TIME_POINT_DEASSOC,
IWL_FW_INI_TIME_POINT_NUM,
}; /* FW_TLV_DEBUG_TIME_POINT_API_E */
#endif #endif
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -80,6 +80,19 @@ enum iwl_debug_cmds { ...@@ -80,6 +80,19 @@ enum iwl_debug_cmds {
* &struct iwl_dbg_mem_access_rsp * &struct iwl_dbg_mem_access_rsp
*/ */
UMAC_RD_WR = 0x1, UMAC_RD_WR = 0x1,
/**
* @DBGC_SUSPEND_RESUME:
* DBGC suspend/resume commad. Uses a single dword as data:
* 0 - resume DBGC recording
* 1 - suspend DBGC recording
*/
DBGC_SUSPEND_RESUME = 0x7,
/**
* @BUFFER_ALLOCATION:
* passes DRAM buffers to a DBGC
* &struct iwl_buf_alloc_cmd
*/
BUFFER_ALLOCATION = 0x8,
/** /**
* @MFU_ASSERT_DUMP_NTF: * @MFU_ASSERT_DUMP_NTF:
* &struct iwl_mfu_assert_dump_notif * &struct iwl_mfu_assert_dump_notif
...@@ -102,6 +115,16 @@ enum { ...@@ -102,6 +115,16 @@ enum {
FW_ERR_FATAL = 0xFF FW_ERR_FATAL = 0xFF
}; };
/** enum iwl_dbg_suspend_resume_cmds - dbgc suspend resume operations
* dbgc suspend resume command operations
* @DBGC_RESUME_CMD: resume dbgc recording
* @DBGC_SUSPEND_CMD: stop dbgc recording
*/
enum iwl_dbg_suspend_resume_cmds {
DBGC_RESUME_CMD,
DBGC_SUSPEND_CMD,
};
/** /**
* struct iwl_error_resp - FW error indication * struct iwl_error_resp - FW error indication
* ( REPLY_ERROR = 0x2 ) * ( REPLY_ERROR = 0x2 )
...@@ -335,49 +358,39 @@ struct iwl_dbg_mem_access_rsp { ...@@ -335,49 +358,39 @@ struct iwl_dbg_mem_access_rsp {
__le32 data[]; __le32 data[];
} __packed; /* DEBUG_(U|L)MAC_RD_WR_RSP_API_S_VER_1 */ } __packed; /* DEBUG_(U|L)MAC_RD_WR_RSP_API_S_VER_1 */
#define LDBG_CFG_COMMAND_SIZE 80 /**
#define BUFFER_ALLOCATION 0x27 * struct iwl_dbg_suspend_resume_cmd - dbgc suspend resume command
#define START_DEBUG_RECORDING 0x29 * @operation: suspend or resume operation, uses
#define STOP_DEBUG_RECORDING 0x2A * &enum iwl_dbg_suspend_resume_cmds
*/
struct iwl_dbg_suspend_resume_cmd {
__le32 operation;
} __packed;
/* maximum fragments to be allocated per target of allocationId */ #define BUF_ALLOC_MAX_NUM_FRAGS 16
#define IWL_BUFFER_LOCATION_MAX_FRAGS 2
/** /**
* struct iwl_fragment_data single fragment structure * struct iwl_buf_alloc_frag - a DBGC fragment
* @address: 64bit start address * @addr: base address of the fragment
* @size: size in bytes * @size: size of the fragment
*/ */
struct iwl_fragment_data { struct iwl_buf_alloc_frag {
__le64 address; __le64 addr;
__le32 size; __le32 size;
} __packed; /* FRAGMENT_STRUCTURE_API_S_VER_1 */ } __packed; /* FRAGMENT_STRUCTURE_API_S_VER_1 */
/** /**
* struct iwl_buffer_allocation_cmd - buffer allocation command structure * struct iwl_buf_alloc_cmd - buffer allocation command
* @allocation_id: id of the allocation * @alloc_id: &enum iwl_fw_ini_allocation_id
* @buffer_location: location of the buffer * @buf_location: &enum iwl_fw_ini_buffer_location
* @num_frags: number of fragments * @num_frags: number of fragments
* @fragments: memory fragments * @frags: fragments array
*/ */
struct iwl_buffer_allocation_cmd { struct iwl_buf_alloc_cmd {
__le32 allocation_id; __le32 alloc_id;
__le32 buffer_location; __le32 buf_location;
__le32 num_frags; __le32 num_frags;
struct iwl_fragment_data fragments[IWL_BUFFER_LOCATION_MAX_FRAGS]; struct iwl_buf_alloc_frag frags[BUF_ALLOC_MAX_NUM_FRAGS];
} __packed; /* BUFFER_ALLOCATION_CMD_API_S_VER_1 */ } __packed; /* BUFFER_ALLOCATION_CMD_API_S_VER_2 */
/**
* struct iwl_ldbg_config_cmd - LDBG config command
* @type: configuration type
* @pad: reserved space for type-dependent data
*/
struct iwl_ldbg_config_cmd {
__le32 type;
union {
u8 pad[LDBG_CFG_COMMAND_SIZE - sizeof(__le32)];
struct iwl_buffer_allocation_cmd buffer_allocation;
}; /* LDBG_CFG_BODY_API_U_VER_2 (partially) */
} __packed; /* LDBG_CFG_CMD_API_S_VER_2 */
#endif /* __iwl_fw_api_debug_h__ */ #endif /* __iwl_fw_api_debug_h__ */
...@@ -82,7 +82,7 @@ enum iwl_location_subcmd_ids { ...@@ -82,7 +82,7 @@ enum iwl_location_subcmd_ids {
TOF_RANGE_ABORT_CMD = 0x2, TOF_RANGE_ABORT_CMD = 0x2,
/** /**
* @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config, * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config,
* uses &struct iwl_tof_range_request_ext_cmd * uses &struct iwl_tof_range_req_ext_cmd
*/ */
TOF_RANGE_REQ_EXT_CMD = 0x3, TOF_RANGE_REQ_EXT_CMD = 0x3,
/** /**
...@@ -292,7 +292,7 @@ struct iwl_tof_responder_dyn_config_cmd { ...@@ -292,7 +292,7 @@ struct iwl_tof_responder_dyn_config_cmd {
} __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */ } __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */
/** /**
* struct iwl_tof_range_request_ext_cmd - extended range req for WLS * struct iwl_tof_range_req_ext_cmd - extended range req for WLS
* @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF
* @reserved: reserved * @reserved: reserved
* @min_delta_ftm: Minimal time between two consecutive measurements, * @min_delta_ftm: Minimal time between two consecutive measurements,
......
...@@ -500,6 +500,9 @@ struct iwl_he_pkt_ext { ...@@ -500,6 +500,9 @@ struct iwl_he_pkt_ext {
* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG * enabled AGG, i.e. both BACK and non-BACK frames in a single AGG
* @STA_CTXT_HE_MU_EDCA_CW: indicates that there is an element of MU EDCA * @STA_CTXT_HE_MU_EDCA_CW: indicates that there is an element of MU EDCA
* parameter set, i.e. the backoff counters for trig-based ACs * parameter set, i.e. the backoff counters for trig-based ACs
* @STA_CTXT_HE_RU_2MHZ_BLOCK: indicates that 26-tone RU OFDMA transmission are
* not allowed (as there are OBSS that might classify such transmissions as
* radar pulses).
*/ */
enum iwl_he_sta_ctxt_flags { enum iwl_he_sta_ctxt_flags {
STA_CTXT_HE_REF_BSSID_VALID = BIT(4), STA_CTXT_HE_REF_BSSID_VALID = BIT(4),
...@@ -511,6 +514,7 @@ enum iwl_he_sta_ctxt_flags { ...@@ -511,6 +514,7 @@ enum iwl_he_sta_ctxt_flags {
STA_CTXT_HE_CONST_TRIG_RND_ALLOC = BIT(10), STA_CTXT_HE_CONST_TRIG_RND_ALLOC = BIT(10),
STA_CTXT_HE_ACK_ENABLED = BIT(11), STA_CTXT_HE_ACK_ENABLED = BIT(11),
STA_CTXT_HE_MU_EDCA_CW = BIT(12), STA_CTXT_HE_MU_EDCA_CW = BIT(12),
STA_CTXT_HE_RU_2MHZ_BLOCK = BIT(14),
}; };
/** /**
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright(c) 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright(c) 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -89,6 +91,11 @@ enum iwl_phy_ops_subcmd_ids { ...@@ -89,6 +91,11 @@ enum iwl_phy_ops_subcmd_ids {
*/ */
GEO_TX_POWER_LIMIT = 0x05, GEO_TX_POWER_LIMIT = 0x05,
/**
* @PER_PLATFORM_ANT_GAIN_CMD: &struct iwl_ppag_table_cmd
*/
PER_PLATFORM_ANT_GAIN_CMD = 0x07,
/** /**
* @CT_KILL_NOTIFICATION: &struct ct_kill_notif * @CT_KILL_NOTIFICATION: &struct ct_kill_notif
*/ */
......
...@@ -449,6 +449,18 @@ struct iwl_geo_tx_power_profiles_resp { ...@@ -449,6 +449,18 @@ struct iwl_geo_tx_power_profiles_resp {
__le32 profile_idx; __le32 profile_idx;
} __packed; /* GEO_TX_POWER_LIMIT_RESP */ } __packed; /* GEO_TX_POWER_LIMIT_RESP */
/**
* struct iwl_ppag_table_cmd - struct for PER_PLATFORM_ANT_GAIN_CMD cmd.
* @enabled: 1 if PPAG is enabled, 0 otherwise
* @gain: table of antenna gain values per chain and sub-band
* @reserved: reserved
*/
struct iwl_ppag_table_cmd {
__le32 enabled;
s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS];
s8 reserved[2];
} __packed; /* PER_PLATFORM_ANT_GAIN_CMD */
/** /**
* struct iwl_beacon_filter_cmd * struct iwl_beacon_filter_cmd
* REPLY_BEACON_FILTERING_CMD = 0xd2 (command) * REPLY_BEACON_FILTERING_CMD = 0xd2 (command)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2017 Intel Deutschland GmbH * Copyright(c) 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* *
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2017 Intel Deutschland GmbH * Copyright(c) 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -166,8 +166,16 @@ enum iwl_tlc_mng_ht_rates { ...@@ -166,8 +166,16 @@ enum iwl_tlc_mng_ht_rates {
IWL_TLC_MNG_HT_RATE_MAX = IWL_TLC_MNG_HT_RATE_MCS11, IWL_TLC_MNG_HT_RATE_MAX = IWL_TLC_MNG_HT_RATE_MCS11,
}; };
/* Maximum supported tx antennas number */ enum IWL_TLC_MNG_NSS {
#define MAX_NSS 2 IWL_TLC_NSS_1,
IWL_TLC_NSS_2,
IWL_TLC_NSS_MAX
};
enum IWL_TLC_HT_BW_RATES {
IWL_TLC_HT_BW_NONE_160,
IWL_TLC_HT_BW_160,
};
/** /**
* struct tlc_config_cmd - TLC configuration * struct tlc_config_cmd - TLC configuration
...@@ -195,7 +203,7 @@ struct iwl_tlc_config_cmd { ...@@ -195,7 +203,7 @@ struct iwl_tlc_config_cmd {
u8 amsdu; u8 amsdu;
__le16 flags; __le16 flags;
__le16 non_ht_rates; __le16 non_ht_rates;
__le16 ht_rates[MAX_NSS][2]; __le16 ht_rates[IWL_TLC_NSS_MAX][2];
__le16 max_mpdu_len; __le16 max_mpdu_len;
u8 sgi_ch_width_supp; u8 sgi_ch_width_supp;
u8 reserved2[1]; u8 reserved2[1];
......
...@@ -746,6 +746,38 @@ struct iwl_frame_release { ...@@ -746,6 +746,38 @@ struct iwl_frame_release {
__le16 nssn; __le16 nssn;
}; };
/**
* enum iwl_bar_frame_release_sta_tid - STA/TID information for BAR release
* @IWL_BAR_FRAME_RELEASE_TID_MASK: TID mask
* @IWL_BAR_FRAME_RELEASE_STA_MASK: STA mask
*/
enum iwl_bar_frame_release_sta_tid {
IWL_BAR_FRAME_RELEASE_TID_MASK = 0x0000000f,
IWL_BAR_FRAME_RELEASE_STA_MASK = 0x000001f0,
};
/**
* enum iwl_bar_frame_release_ba_info - BA information for BAR release
* @IWL_BAR_FRAME_RELEASE_NSSN_MASK: NSSN mask
* @IWL_BAR_FRAME_RELEASE_SN_MASK: SN mask (ignored by driver)
* @IWL_BAR_FRAME_RELEASE_BAID_MASK: BAID mask
*/
enum iwl_bar_frame_release_ba_info {
IWL_BAR_FRAME_RELEASE_NSSN_MASK = 0x00000fff,
IWL_BAR_FRAME_RELEASE_SN_MASK = 0x00fff000,
IWL_BAR_FRAME_RELEASE_BAID_MASK = 0x3f000000,
};
/**
* struct iwl_bar_frame_release - frame release from BAR info
* @sta_tid: STA & TID information, see &enum iwl_bar_frame_release_sta_tid.
* @ba_info: BA information, see &enum iwl_bar_frame_release_ba_info.
*/
struct iwl_bar_frame_release {
__le32 sta_tid;
__le32 ba_info;
} __packed; /* RX_BAR_TO_FRAME_RELEASE_API_S_VER_1 */
enum iwl_rss_hash_func_en { enum iwl_rss_hash_func_en {
IWL_RSS_HASH_TYPE_IPV4_TCP, IWL_RSS_HASH_TYPE_IPV4_TCP,
IWL_RSS_HASH_TYPE_IPV4_UDP, IWL_RSS_HASH_TYPE_IPV4_UDP,
......
...@@ -93,6 +93,8 @@ struct iwl_ssid_ie { ...@@ -93,6 +93,8 @@ struct iwl_ssid_ie {
#define IWL_SCAN_SHORT_BLACKLIST_LEN 16 #define IWL_SCAN_SHORT_BLACKLIST_LEN 16
#define IWL_SCAN_MAX_PROFILES 11 #define IWL_SCAN_MAX_PROFILES 11
#define SCAN_OFFLOAD_PROBE_REQ_SIZE 512 #define SCAN_OFFLOAD_PROBE_REQ_SIZE 512
#define SCAN_NUM_BAND_PROBE_DATA_V_1 2
#define SCAN_NUM_BAND_PROBE_DATA_V_2 3
/* Default watchdog (in MS) for scheduled scan iteration */ /* Default watchdog (in MS) for scheduled scan iteration */
#define IWL_SCHED_SCAN_WATCHDOG cpu_to_le16(15000) #define IWL_SCHED_SCAN_WATCHDOG cpu_to_le16(15000)
...@@ -251,9 +253,22 @@ struct iwl_scan_probe_segment { ...@@ -251,9 +253,22 @@ struct iwl_scan_probe_segment {
* @common_data: last (and common) part of the probe * @common_data: last (and common) part of the probe
* @buf: raw data block * @buf: raw data block
*/ */
struct iwl_scan_probe_req_v1 {
struct iwl_scan_probe_segment mac_header;
struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_1];
struct iwl_scan_probe_segment common_data;
u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
} __packed;
/* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
* @mac_header: first (and common) part of the probe
* @band_data: band specific data
* @common_data: last (and common) part of the probe
* @buf: raw data block
*/
struct iwl_scan_probe_req { struct iwl_scan_probe_req {
struct iwl_scan_probe_segment mac_header; struct iwl_scan_probe_segment mac_header;
struct iwl_scan_probe_segment band_data[2]; struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_2];
struct iwl_scan_probe_segment common_data; struct iwl_scan_probe_segment common_data;
u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE]; u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
} __packed; } __packed;
...@@ -608,15 +623,29 @@ enum iwl_umac_scan_general_flags2 { ...@@ -608,15 +623,29 @@ enum iwl_umac_scan_general_flags2 {
* struct iwl_scan_channel_cfg_umac * struct iwl_scan_channel_cfg_umac
* @flags: bitmap - 0-19: directed scan to i'th ssid. * @flags: bitmap - 0-19: directed scan to i'th ssid.
* @channel_num: channel number 1-13 etc. * @channel_num: channel number 1-13 etc.
* @band: band of channel: 0 for 2GHz, 1 for 5GHz
* @iter_count: repetition count for the channel. * @iter_count: repetition count for the channel.
* @iter_interval: interval between two scan iterations on one channel. * @iter_interval: interval between two scan iterations on one channel.
*/ */
struct iwl_scan_channel_cfg_umac { struct iwl_scan_channel_cfg_umac {
__le32 flags; __le32 flags;
/* Both versions are of the same size, so use a union without adjusting
* the command size later
*/
union {
struct {
u8 channel_num; u8 channel_num;
u8 iter_count; u8 iter_count;
__le16 iter_interval; __le16 iter_interval;
} __packed; /* SCAN_CHANNEL_CFG_S_VER2 */ } v1; /* SCAN_CHANNEL_CFG_S_VER1 */
struct {
u8 channel_num;
u8 band;
u8 iter_count;
u8 iter_interval;
} v2; /* SCAN_CHANNEL_CFG_S_VER2 */
};
} __packed;
/** /**
* struct iwl_scan_umac_schedule * struct iwl_scan_umac_schedule
...@@ -630,6 +659,16 @@ struct iwl_scan_umac_schedule { ...@@ -630,6 +659,16 @@ struct iwl_scan_umac_schedule {
u8 reserved; u8 reserved;
} __packed; /* SCAN_SCHED_PARAM_API_S_VER_1 */ } __packed; /* SCAN_SCHED_PARAM_API_S_VER_1 */
struct iwl_scan_req_umac_tail_v1 {
/* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
__le16 delay;
__le16 reserved;
/* SCAN_PROBE_PARAMS_API_S_VER_1 */
struct iwl_scan_probe_req_v1 preq;
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
} __packed;
/** /**
* struct iwl_scan_req_umac_tail - the rest of the UMAC scan request command * struct iwl_scan_req_umac_tail - the rest of the UMAC scan request command
* parameters following channels configuration array. * parameters following channels configuration array.
...@@ -639,12 +678,12 @@ struct iwl_scan_umac_schedule { ...@@ -639,12 +678,12 @@ struct iwl_scan_umac_schedule {
* @preq: probe request with IEs blocks * @preq: probe request with IEs blocks
* @direct_scan: list of SSIDs for directed active scan * @direct_scan: list of SSIDs for directed active scan
*/ */
struct iwl_scan_req_umac_tail { struct iwl_scan_req_umac_tail_v2 {
/* SCAN_PERIODIC_PARAMS_API_S_VER_1 */ /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS]; struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
__le16 delay; __le16 delay;
__le16 reserved; __le16 reserved;
/* SCAN_PROBE_PARAMS_API_S_VER_1 */ /* SCAN_PROBE_PARAMS_API_S_VER_2 */
struct iwl_scan_probe_req preq; struct iwl_scan_probe_req preq;
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX]; struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
} __packed; } __packed;
......
This diff is collapsed.
...@@ -202,7 +202,7 @@ _iwl_fw_dbg_trigger_on(struct iwl_fw_runtime *fwrt, ...@@ -202,7 +202,7 @@ _iwl_fw_dbg_trigger_on(struct iwl_fw_runtime *fwrt,
{ {
struct iwl_fw_dbg_trigger_tlv *trig; struct iwl_fw_dbg_trigger_tlv *trig;
if (fwrt->trans->dbg.ini_valid) if (iwl_trans_dbg_ini_valid(fwrt->trans))
return NULL; return NULL;
if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id)) if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id))
...@@ -229,8 +229,9 @@ iwl_fw_ini_trigger_on(struct iwl_fw_runtime *fwrt, ...@@ -229,8 +229,9 @@ iwl_fw_ini_trigger_on(struct iwl_fw_runtime *fwrt,
struct iwl_fw_ini_trigger *trig; struct iwl_fw_ini_trigger *trig;
u32 usec; u32 usec;
if (!fwrt->trans->dbg.ini_valid || id == IWL_FW_TRIGGER_ID_INVALID || if (!iwl_trans_dbg_ini_valid(fwrt->trans) ||
id >= IWL_FW_TRIGGER_ID_NUM || !fwrt->dump.active_trigs[id].active) id == IWL_FW_TRIGGER_ID_INVALID || id >= IWL_FW_TRIGGER_ID_NUM ||
!fwrt->dump.active_trigs[id].active)
return false; return false;
trig = fwrt->dump.active_trigs[id].trig; trig = fwrt->dump.active_trigs[id].trig;
...@@ -262,69 +263,9 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt, ...@@ -262,69 +263,9 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt,
_iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \ _iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \
iwl_fw_dbg_get_trigger((fwrt)->fw,\ iwl_fw_dbg_get_trigger((fwrt)->fw,\
(trig))) (trig)))
int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
static inline void struct iwl_fw_dbg_params *params,
_iwl_fw_dbg_stop_recording(struct iwl_trans *trans, bool stop);
struct iwl_fw_dbg_params *params)
{
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
return;
}
if (params) {
params->in_sample = iwl_read_umac_prph(trans, DBGC_IN_SAMPLE);
params->out_ctrl = iwl_read_umac_prph(trans, DBGC_OUT_CTRL);
}
iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, 0);
/* wait for the DBGC to finish writing the internal buffer to DRAM to
* avoid halting the HW while writing
*/
usleep_range(700, 1000);
iwl_write_umac_prph(trans, DBGC_OUT_CTRL, 0);
#ifdef CONFIG_IWLWIFI_DEBUGFS
trans->dbg.rec_on = false;
#endif
}
static inline void
iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
struct iwl_fw_dbg_params *params)
{
/* if the FW crashed or not debug monitor cfg was given, there is
* no point in stopping
*/
if (test_bit(STATUS_FW_ERROR, &trans->status) ||
(!trans->dbg.dest_tlv &&
trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
return;
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
IWL_ERR(trans,
"WRT: unsupported device family %d for debug stop recording\n",
trans->cfg->device_family);
return;
}
_iwl_fw_dbg_stop_recording(trans, params);
}
static inline void
_iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
struct iwl_fw_dbg_params *params)
{
if (WARN_ON(!params))
return;
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
iwl_clear_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
iwl_clear_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
} else {
iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, params->in_sample);
iwl_write_umac_prph(trans, DBGC_OUT_CTRL, params->out_ctrl);
}
}
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt) static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)
...@@ -336,30 +277,6 @@ static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt) ...@@ -336,30 +277,6 @@ static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)
} }
#endif #endif
static inline void
iwl_fw_dbg_restart_recording(struct iwl_fw_runtime *fwrt,
struct iwl_fw_dbg_params *params)
{
/* if the FW crashed or not debug monitor cfg was given, there is
* no point in restarting
*/
if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status) ||
(!fwrt->trans->dbg.dest_tlv &&
fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
return;
if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
IWL_ERR(fwrt,
"WRT: unsupported device family %d for debug restart recording\n",
fwrt->trans->cfg->device_family);
return;
}
_iwl_fw_dbg_restart_recording(fwrt->trans, params);
#ifdef CONFIG_IWLWIFI_DEBUGFS
iwl_fw_set_dbg_rec_on(fwrt);
#endif
}
static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt)
{ {
fwrt->dump.conf = FW_DBG_INVALID; fwrt->dump.conf = FW_DBG_INVALID;
...@@ -385,7 +302,7 @@ static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt) ...@@ -385,7 +302,7 @@ static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt)
static inline bool iwl_fw_dbg_is_paging_enabled(struct iwl_fw_runtime *fwrt) static inline bool iwl_fw_dbg_is_paging_enabled(struct iwl_fw_runtime *fwrt)
{ {
return iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_PAGING) && return iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_PAGING) &&
!fwrt->trans->cfg->gen2 && !fwrt->trans->trans_cfg->gen2 &&
fwrt->cur_fw_img < IWL_UCODE_TYPE_MAX && fwrt->cur_fw_img < IWL_UCODE_TYPE_MAX &&
fwrt->fw->img[fwrt->cur_fw_img].paging_mem_size && fwrt->fw->img[fwrt->cur_fw_img].paging_mem_size &&
fwrt->fw_paging_db[0].fw_paging_block; fwrt->fw_paging_db[0].fw_paging_block;
...@@ -397,24 +314,13 @@ static inline void iwl_fw_flush_dumps(struct iwl_fw_runtime *fwrt) ...@@ -397,24 +314,13 @@ static inline void iwl_fw_flush_dumps(struct iwl_fw_runtime *fwrt)
{ {
int i; int i;
del_timer(&fwrt->dump.periodic_trig); iwl_dbg_tlv_del_timers(fwrt->trans);
for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++) { for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++) {
flush_delayed_work(&fwrt->dump.wks[i].wk); flush_delayed_work(&fwrt->dump.wks[i].wk);
fwrt->dump.wks[i].ini_trig_id = IWL_FW_TRIGGER_ID_INVALID; fwrt->dump.wks[i].ini_trig_id = IWL_FW_TRIGGER_ID_INVALID;
} }
} }
static inline void iwl_fw_cancel_dumps(struct iwl_fw_runtime *fwrt)
{
int i;
del_timer(&fwrt->dump.periodic_trig);
for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++) {
cancel_delayed_work_sync(&fwrt->dump.wks[i].wk);
fwrt->dump.wks[i].ini_trig_id = IWL_FW_TRIGGER_ID_INVALID;
}
}
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt) static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt)
{ {
...@@ -451,10 +357,7 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {} ...@@ -451,10 +357,7 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {}
#endif /* CONFIG_IWLWIFI_DEBUGFS */ #endif /* CONFIG_IWLWIFI_DEBUGFS */
void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt, void iwl_fw_dbg_stop_sync(struct iwl_fw_runtime *fwrt);
enum iwl_fw_ini_apply_point apply_point);
void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt);
static inline void iwl_fw_lmac1_set_alive_err_table(struct iwl_trans *trans, static inline void iwl_fw_lmac1_set_alive_err_table(struct iwl_trans *trans,
u32 lmac_error_event_table) u32 lmac_error_event_table)
...@@ -478,7 +381,7 @@ static inline void iwl_fw_umac_set_alive_err_table(struct iwl_trans *trans, ...@@ -478,7 +381,7 @@ static inline void iwl_fw_umac_set_alive_err_table(struct iwl_trans *trans,
static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt) static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt)
{ {
if (fwrt->trans->dbg.ini_valid && fwrt->trans->dbg.hw_error) { if (iwl_trans_dbg_ini_valid(fwrt->trans) && fwrt->trans->dbg.hw_error) {
_iwl_fw_dbg_ini_collect(fwrt, IWL_FW_TRIGGER_ID_FW_HW_ERROR); _iwl_fw_dbg_ini_collect(fwrt, IWL_FW_TRIGGER_ID_FW_HW_ERROR);
fwrt->trans->dbg.hw_error = false; fwrt->trans->dbg.hw_error = false;
} else { } else {
...@@ -486,8 +389,6 @@ static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt) ...@@ -486,8 +389,6 @@ static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt)
} }
} }
void iwl_fw_dbg_periodic_trig_handler(struct timer_list *t);
void iwl_fw_error_print_fseq_regs(struct iwl_fw_runtime *fwrt); void iwl_fw_error_print_fseq_regs(struct iwl_fw_runtime *fwrt);
static inline void iwl_fwrt_update_fw_versions(struct iwl_fw_runtime *fwrt, static inline void iwl_fwrt_update_fw_versions(struct iwl_fw_runtime *fwrt,
......
...@@ -287,6 +287,28 @@ struct iwl_fw_error_dump_mem { ...@@ -287,6 +287,28 @@ struct iwl_fw_error_dump_mem {
/* Use bit 31 as dump info type to avoid colliding with region types */ /* Use bit 31 as dump info type to avoid colliding with region types */
#define IWL_INI_DUMP_INFO_TYPE BIT(31) #define IWL_INI_DUMP_INFO_TYPE BIT(31)
/**
* struct iwl_fw_ini_dump_entry
* @list: list of dump entries
* @size: size of the data
* @data: entry data
*/
struct iwl_fw_ini_dump_entry {
struct list_head list;
u32 size;
u8 data[];
} __packed;
/**
* struct iwl_fw_error_dump_file - header of dump file
* @barker: must be %IWL_FW_INI_ERROR_DUMP_BARKER
* @file_len: the length of all the file including the header
*/
struct iwl_fw_ini_dump_file_hdr {
__le32 barker;
__le32 file_len;
} __packed;
/** /**
* struct iwl_fw_ini_fifo_hdr - fifo range header * struct iwl_fw_ini_fifo_hdr - fifo range header
* @fifo_num: the fifo number. In case of umac rx fifo, set BIT(31) to * @fifo_num: the fifo number. In case of umac rx fifo, set BIT(31) to
...@@ -301,10 +323,10 @@ struct iwl_fw_ini_fifo_hdr { ...@@ -301,10 +323,10 @@ struct iwl_fw_ini_fifo_hdr {
/** /**
* struct iwl_fw_ini_error_dump_range - range of memory * struct iwl_fw_ini_error_dump_range - range of memory
* @range_data_size: the size of this range, in bytes * @range_data_size: the size of this range, in bytes
* @internal_base_addr - base address of internal memory range * @internal_base_addr: base address of internal memory range
* @dram_base_addr - base address of dram monitor range * @dram_base_addr: base address of dram monitor range
* @page_num - page number of memory range * @page_num: page number of memory range
* @fifo_hdr - fifo header of memory range * @fifo_hdr: fifo header of memory range
* @data: the actual memory * @data: the actual memory
*/ */
struct iwl_fw_ini_error_dump_range { struct iwl_fw_ini_error_dump_range {
...@@ -432,10 +454,10 @@ struct iwl_fw_error_dump_rb { ...@@ -432,10 +454,10 @@ struct iwl_fw_error_dump_rb {
/** /**
* struct iwl_fw_ini_monitor_dump - ini monitor dump * struct iwl_fw_ini_monitor_dump - ini monitor dump
* @header - header of the region * @header: header of the region
* @write_ptr - write pointer position in the buffer * @write_ptr: write pointer position in the buffer
* @cycle_cnt - cycles count * @cycle_cnt: cycles count
* @ranges - the memory ranges of this this region * @ranges: the memory ranges of this this region
*/ */
struct iwl_fw_ini_monitor_dump { struct iwl_fw_ini_monitor_dump {
struct iwl_fw_ini_error_dump_header header; struct iwl_fw_ini_error_dump_header header;
......
...@@ -157,8 +157,7 @@ enum iwl_ucode_tlv_type { ...@@ -157,8 +157,7 @@ enum iwl_ucode_tlv_type {
IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_TLV_DEBUG_BASE + 2, IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_TLV_DEBUG_BASE + 2,
IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_TLV_DEBUG_BASE + 3, IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_TLV_DEBUG_BASE + 3,
IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_TLV_DEBUG_BASE + 4, IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_TLV_DEBUG_BASE + 4,
IWL_UCODE_TLV_TYPE_DEBUG_FLOW = IWL_UCODE_TLV_DEBUG_BASE + 5, IWL_UCODE_TLV_DEBUG_MAX = IWL_UCODE_TLV_TYPE_TRIGGERS,
IWL_UCODE_TLV_DEBUG_MAX = IWL_UCODE_TLV_TYPE_DEBUG_FLOW,
/* TLVs 0x1000-0x2000 are for internal driver usage */ /* TLVs 0x1000-0x2000 are for internal driver usage */
IWL_UCODE_TLV_FW_DBG_DUMP_LST = 0x1000, IWL_UCODE_TLV_FW_DBG_DUMP_LST = 0x1000,
...@@ -323,6 +322,7 @@ enum iwl_ucode_tlv_api { ...@@ -323,6 +322,7 @@ enum iwl_ucode_tlv_api {
IWL_UCODE_TLV_API_FTM_RTT_ACCURACY = (__force iwl_ucode_tlv_api_t)54, IWL_UCODE_TLV_API_FTM_RTT_ACCURACY = (__force iwl_ucode_tlv_api_t)54,
IWL_UCODE_TLV_API_SAR_TABLE_VER = (__force iwl_ucode_tlv_api_t)55, IWL_UCODE_TLV_API_SAR_TABLE_VER = (__force iwl_ucode_tlv_api_t)55,
IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP = (__force iwl_ucode_tlv_api_t)57, IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP = (__force iwl_ucode_tlv_api_t)57,
IWL_UCODE_TLV_API_SCAN_EXT_CHAN_VER = (__force iwl_ucode_tlv_api_t)58,
NUM_IWL_UCODE_TLV_API NUM_IWL_UCODE_TLV_API
#ifdef __CHECKER__ #ifdef __CHECKER__
...@@ -441,9 +441,11 @@ enum iwl_ucode_tlv_capa { ...@@ -441,9 +441,11 @@ enum iwl_ucode_tlv_capa {
IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA = (__force iwl_ucode_tlv_capa_t)44, IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA = (__force iwl_ucode_tlv_capa_t)44,
IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2 = (__force iwl_ucode_tlv_capa_t)45, IWL_UCODE_TLV_CAPA_COEX_SCHEMA_2 = (__force iwl_ucode_tlv_capa_t)45,
IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD = (__force iwl_ucode_tlv_capa_t)46, IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD = (__force iwl_ucode_tlv_capa_t)46,
IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS = (__force iwl_ucode_tlv_capa_t)48,
IWL_UCODE_TLV_CAPA_FTM_CALIBRATED = (__force iwl_ucode_tlv_capa_t)47, IWL_UCODE_TLV_CAPA_FTM_CALIBRATED = (__force iwl_ucode_tlv_capa_t)47,
IWL_UCODE_TLV_CAPA_ULTRA_HB_CHANNELS = (__force iwl_ucode_tlv_capa_t)48,
IWL_UCODE_TLV_CAPA_CS_MODIFY = (__force iwl_ucode_tlv_capa_t)49, IWL_UCODE_TLV_CAPA_CS_MODIFY = (__force iwl_ucode_tlv_capa_t)49,
IWL_UCODE_TLV_CAPA_SET_LTR_GEN2 = (__force iwl_ucode_tlv_capa_t)50,
IWL_UCODE_TLV_CAPA_SET_PPAG = (__force iwl_ucode_tlv_capa_t)52,
/* set 2 */ /* set 2 */
IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t)64, IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = (__force iwl_ucode_tlv_capa_t)64,
...@@ -465,6 +467,8 @@ enum iwl_ucode_tlv_capa { ...@@ -465,6 +467,8 @@ enum iwl_ucode_tlv_capa {
IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)88, IWL_UCODE_TLV_CAPA_LED_CMD_SUPPORT = (__force iwl_ucode_tlv_capa_t)88,
IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT = (__force iwl_ucode_tlv_capa_t)89, IWL_UCODE_TLV_CAPA_MCC_UPDATE_11AX_SUPPORT = (__force iwl_ucode_tlv_capa_t)89,
IWL_UCODE_TLV_CAPA_CSI_REPORTING = (__force iwl_ucode_tlv_capa_t)90, IWL_UCODE_TLV_CAPA_CSI_REPORTING = (__force iwl_ucode_tlv_capa_t)90,
IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP = (__force iwl_ucode_tlv_capa_t)92,
IWL_UCODE_TLV_CAPA_DBG_BUF_ALLOC_CMD_SUPP = (__force iwl_ucode_tlv_capa_t)93,
/* set 3 */ /* set 3 */
IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96, IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96,
...@@ -521,6 +525,10 @@ enum iwl_fw_phy_cfg { ...@@ -521,6 +525,10 @@ enum iwl_fw_phy_cfg {
FW_PHY_CFG_TX_CHAIN = 0xf << FW_PHY_CFG_TX_CHAIN_POS, FW_PHY_CFG_TX_CHAIN = 0xf << FW_PHY_CFG_TX_CHAIN_POS,
FW_PHY_CFG_RX_CHAIN_POS = 20, FW_PHY_CFG_RX_CHAIN_POS = 20,
FW_PHY_CFG_RX_CHAIN = 0xf << FW_PHY_CFG_RX_CHAIN_POS, FW_PHY_CFG_RX_CHAIN = 0xf << FW_PHY_CFG_RX_CHAIN_POS,
FW_PHY_CFG_CHAIN_SAD_POS = 23,
FW_PHY_CFG_CHAIN_SAD_ENABLED = 0x1 << FW_PHY_CFG_CHAIN_SAD_POS,
FW_PHY_CFG_CHAIN_SAD_ANT_A = 0x2 << FW_PHY_CFG_CHAIN_SAD_POS,
FW_PHY_CFG_CHAIN_SAD_ANT_B = 0x4 << FW_PHY_CFG_CHAIN_SAD_POS,
FW_PHY_CFG_SHARED_CLK = BIT(31), FW_PHY_CFG_SHARED_CLK = BIT(31),
}; };
...@@ -965,4 +973,19 @@ struct iwl_fw_cmd_version { ...@@ -965,4 +973,19 @@ struct iwl_fw_cmd_version {
u8 notif_ver; u8 notif_ver;
} __packed; } __packed;
static inline size_t _iwl_tlv_array_len(const struct iwl_ucode_tlv *tlv,
size_t fixed_size, size_t var_size)
{
size_t var_len = le32_to_cpu(tlv->length) - fixed_size;
if (WARN_ON(var_len % var_size))
return 0;
return var_len / var_size;
}
#define iwl_tlv_array_len(_tlv_ptr, _struct_ptr, _memb) \
_iwl_tlv_array_len((_tlv_ptr), sizeof(*(_struct_ptr)), \
sizeof(_struct_ptr->_memb[0]))
#endif /* __iwl_fw_file_h__ */ #endif /* __iwl_fw_file_h__ */
...@@ -227,15 +227,6 @@ struct iwl_fw_dbg { ...@@ -227,15 +227,6 @@ struct iwl_fw_dbg {
u32 dump_mask; u32 dump_mask;
}; };
/**
* @tlv: the buffer allocation tlv
* @is_alloc: indicates if the buffer was already allocated
*/
struct iwl_fw_ini_allocation_data {
struct iwl_fw_ini_allocation_tlv tlv;
u32 is_alloc;
} __packed;
/** /**
* struct iwl_fw_ini_active_triggers * struct iwl_fw_ini_active_triggers
* @active: is this trigger active * @active: is this trigger active
......
...@@ -81,8 +81,6 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans, ...@@ -81,8 +81,6 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
INIT_DELAYED_WORK(&fwrt->dump.wks[i].wk, iwl_fw_error_dump_wk); INIT_DELAYED_WORK(&fwrt->dump.wks[i].wk, iwl_fw_error_dump_wk);
} }
iwl_fwrt_dbgfs_register(fwrt, dbgfs_dir); iwl_fwrt_dbgfs_register(fwrt, dbgfs_dir);
timer_setup(&fwrt->dump.periodic_trig,
iwl_fw_dbg_periodic_trig_handler, 0);
} }
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init); IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -322,7 +322,7 @@ int iwl_init_paging(struct iwl_fw_runtime *fwrt, enum iwl_ucode_type type) ...@@ -322,7 +322,7 @@ int iwl_init_paging(struct iwl_fw_runtime *fwrt, enum iwl_ucode_type type)
const struct fw_img *fw = &fwrt->fw->img[type]; const struct fw_img *fw = &fwrt->fw->img[type];
int ret; int ret;
if (fwrt->trans->cfg->gen2) if (fwrt->trans->trans_cfg->gen2)
return 0; return 0;
/* /*
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
#include "iwl-trans.h" #include "iwl-trans.h"
#include "img.h" #include "img.h"
#include "fw/api/debug.h" #include "fw/api/debug.h"
#include "fw/api/dbg-tlv.h"
#include "fw/api/paging.h" #include "fw/api/paging.h"
#include "iwl-eeprom-parse.h" #include "iwl-eeprom-parse.h"
...@@ -91,6 +90,20 @@ struct iwl_fwrt_shared_mem_cfg { ...@@ -91,6 +90,20 @@ struct iwl_fwrt_shared_mem_cfg {
#define IWL_FW_RUNTIME_DUMP_WK_NUM 5 #define IWL_FW_RUNTIME_DUMP_WK_NUM 5
/**
* struct iwl_txf_iter_data - Tx fifo iterator data struct
* @fifo: fifo number
* @lmac: lmac number
* @fifo_size: fifo size
* @internal_txf: non zero if fifo is internal Tx fifo
*/
struct iwl_txf_iter_data {
int fifo;
int lmac;
u32 fifo_size;
u8 internal_txf;
};
/** /**
* struct iwl_fw_runtime - runtime data for firmware * struct iwl_fw_runtime - runtime data for firmware
* @fw: firmware image * @fw: firmware image
...@@ -144,8 +157,8 @@ struct iwl_fw_runtime { ...@@ -144,8 +157,8 @@ struct iwl_fw_runtime {
struct iwl_fw_ini_active_triggers active_trigs[IWL_FW_TRIGGER_ID_NUM]; struct iwl_fw_ini_active_triggers active_trigs[IWL_FW_TRIGGER_ID_NUM];
u32 lmac_err_id[MAX_NUM_LMAC]; u32 lmac_err_id[MAX_NUM_LMAC];
u32 umac_err_id; u32 umac_err_id;
void *fifo_iter;
struct timer_list periodic_trig; struct iwl_txf_iter_data txf_iter_data;
u8 img_name[IWL_FW_INI_MAX_IMG_NAME_LEN]; u8 img_name[IWL_FW_INI_MAX_IMG_NAME_LEN];
u8 internal_dbg_cfg_name[IWL_FW_INI_MAX_DBG_CFG_NAME_LEN]; u8 internal_dbg_cfg_name[IWL_FW_INI_MAX_DBG_CFG_NAME_LEN];
...@@ -190,6 +203,10 @@ static inline void iwl_fw_runtime_free(struct iwl_fw_runtime *fwrt) ...@@ -190,6 +203,10 @@ static inline void iwl_fw_runtime_free(struct iwl_fw_runtime *fwrt)
kfree(active->trig); kfree(active->trig);
active->trig = NULL; active->trig = NULL;
} }
iwl_dbg_tlv_del_timers(fwrt->trans);
for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++)
cancel_delayed_work_sync(&fwrt->dump.wks[i].wk);
} }
void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt); void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt);
......
...@@ -151,7 +151,7 @@ void iwl_get_shared_mem_conf(struct iwl_fw_runtime *fwrt) ...@@ -151,7 +151,7 @@ void iwl_get_shared_mem_conf(struct iwl_fw_runtime *fwrt)
} }
pkt = cmd.resp_pkt; pkt = cmd.resp_pkt;
if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22000) if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
iwl_parse_shared_mem_22000(fwrt, pkt); iwl_parse_shared_mem_22000(fwrt, pkt);
else else
iwl_parse_shared_mem(fwrt, pkt); iwl_parse_shared_mem(fwrt, pkt);
......
...@@ -161,7 +161,8 @@ static inline u8 num_of_ant(u8 mask) ...@@ -161,7 +161,8 @@ static inline u8 num_of_ant(u8 mask)
!!((mask) & ANT_C); !!((mask) & ANT_C);
} }
/* /**
* struct iwl_base_params - params not likely to change within a device family
* @max_ll_items: max number of OTP blocks * @max_ll_items: max number of OTP blocks
* @shadow_ram_support: shadow support for OTP memory * @shadow_ram_support: shadow support for OTP memory
* @led_compensation: compensate on the led on/off time per HW according * @led_compensation: compensate on the led on/off time per HW according
...@@ -330,8 +331,37 @@ struct iwl_csr_params { ...@@ -330,8 +331,37 @@ struct iwl_csr_params {
u32 mac_addr1_strap; u32 mac_addr1_strap;
}; };
/**
* struct iwl_cfg_trans - information needed to start the trans
*
* These values cannot be changed when multiple configs are used for a
* single PCI ID, because they are needed before the HW REV or RFID
* can be read.
*
* @base_params: pointer to basic parameters
* @csr: csr flags and addresses that are different across devices
* @device_family: the device family
* @umac_prph_offset: offset to add to UMAC periphery address
* @rf_id: need to read rf_id to determine the firmware image
* @use_tfh: use TFH
* @gen2: 22000 and on transport operation
* @mq_rx_supported: multi-queue rx support
*/
struct iwl_cfg_trans_params {
const struct iwl_base_params *base_params;
const struct iwl_csr_params *csr;
enum iwl_device_family device_family;
u32 umac_prph_offset;
u32 rf_id:1,
use_tfh:1,
gen2:1,
mq_rx_supported:1,
bisr_workaround:1;
};
/** /**
* struct iwl_cfg * struct iwl_cfg
* @trans: the trans-specific configuration part
* @name: Official name of the device * @name: Official name of the device
* @fw_name_pre: Firmware filename prefix. The api version and extension * @fw_name_pre: Firmware filename prefix. The api version and extension
* (.ucode) will be added to filename before loading from disk. The * (.ucode) will be added to filename before loading from disk. The
...@@ -346,10 +376,10 @@ struct iwl_csr_params { ...@@ -346,10 +376,10 @@ struct iwl_csr_params {
* @nvm_ver: NVM version * @nvm_ver: NVM version
* @nvm_calib_ver: NVM calibration version * @nvm_calib_ver: NVM calibration version
* @lib: pointer to the lib ops * @lib: pointer to the lib ops
* @base_params: pointer to basic parameters
* @ht_params: point to ht parameters * @ht_params: point to ht parameters
* @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off)
* @rx_with_siso_diversity: 1x1 device with rx antenna diversity * @rx_with_siso_diversity: 1x1 device with rx antenna diversity
* @tx_with_siso_diversity: 1x1 device with tx antenna diversity
* @internal_wimax_coex: internal wifi/wimax combo device * @internal_wimax_coex: internal wifi/wimax combo device
* @high_temp: Is this NIC is designated to be in high temperature. * @high_temp: Is this NIC is designated to be in high temperature.
* @host_interrupt_operation_mode: device needs host interrupt operation * @host_interrupt_operation_mode: device needs host interrupt operation
...@@ -358,7 +388,6 @@ struct iwl_csr_params { ...@@ -358,7 +388,6 @@ struct iwl_csr_params {
* @mac_addr_from_csr: read HW address from CSR registers * @mac_addr_from_csr: read HW address from CSR registers
* @features: hw features, any combination of feature_whitelist * @features: hw features, any combination of feature_whitelist
* @pwr_tx_backoffs: translation table between power limits and backoffs * @pwr_tx_backoffs: translation table between power limits and backoffs
* @csr: csr flags and addresses that are different across devices
* @max_rx_agg_size: max RX aggregation size of the ADDBA request/response * @max_rx_agg_size: max RX aggregation size of the ADDBA request/response
* @max_tx_agg_size: max TX aggregation size of the ADDBA request/response * @max_tx_agg_size: max TX aggregation size of the ADDBA request/response
* @max_ht_ampdu_factor: the exponent of the max length of A-MPDU that the * @max_ht_ampdu_factor: the exponent of the max length of A-MPDU that the
...@@ -371,18 +400,14 @@ struct iwl_csr_params { ...@@ -371,18 +400,14 @@ struct iwl_csr_params {
* @dccm2_len: length of the second DCCM * @dccm2_len: length of the second DCCM
* @smem_offset: offset from which the SMEM begins * @smem_offset: offset from which the SMEM begins
* @smem_len: the length of SMEM * @smem_len: the length of SMEM
* @mq_rx_supported: multi-queue rx support
* @vht_mu_mimo_supported: VHT MU-MIMO support * @vht_mu_mimo_supported: VHT MU-MIMO support
* @rf_id: need to read rf_id to determine the firmware image
* @integrated: discrete or integrated * @integrated: discrete or integrated
* @gen2: 22000 and on transport operation
* @cdb: CDB support * @cdb: CDB support
* @nvm_type: see &enum iwl_nvm_type * @nvm_type: see &enum iwl_nvm_type
* @d3_debug_data_base_addr: base address where D3 debug data is stored * @d3_debug_data_base_addr: base address where D3 debug data is stored
* @d3_debug_data_length: length of the D3 debug data * @d3_debug_data_length: length of the D3 debug data
* @bisr_workaround: BISR hardware workaround (for 22260 series devices) * @bisr_workaround: BISR hardware workaround (for 22260 series devices)
* @min_txq_size: minimum number of slots required in a TX queue * @min_txq_size: minimum number of slots required in a TX queue
* @umac_prph_offset: offset to add to UMAC periphery address
* @uhb_supported: ultra high band channels supported * @uhb_supported: ultra high band channels supported
* @min_256_ba_txq_size: minimum number of slots required in a TX queue which * @min_256_ba_txq_size: minimum number of slots required in a TX queue which
* supports 256 BA aggregation * supports 256 BA aggregation
...@@ -392,19 +417,16 @@ struct iwl_csr_params { ...@@ -392,19 +417,16 @@ struct iwl_csr_params {
* and/or the uCode API version instead. * and/or the uCode API version instead.
*/ */
struct iwl_cfg { struct iwl_cfg {
struct iwl_cfg_trans_params trans;
/* params specific to an individual device within a device family */ /* params specific to an individual device within a device family */
const char *name; const char *name;
const char *fw_name_pre; const char *fw_name_pre;
/* params not likely to change within a device family */
const struct iwl_base_params *base_params;
/* params likely to change within a device family */ /* params likely to change within a device family */
const struct iwl_ht_params *ht_params; const struct iwl_ht_params *ht_params;
const struct iwl_eeprom_params *eeprom_params; const struct iwl_eeprom_params *eeprom_params;
const struct iwl_pwr_tx_backoff *pwr_tx_backoffs; const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
const char *default_nvm_file_C_step; const char *default_nvm_file_C_step;
const struct iwl_tt_params *thermal_params; const struct iwl_tt_params *thermal_params;
const struct iwl_csr_params *csr;
enum iwl_device_family device_family;
enum iwl_led_mode led_mode; enum iwl_led_mode led_mode;
enum iwl_nvm_type nvm_type; enum iwl_nvm_type nvm_type;
u32 max_data_size; u32 max_data_size;
...@@ -420,6 +442,7 @@ struct iwl_cfg { ...@@ -420,6 +442,7 @@ struct iwl_cfg {
u16 nvm_ver; u16 nvm_ver;
u16 nvm_calib_ver; u16 nvm_calib_ver;
u32 rx_with_siso_diversity:1, u32 rx_with_siso_diversity:1,
tx_with_siso_diversity:1,
bt_shared_single_ant:1, bt_shared_single_ant:1,
internal_wimax_coex:1, internal_wimax_coex:1,
host_interrupt_operation_mode:1, host_interrupt_operation_mode:1,
...@@ -428,15 +451,10 @@ struct iwl_cfg { ...@@ -428,15 +451,10 @@ struct iwl_cfg {
lp_xtal_workaround:1, lp_xtal_workaround:1,
disable_dummy_notification:1, disable_dummy_notification:1,
apmg_not_supported:1, apmg_not_supported:1,
mq_rx_supported:1,
vht_mu_mimo_supported:1, vht_mu_mimo_supported:1,
rf_id:1,
integrated:1, integrated:1,
use_tfh:1,
gen2:1,
cdb:1, cdb:1,
dbgc_supported:1, dbgc_supported:1,
bisr_workaround:1,
uhb_supported:1; uhb_supported:1;
u8 valid_tx_ant; u8 valid_tx_ant;
u8 valid_rx_ant; u8 valid_rx_ant;
...@@ -453,7 +471,6 @@ struct iwl_cfg { ...@@ -453,7 +471,6 @@ struct iwl_cfg {
u32 d3_debug_data_base_addr; u32 d3_debug_data_base_addr;
u32 d3_debug_data_length; u32 d3_debug_data_length;
u32 min_txq_size; u32 min_txq_size;
u32 umac_prph_offset;
u32 fw_mon_smem_write_ptr_addr; u32 fw_mon_smem_write_ptr_addr;
u32 fw_mon_smem_write_ptr_msk; u32 fw_mon_smem_write_ptr_msk;
u32 fw_mon_smem_cycle_cnt_ptr_addr; u32 fw_mon_smem_cycle_cnt_ptr_addr;
......
...@@ -60,149 +60,112 @@ ...@@ -60,149 +60,112 @@
*****************************************************************************/ *****************************************************************************/
#include <linux/firmware.h> #include <linux/firmware.h>
#include "iwl-drv.h"
#include "iwl-trans.h" #include "iwl-trans.h"
#include "iwl-dbg-tlv.h" #include "iwl-dbg-tlv.h"
#include "fw/dbg.h"
void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, #include "fw/runtime.h"
bool ext)
/**
* enum iwl_dbg_tlv_type - debug TLV types
* @IWL_DBG_TLV_TYPE_DEBUG_INFO: debug info TLV
* @IWL_DBG_TLV_TYPE_BUF_ALLOC: buffer allocation TLV
* @IWL_DBG_TLV_TYPE_HCMD: host command TLV
* @IWL_DBG_TLV_TYPE_REGION: region TLV
* @IWL_DBG_TLV_TYPE_TRIGGER: trigger TLV
* @IWL_DBG_TLV_TYPE_NUM: number of debug TLVs
*/
enum iwl_dbg_tlv_type {
IWL_DBG_TLV_TYPE_DEBUG_INFO =
IWL_UCODE_TLV_TYPE_DEBUG_INFO - IWL_UCODE_TLV_DEBUG_BASE,
IWL_DBG_TLV_TYPE_BUF_ALLOC,
IWL_DBG_TLV_TYPE_HCMD,
IWL_DBG_TLV_TYPE_REGION,
IWL_DBG_TLV_TYPE_TRIGGER,
IWL_DBG_TLV_TYPE_NUM,
};
/**
* struct iwl_dbg_tlv_ver_data - debug TLV version struct
* @min_ver: min version supported
* @max_ver: max version supported
*/
struct iwl_dbg_tlv_ver_data {
int min_ver;
int max_ver;
};
static const struct iwl_dbg_tlv_ver_data
dbg_ver_table[IWL_DBG_TLV_TYPE_NUM] = {
[IWL_DBG_TLV_TYPE_DEBUG_INFO] = {.min_ver = 1, .max_ver = 1,},
[IWL_DBG_TLV_TYPE_BUF_ALLOC] = {.min_ver = 1, .max_ver = 1,},
[IWL_DBG_TLV_TYPE_HCMD] = {.min_ver = 1, .max_ver = 1,},
[IWL_DBG_TLV_TYPE_REGION] = {.min_ver = 1, .max_ver = 1,},
[IWL_DBG_TLV_TYPE_TRIGGER] = {.min_ver = 1, .max_ver = 1,},
};
static bool iwl_dbg_tlv_ver_support(struct iwl_ucode_tlv *tlv)
{ {
struct iwl_apply_point_data *data; struct iwl_fw_ini_header *hdr = (void *)&tlv->data[0];
struct iwl_fw_ini_header *header = (void *)&tlv->data[0]; u32 type = le32_to_cpu(tlv->type);
u32 apply_point = le32_to_cpu(header->apply_point); u32 tlv_idx = type - IWL_UCODE_TLV_DEBUG_BASE;
u32 ver = le32_to_cpu(hdr->tlv_version);
int copy_size = le32_to_cpu(tlv->length) + sizeof(*tlv);
int offset_size = copy_size;
if (le32_to_cpu(header->tlv_version) != 1)
return;
if (WARN_ONCE(apply_point >= IWL_FW_INI_APPLY_NUM,
"Invalid apply point id %d\n", apply_point))
return;
if (ext)
data = &trans->dbg.apply_points_ext[apply_point];
else
data = &trans->dbg.apply_points[apply_point];
/* add room for is_alloc field in &iwl_fw_ini_allocation_data struct */
if (le32_to_cpu(tlv->type) == IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION) {
struct iwl_fw_ini_allocation_data *buf_alloc =
(void *)tlv->data;
offset_size += sizeof(buf_alloc->is_alloc);
}
/* if (ver < dbg_ver_table[tlv_idx].min_ver ||
* Make sure we still have room to copy this TLV. Offset points to the ver > dbg_ver_table[tlv_idx].max_ver)
* location the last copy ended. return false;
*/
if (WARN_ONCE(data->offset + offset_size > data->size,
"Not enough memory for apply point %d\n",
apply_point))
return;
memcpy(data->data + data->offset, (void *)tlv, copy_size); return true;
data->offset += offset_size;
} }
void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data, void iwl_dbg_tlv_alloc(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv,
bool ext) bool ext)
{ {
struct iwl_ucode_tlv *tlv; struct iwl_fw_ini_header *hdr = (void *)&tlv->data[0];
u32 size[IWL_FW_INI_APPLY_NUM] = {0}; u32 type = le32_to_cpu(tlv->type);
int i; u32 pnt = le32_to_cpu(hdr->apply_point);
u32 tlv_idx = type - IWL_UCODE_TLV_DEBUG_BASE;
while (len >= sizeof(*tlv)) { enum iwl_ini_cfg_state *cfg_state = ext ?
u32 tlv_len, tlv_type, apply; &trans->dbg.external_ini_cfg : &trans->dbg.internal_ini_cfg;
struct iwl_fw_ini_header *hdr;
len -= sizeof(*tlv);
tlv = (void *)data;
tlv_len = le32_to_cpu(tlv->length);
tlv_type = le32_to_cpu(tlv->type);
if (len < tlv_len)
return;
len -= ALIGN(tlv_len, 4);
data += sizeof(*tlv) + ALIGN(tlv_len, 4);
if (tlv_type < IWL_UCODE_TLV_DEBUG_BASE ||
tlv_type > IWL_UCODE_TLV_DEBUG_MAX)
continue;
hdr = (void *)&tlv->data[0];
apply = le32_to_cpu(hdr->apply_point);
if (le32_to_cpu(hdr->tlv_version) != 1)
continue;
IWL_DEBUG_FW(trans, "WRT: read TLV 0x%x, apply point %d\n", IWL_DEBUG_FW(trans, "WRT: read TLV 0x%x, apply point %d\n",
le32_to_cpu(tlv->type), apply); type, pnt);
if (WARN_ON(apply >= IWL_FW_INI_APPLY_NUM))
continue;
/* add room for is_alloc field in &iwl_fw_ini_allocation_data
* struct
*/
if (tlv_type == IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION) {
struct iwl_fw_ini_allocation_data *buf_alloc =
(void *)tlv->data;
size[apply] += sizeof(buf_alloc->is_alloc); if (tlv_idx >= IWL_DBG_TLV_TYPE_NUM) {
IWL_ERR(trans, "WRT: Unsupported TLV 0x%x\n", type);
goto out_err;
} }
size[apply] += sizeof(*tlv) + tlv_len; if (!iwl_dbg_tlv_ver_support(tlv)) {
IWL_ERR(trans, "WRT: Unsupported TLV 0x%x version %u\n", type,
le32_to_cpu(hdr->tlv_version));
goto out_err;
} }
for (i = 0; i < ARRAY_SIZE(size); i++) { if (*cfg_state == IWL_INI_CFG_STATE_NOT_LOADED)
void *mem; *cfg_state = IWL_INI_CFG_STATE_LOADED;
if (!size[i])
continue;
mem = kzalloc(size[i], GFP_KERNEL);
if (!mem) {
IWL_ERR(trans, "No memory for apply point %d\n", i);
return; return;
}
if (ext) {
trans->dbg.apply_points_ext[i].data = mem;
trans->dbg.apply_points_ext[i].size = size[i];
} else {
trans->dbg.apply_points[i].data = mem;
trans->dbg.apply_points[i].size = size[i];
}
trans->dbg.ini_valid = true; out_err:
} *cfg_state = IWL_INI_CFG_STATE_CORRUPTED;
} }
void iwl_fw_dbg_free(struct iwl_trans *trans) void iwl_dbg_tlv_del_timers(struct iwl_trans *trans)
{ {
int i; /* will be used later */
}
for (i = 0; i < ARRAY_SIZE(trans->dbg.apply_points); i++) { IWL_EXPORT_SYMBOL(iwl_dbg_tlv_del_timers);
kfree(trans->dbg.apply_points[i].data);
trans->dbg.apply_points[i].size = 0;
trans->dbg.apply_points[i].offset = 0;
kfree(trans->dbg.apply_points_ext[i].data); void iwl_dbg_tlv_free(struct iwl_trans *trans)
trans->dbg.apply_points_ext[i].size = 0; {
trans->dbg.apply_points_ext[i].offset = 0; /* will be used again later */
}
} }
static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, static int iwl_dbg_tlv_parse_bin(struct iwl_trans *trans, const u8 *data,
size_t len) size_t len)
{ {
struct iwl_ucode_tlv *tlv; struct iwl_ucode_tlv *tlv;
enum iwl_ucode_tlv_type tlv_type;
u32 tlv_len; u32 tlv_len;
while (len >= sizeof(*tlv)) { while (len >= sizeof(*tlv)) {
...@@ -210,7 +173,6 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, ...@@ -210,7 +173,6 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data,
tlv = (void *)data; tlv = (void *)data;
tlv_len = le32_to_cpu(tlv->length); tlv_len = le32_to_cpu(tlv->length);
tlv_type = le32_to_cpu(tlv->type);
if (len < tlv_len) { if (len < tlv_len) {
IWL_ERR(trans, "invalid TLV len: %zd/%u\n", IWL_ERR(trans, "invalid TLV len: %zd/%u\n",
...@@ -220,39 +182,33 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data, ...@@ -220,39 +182,33 @@ static int iwl_parse_fw_dbg_tlv(struct iwl_trans *trans, const u8 *data,
len -= ALIGN(tlv_len, 4); len -= ALIGN(tlv_len, 4);
data += sizeof(*tlv) + ALIGN(tlv_len, 4); data += sizeof(*tlv) + ALIGN(tlv_len, 4);
switch (tlv_type) { iwl_dbg_tlv_alloc(trans, tlv, true);
case IWL_UCODE_TLV_TYPE_DEBUG_INFO:
case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION:
case IWL_UCODE_TLV_TYPE_HCMD:
case IWL_UCODE_TLV_TYPE_REGIONS:
case IWL_UCODE_TLV_TYPE_TRIGGERS:
case IWL_UCODE_TLV_TYPE_DEBUG_FLOW:
iwl_fw_dbg_copy_tlv(trans, tlv, true);
break;
default:
WARN_ONCE(1, "Invalid TLV %x\n", tlv_type);
break;
}
} }
return 0; return 0;
} }
void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans) void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans)
{ {
const struct firmware *fw; const struct firmware *fw;
int res; int res;
if (trans->dbg.external_ini_loaded || !iwlwifi_mod_params.enable_ini) if (!iwlwifi_mod_params.enable_ini)
return; return;
res = request_firmware(&fw, "iwl-dbg-tlv.ini", dev); res = request_firmware(&fw, "iwl-dbg-tlv.ini", dev);
if (res) if (res)
return; return;
iwl_alloc_dbg_tlv(trans, fw->size, fw->data, true); iwl_dbg_tlv_parse_bin(trans, fw->data, fw->size);
iwl_parse_fw_dbg_tlv(trans, fw->data, fw->size);
trans->dbg.external_ini_loaded = true;
release_firmware(fw); release_firmware(fw);
} }
void iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
enum iwl_fw_ini_time_point tp_id,
union iwl_dbg_tlv_tp_data *tp_data)
{
/* will be used later */
}
IWL_EXPORT_SYMBOL(iwl_dbg_tlv_time_point);
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* GPL LICENSE SUMMARY * GPL LICENSE SUMMARY
* *
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* *
* BSD LICENSE * BSD LICENSE
* *
* Copyright (C) 2018 Intel Corporation * Copyright (C) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -66,22 +66,32 @@ ...@@ -66,22 +66,32 @@
/** /**
* struct iwl_apply_point_data * struct iwl_apply_point_data
* @data: start address of this apply point data * @list: list to go through the TLVs of the apply point
* @size total size of the data * @tlv: a debug TLV
* @offset: current offset of the copied data
*/ */
struct iwl_apply_point_data { struct iwl_apply_point_data {
void *data; struct list_head list;
int size; struct iwl_ucode_tlv tlv;
int offset; };
/**
* union iwl_dbg_tlv_tp_data - data that is given in a time point
* @fw_pkt: a packet received from the FW
*/
union iwl_dbg_tlv_tp_data {
struct iwl_rx_packet *fw_pkt;
}; };
struct iwl_trans; struct iwl_trans;
void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans); struct iwl_fw_runtime;
void iwl_fw_dbg_free(struct iwl_trans *trans);
void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans);
bool ext); void iwl_dbg_tlv_free(struct iwl_trans *trans);
void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data, void iwl_dbg_tlv_alloc(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv,
bool ext); bool ext);
void iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
enum iwl_fw_ini_time_point tp_id,
union iwl_dbg_tlv_tp_data *tp_data);
void iwl_dbg_tlv_del_timers(struct iwl_trans *trans);
#endif /* __iwl_dbg_tlv_h__*/ #endif /* __iwl_dbg_tlv_h__*/
...@@ -75,7 +75,6 @@ static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans, ...@@ -75,7 +75,6 @@ static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <linux/device.h> #include <linux/device.h>
#include "iwl-trans.h"
#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__) #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
......
...@@ -215,7 +215,7 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) ...@@ -215,7 +215,7 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
const struct iwl_cfg *cfg = drv->trans->cfg; const struct iwl_cfg *cfg = drv->trans->cfg;
char tag[8]; char tag[8];
if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 && if (drv->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
(CSR_HW_REV_STEP(drv->trans->hw_rev) != SILICON_B_STEP && (CSR_HW_REV_STEP(drv->trans->hw_rev) != SILICON_B_STEP &&
CSR_HW_REV_STEP(drv->trans->hw_rev) != SILICON_C_STEP)) { CSR_HW_REV_STEP(drv->trans->hw_rev) != SILICON_C_STEP)) {
IWL_ERR(drv, IWL_ERR(drv,
...@@ -647,9 +647,6 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, ...@@ -647,9 +647,6 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
len -= sizeof(*ucode); len -= sizeof(*ucode);
if (iwlwifi_mod_params.enable_ini)
iwl_alloc_dbg_tlv(drv->trans, len, data, false);
while (len >= sizeof(*tlv)) { while (len >= sizeof(*tlv)) {
len -= sizeof(*tlv); len -= sizeof(*tlv);
tlv = (void *)data; tlv = (void *)data;
...@@ -1123,7 +1120,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, ...@@ -1123,7 +1120,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
if (tlv_len != sizeof(*dbg_ptrs)) if (tlv_len != sizeof(*dbg_ptrs))
goto invalid_tlv_len; goto invalid_tlv_len;
if (drv->trans->cfg->device_family < if (drv->trans->trans_cfg->device_family <
IWL_DEVICE_FAMILY_22000) IWL_DEVICE_FAMILY_22000)
break; break;
drv->trans->dbg.umac_error_event_table = drv->trans->dbg.umac_error_event_table =
...@@ -1139,7 +1136,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, ...@@ -1139,7 +1136,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
if (tlv_len != sizeof(*dbg_ptrs)) if (tlv_len != sizeof(*dbg_ptrs))
goto invalid_tlv_len; goto invalid_tlv_len;
if (drv->trans->cfg->device_family < if (drv->trans->trans_cfg->device_family <
IWL_DEVICE_FAMILY_22000) IWL_DEVICE_FAMILY_22000)
break; break;
drv->trans->dbg.lmac_error_event_table[0] = drv->trans->dbg.lmac_error_event_table[0] =
...@@ -1154,9 +1151,8 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, ...@@ -1154,9 +1151,8 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
case IWL_UCODE_TLV_TYPE_HCMD: case IWL_UCODE_TLV_TYPE_HCMD:
case IWL_UCODE_TLV_TYPE_REGIONS: case IWL_UCODE_TLV_TYPE_REGIONS:
case IWL_UCODE_TLV_TYPE_TRIGGERS: case IWL_UCODE_TLV_TYPE_TRIGGERS:
case IWL_UCODE_TLV_TYPE_DEBUG_FLOW:
if (iwlwifi_mod_params.enable_ini) if (iwlwifi_mod_params.enable_ini)
iwl_fw_dbg_copy_tlv(drv->trans, tlv, false); iwl_dbg_tlv_alloc(drv->trans, tlv, false);
break; break;
case IWL_UCODE_TLV_CMD_VERSIONS: case IWL_UCODE_TLV_CMD_VERSIONS:
if (tlv_len % sizeof(struct iwl_fw_cmd_version)) { if (tlv_len % sizeof(struct iwl_fw_cmd_version)) {
...@@ -1526,14 +1522,14 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) ...@@ -1526,14 +1522,14 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
fw->init_evtlog_size = (pieces->init_evtlog_size - 16)/12; fw->init_evtlog_size = (pieces->init_evtlog_size - 16)/12;
else else
fw->init_evtlog_size = fw->init_evtlog_size =
drv->trans->cfg->base_params->max_event_log_size; drv->trans->trans_cfg->base_params->max_event_log_size;
fw->init_errlog_ptr = pieces->init_errlog_ptr; fw->init_errlog_ptr = pieces->init_errlog_ptr;
fw->inst_evtlog_ptr = pieces->inst_evtlog_ptr; fw->inst_evtlog_ptr = pieces->inst_evtlog_ptr;
if (pieces->inst_evtlog_size) if (pieces->inst_evtlog_size)
fw->inst_evtlog_size = (pieces->inst_evtlog_size - 16)/12; fw->inst_evtlog_size = (pieces->inst_evtlog_size - 16)/12;
else else
fw->inst_evtlog_size = fw->inst_evtlog_size =
drv->trans->cfg->base_params->max_event_log_size; drv->trans->trans_cfg->base_params->max_event_log_size;
fw->inst_errlog_ptr = pieces->inst_errlog_ptr; fw->inst_errlog_ptr = pieces->inst_errlog_ptr;
/* /*
...@@ -1640,7 +1636,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) ...@@ -1640,7 +1636,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans)
init_completion(&drv->request_firmware_complete); init_completion(&drv->request_firmware_complete);
INIT_LIST_HEAD(&drv->list); INIT_LIST_HEAD(&drv->list);
iwl_load_fw_dbg_tlv(drv->trans->dev, drv->trans); iwl_dbg_tlv_load_bin(drv->trans->dev, drv->trans);
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
/* Create the device debugfs entries. */ /* Create the device debugfs entries. */
...@@ -1662,8 +1658,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) ...@@ -1662,8 +1658,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans)
err_fw: err_fw:
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
debugfs_remove_recursive(drv->dbgfs_drv); debugfs_remove_recursive(drv->dbgfs_drv);
iwl_dbg_tlv_free(drv->trans);
#endif #endif
iwl_fw_dbg_free(drv->trans);
kfree(drv); kfree(drv);
err: err:
return ERR_PTR(ret); return ERR_PTR(ret);
...@@ -1693,7 +1689,7 @@ void iwl_drv_stop(struct iwl_drv *drv) ...@@ -1693,7 +1689,7 @@ void iwl_drv_stop(struct iwl_drv *drv)
debugfs_remove_recursive(drv->dbgfs_drv); debugfs_remove_recursive(drv->dbgfs_drv);
#endif #endif
iwl_fw_dbg_free(drv->trans); iwl_dbg_tlv_free(drv->trans);
kfree(drv); kfree(drv);
} }
...@@ -1704,8 +1700,6 @@ struct iwl_mod_params iwlwifi_mod_params = { ...@@ -1704,8 +1700,6 @@ struct iwl_mod_params iwlwifi_mod_params = {
.fw_restart = true, .fw_restart = true,
.bt_coex_active = true, .bt_coex_active = true,
.power_level = IWL_POWER_INDEX_1, .power_level = IWL_POWER_INDEX_1,
.d0i3_disable = true,
.d0i3_timeout = 1000,
.uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT, .uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
/* the rest are 0 by default */ /* the rest are 0 by default */
}; };
...@@ -1823,9 +1817,6 @@ MODULE_PARM_DESC(antenna_coupling, ...@@ -1823,9 +1817,6 @@ MODULE_PARM_DESC(antenna_coupling,
module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444); module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444);
MODULE_PARM_DESC(nvm_file, "NVM file name"); MODULE_PARM_DESC(nvm_file, "NVM file name");
module_param_named(d0i3_disable, iwlwifi_mod_params.d0i3_disable, bool, 0444);
MODULE_PARM_DESC(d0i3_disable, "disable d0i3 functionality (default: Y)");
module_param_named(lar_disable, iwlwifi_mod_params.lar_disable, bool, 0444); module_param_named(lar_disable, iwlwifi_mod_params.lar_disable, bool, 0444);
MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)"); MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)");
...@@ -1873,9 +1864,6 @@ module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, 0444); ...@@ -1873,9 +1864,6 @@ module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, 0444);
MODULE_PARM_DESC(fw_monitor, MODULE_PARM_DESC(fw_monitor,
"firmware monitor - to debug FW (default: false - needs lots of memory)"); "firmware monitor - to debug FW (default: false - needs lots of memory)");
module_param_named(d0i3_timeout, iwlwifi_mod_params.d0i3_timeout, uint, 0444);
MODULE_PARM_DESC(d0i3_timeout, "Timeout to D0i3 entry when idle (ms)");
module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444); module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444);
MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)"); MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 Intel Mobile Communications GmbH * Copyright(c) 2015 Intel Mobile Communications GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* *
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 Intel Mobile Communications GmbH * Copyright(c) 2015 Intel Mobile Communications GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -728,12 +728,13 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data, ...@@ -728,12 +728,13 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data,
#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */ #define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
#define MAX_BIT_RATE_20_MHZ 72 /* Mbps */ #define MAX_BIT_RATE_20_MHZ 72 /* Mbps */
void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, void iwl_init_ht_hw_capab(struct iwl_trans *trans,
struct iwl_nvm_data *data, struct iwl_nvm_data *data,
struct ieee80211_sta_ht_cap *ht_info, struct ieee80211_sta_ht_cap *ht_info,
enum nl80211_band band, enum nl80211_band band,
u8 tx_chains, u8 rx_chains) u8 tx_chains, u8 rx_chains)
{ {
const struct iwl_cfg *cfg = trans->cfg;
int max_bit_rate = 0; int max_bit_rate = 0;
tx_chains = hweight8(tx_chains); tx_chains = hweight8(tx_chains);
...@@ -765,7 +766,7 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, ...@@ -765,7 +766,7 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
if (cfg->ht_params->ldpc) if (cfg->ht_params->ldpc)
ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING; ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
if ((cfg->mq_rx_supported && if ((trans->trans_cfg->mq_rx_supported &&
iwlwifi_mod_params.amsdu_size == IWL_AMSDU_DEF) || iwlwifi_mod_params.amsdu_size == IWL_AMSDU_DEF) ||
iwlwifi_mod_params.amsdu_size >= IWL_AMSDU_8K) iwlwifi_mod_params.amsdu_size >= IWL_AMSDU_8K)
ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
...@@ -805,10 +806,11 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, ...@@ -805,10 +806,11 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
} }
} }
static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg,
struct iwl_nvm_data *data, struct iwl_nvm_data *data,
const u8 *eeprom, size_t eeprom_size) const u8 *eeprom, size_t eeprom_size)
{ {
struct device *dev = trans->dev;
int n_channels = iwl_init_channel_map(dev, cfg, data, int n_channels = iwl_init_channel_map(dev, cfg, data,
eeprom, eeprom_size); eeprom, eeprom_size);
int n_used = 0; int n_used = 0;
...@@ -820,7 +822,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, ...@@ -820,7 +822,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
sband->n_bitrates = N_RATES_24; sband->n_bitrates = N_RATES_24;
n_used += iwl_init_sband_channels(data, sband, n_channels, n_used += iwl_init_sband_channels(data, sband, n_channels,
NL80211_BAND_2GHZ); NL80211_BAND_2GHZ);
iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ, iwl_init_ht_hw_capab(trans, data, &sband->ht_cap, NL80211_BAND_2GHZ,
data->valid_tx_ant, data->valid_rx_ant); data->valid_tx_ant, data->valid_rx_ant);
sband = &data->bands[NL80211_BAND_5GHZ]; sband = &data->bands[NL80211_BAND_5GHZ];
...@@ -829,7 +831,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, ...@@ -829,7 +831,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
sband->n_bitrates = N_RATES_52; sband->n_bitrates = N_RATES_52;
n_used += iwl_init_sband_channels(data, sband, n_channels, n_used += iwl_init_sband_channels(data, sband, n_channels,
NL80211_BAND_5GHZ); NL80211_BAND_5GHZ);
iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ, iwl_init_ht_hw_capab(trans, data, &sband->ht_cap, NL80211_BAND_5GHZ,
data->valid_tx_ant, data->valid_rx_ant); data->valid_tx_ant, data->valid_rx_ant);
if (n_channels != n_used) if (n_channels != n_used)
...@@ -840,10 +842,11 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, ...@@ -840,10 +842,11 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
/* EEPROM data functions */ /* EEPROM data functions */
struct iwl_nvm_data * struct iwl_nvm_data *
iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
const u8 *eeprom, size_t eeprom_size) const u8 *eeprom, size_t eeprom_size)
{ {
struct iwl_nvm_data *data; struct iwl_nvm_data *data;
struct device *dev = trans->dev;
const void *tmp; const void *tmp;
u16 radio_cfg, sku; u16 radio_cfg, sku;
...@@ -918,7 +921,7 @@ iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, ...@@ -918,7 +921,7 @@ iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg,
goto err_free; goto err_free;
} }
iwl_init_sbands(dev, cfg, data, eeprom, eeprom_size); iwl_init_sbands(trans, cfg, data, eeprom, eeprom_size);
return data; return data;
err_free: err_free:
......
...@@ -116,14 +116,14 @@ struct iwl_nvm_data { ...@@ -116,14 +116,14 @@ struct iwl_nvm_data {
* later with iwl_free_nvm_data(). * later with iwl_free_nvm_data().
*/ */
struct iwl_nvm_data * struct iwl_nvm_data *
iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
const u8 *eeprom, size_t eeprom_size); const u8 *eeprom, size_t eeprom_size);
int iwl_init_sband_channels(struct iwl_nvm_data *data, int iwl_init_sband_channels(struct iwl_nvm_data *data,
struct ieee80211_supported_band *sband, struct ieee80211_supported_band *sband,
int n_channels, enum nl80211_band band); int n_channels, enum nl80211_band band);
void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, void iwl_init_ht_hw_capab(struct iwl_trans *trans,
struct iwl_nvm_data *data, struct iwl_nvm_data *data,
struct ieee80211_sta_ht_cap *ht_info, struct ieee80211_sta_ht_cap *ht_info,
enum nl80211_band band, enum nl80211_band band,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* GPL LICENSE SUMMARY * GPL LICENSE SUMMARY
* *
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* BSD LICENSE * BSD LICENSE
* *
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -193,7 +193,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans) ...@@ -193,7 +193,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
{ {
int ret; int ret;
ret = iwl_finish_nic_init(trans); ret = iwl_finish_nic_init(trans, trans->trans_cfg);
if (ret) if (ret)
return ret; return ret;
...@@ -207,7 +207,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans) ...@@ -207,7 +207,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
* CSR auto clock gate disable bit - * CSR auto clock gate disable bit -
* this is only applicable for HW with OTP shadow RAM * this is only applicable for HW with OTP shadow RAM
*/ */
if (trans->cfg->base_params->shadow_ram_support) if (trans->trans_cfg->base_params->shadow_ram_support)
iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
CSR_RESET_LINK_PWR_MGMT_DISABLED); CSR_RESET_LINK_PWR_MGMT_DISABLED);
...@@ -328,7 +328,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans, ...@@ -328,7 +328,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
} }
/* more in the link list, continue */ /* more in the link list, continue */
usedblocks++; usedblocks++;
} while (usedblocks <= trans->cfg->base_params->max_ll_items); } while (usedblocks <= trans->trans_cfg->base_params->max_ll_items);
/* OTP has no valid blocks */ /* OTP has no valid blocks */
IWL_DEBUG_EEPROM(trans->dev, "OTP has no valid blocks\n"); IWL_DEBUG_EEPROM(trans->dev, "OTP has no valid blocks\n");
...@@ -361,7 +361,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size) ...@@ -361,7 +361,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
if (nvm_is_otp < 0) if (nvm_is_otp < 0)
return nvm_is_otp; return nvm_is_otp;
sz = trans->cfg->base_params->eeprom_size; sz = trans->trans_cfg->base_params->eeprom_size;
IWL_DEBUG_EEPROM(trans->dev, "NVM size = %d\n", sz); IWL_DEBUG_EEPROM(trans->dev, "NVM size = %d\n", sz);
e = kmalloc(sz, GFP_KERNEL); e = kmalloc(sz, GFP_KERNEL);
...@@ -396,7 +396,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size) ...@@ -396,7 +396,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK |
CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK);
/* traversing the linked list if no shadow ram supported */ /* traversing the linked list if no shadow ram supported */
if (!trans->cfg->base_params->shadow_ram_support) { if (!trans->trans_cfg->base_params->shadow_ram_support) {
ret = iwl_find_otp_image(trans, &validblockaddr); ret = iwl_find_otp_image(trans, &validblockaddr);
if (ret) if (ret)
goto err_unlock; goto err_unlock;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 - 2017 Intel Deutschland GmbH * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* *
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 - 2017 Intel Deutschland GmbH * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans, static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans,
unsigned int chnl) unsigned int chnl)
{ {
if (trans->cfg->use_tfh) { if (trans->trans_cfg->use_tfh) {
WARN_ON_ONCE(chnl >= 64); WARN_ON_ONCE(chnl >= 64);
return TFH_TFDQ_CBB_TABLE + 8 * chnl; return TFH_TFDQ_CBB_TABLE + 8 * chnl;
} }
......
...@@ -304,10 +304,10 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph); ...@@ -304,10 +304,10 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph);
void iwl_force_nmi(struct iwl_trans *trans) void iwl_force_nmi(struct iwl_trans *trans)
{ {
if (trans->cfg->device_family < IWL_DEVICE_FAMILY_9000) if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000)
iwl_write_prph(trans, DEVICE_SET_NMI_REG, iwl_write_prph(trans, DEVICE_SET_NMI_REG,
DEVICE_SET_NMI_VAL_DRV); DEVICE_SET_NMI_VAL_DRV);
else if (trans->cfg->device_family < IWL_DEVICE_FAMILY_AX210) else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER, iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER,
UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER_MSK); UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER_MSK);
else else
...@@ -458,7 +458,7 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf) ...@@ -458,7 +458,7 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf)
FH_TSSR_TX_ERROR_REG FH_TSSR_TX_ERROR_REG
}; };
if (trans->cfg->mq_rx_supported) if (trans->trans_cfg->mq_rx_supported)
return iwl_dump_rfh(trans, buf); return iwl_dump_rfh(trans, buf);
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
...@@ -492,11 +492,12 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf) ...@@ -492,11 +492,12 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf)
return 0; return 0;
} }
int iwl_finish_nic_init(struct iwl_trans *trans) int iwl_finish_nic_init(struct iwl_trans *trans,
const struct iwl_cfg_trans_params *cfg_trans)
{ {
int err; int err;
if (trans->cfg->bisr_workaround) { if (cfg_trans->bisr_workaround) {
/* ensure the TOP FSM isn't still in previous reset */ /* ensure the TOP FSM isn't still in previous reset */
mdelay(2); mdelay(2);
} }
...@@ -506,9 +507,9 @@ int iwl_finish_nic_init(struct iwl_trans *trans) ...@@ -506,9 +507,9 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
* D0U* --> D0A* (powered-up active) state. * D0U* --> D0A* (powered-up active) state.
*/ */
iwl_set_bit(trans, CSR_GP_CNTRL, iwl_set_bit(trans, CSR_GP_CNTRL,
BIT(trans->cfg->csr->flag_init_done)); BIT(cfg_trans->csr->flag_init_done));
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) if (cfg_trans->device_family == IWL_DEVICE_FAMILY_8000)
udelay(2); udelay(2);
/* /*
...@@ -517,13 +518,13 @@ int iwl_finish_nic_init(struct iwl_trans *trans) ...@@ -517,13 +518,13 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
* and accesses to uCode SRAM. * and accesses to uCode SRAM.
*/ */
err = iwl_poll_bit(trans, CSR_GP_CNTRL, err = iwl_poll_bit(trans, CSR_GP_CNTRL,
BIT(trans->cfg->csr->flag_mac_clock_ready), BIT(cfg_trans->csr->flag_mac_clock_ready),
BIT(trans->cfg->csr->flag_mac_clock_ready), BIT(cfg_trans->csr->flag_mac_clock_ready),
25000); 25000);
if (err < 0) if (err < 0)
IWL_DEBUG_INFO(trans, "Failed to wake NIC\n"); IWL_DEBUG_INFO(trans, "Failed to wake NIC\n");
if (trans->cfg->bisr_workaround) { if (cfg_trans->bisr_workaround) {
/* ensure BISR shift has finished */ /* ensure BISR shift has finished */
udelay(200); udelay(200);
} }
......
...@@ -99,7 +99,8 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs, ...@@ -99,7 +99,8 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask); void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask);
void iwl_force_nmi(struct iwl_trans *trans); void iwl_force_nmi(struct iwl_trans *trans);
int iwl_finish_nic_init(struct iwl_trans *trans); int iwl_finish_nic_init(struct iwl_trans *trans,
const struct iwl_cfg_trans_params *cfg_trans);
/* Error handling */ /* Error handling */
int iwl_dump_fh(struct iwl_trans *trans, char **buf); int iwl_dump_fh(struct iwl_trans *trans, char **buf);
...@@ -111,35 +112,38 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf); ...@@ -111,35 +112,38 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf);
*/ */
static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs) static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs)
{ {
return ofs + trans->cfg->umac_prph_offset; return ofs + trans->cfg->trans.umac_prph_offset;
} }
static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs) static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs)
{ {
return iwl_read_prph_no_grab(trans, ofs + trans->cfg->umac_prph_offset); return iwl_read_prph_no_grab(trans, ofs +
trans->cfg->trans.umac_prph_offset);
} }
static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs) static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs)
{ {
return iwl_read_prph(trans, ofs + trans->cfg->umac_prph_offset); return iwl_read_prph(trans, ofs + trans->cfg->trans.umac_prph_offset);
} }
static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs, static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs,
u32 val) u32 val)
{ {
iwl_write_prph_no_grab(trans, ofs + trans->cfg->umac_prph_offset, val); iwl_write_prph_no_grab(trans, ofs + trans->cfg->trans.umac_prph_offset,
val);
} }
static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs, static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs,
u32 val) u32 val)
{ {
iwl_write_prph(trans, ofs + trans->cfg->umac_prph_offset, val); iwl_write_prph(trans, ofs + trans->cfg->trans.umac_prph_offset, val);
} }
static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr, static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr,
u32 bits, u32 mask, int timeout) u32 bits, u32 mask, int timeout)
{ {
return iwl_poll_prph_bit(trans, addr + trans->cfg->umac_prph_offset, return iwl_poll_prph_bit(trans, addr +
trans->cfg->trans.umac_prph_offset,
bits, mask, timeout); bits, mask, timeout);
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* GPL LICENSE SUMMARY * GPL LICENSE SUMMARY
* *
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* BSD LICENSE * BSD LICENSE
* *
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -115,9 +115,6 @@ enum iwl_uapsd_disable { ...@@ -115,9 +115,6 @@ enum iwl_uapsd_disable {
* @nvm_file: specifies a external NVM file * @nvm_file: specifies a external NVM file
* @uapsd_disable: disable U-APSD, see &enum iwl_uapsd_disable, default = * @uapsd_disable: disable U-APSD, see &enum iwl_uapsd_disable, default =
* IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT * IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT
* @d0i3_disable: disable d0i3, default = 1,
* @d0i3_timeout: time to wait after no refs are taken before
* entering D0i3 (in msecs)
* @lar_disable: disable LAR (regulatory), default = 0 * @lar_disable: disable LAR (regulatory), default = 0
* @fw_monitor: allow to use firmware monitor * @fw_monitor: allow to use firmware monitor
* @disable_11ac: disable VHT capabilities, default = false. * @disable_11ac: disable VHT capabilities, default = false.
...@@ -139,8 +136,6 @@ struct iwl_mod_params { ...@@ -139,8 +136,6 @@ struct iwl_mod_params {
int antenna_coupling; int antenna_coupling;
char *nvm_file; char *nvm_file;
u32 uapsd_disable; u32 uapsd_disable;
bool d0i3_disable;
unsigned int d0i3_timeout;
bool lar_disable; bool lar_disable;
bool fw_monitor; bool fw_monitor;
bool disable_11ac; bool disable_11ac;
......
...@@ -393,11 +393,12 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, ...@@ -393,11 +393,12 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
return n_channels; return n_channels;
} }
static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
struct iwl_nvm_data *data, struct iwl_nvm_data *data,
struct ieee80211_sta_vht_cap *vht_cap, struct ieee80211_sta_vht_cap *vht_cap,
u8 tx_chains, u8 rx_chains) u8 tx_chains, u8 rx_chains)
{ {
const struct iwl_cfg *cfg = trans->cfg;
int num_rx_ants = num_of_ant(rx_chains); int num_rx_ants = num_of_ant(rx_chains);
int num_tx_ants = num_of_ant(tx_chains); int num_tx_ants = num_of_ant(tx_chains);
unsigned int max_ampdu_exponent = (cfg->max_vht_ampdu_exponent ?: unsigned int max_ampdu_exponent = (cfg->max_vht_ampdu_exponent ?:
...@@ -434,14 +435,14 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, ...@@ -434,14 +435,14 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
switch (iwlwifi_mod_params.amsdu_size) { switch (iwlwifi_mod_params.amsdu_size) {
case IWL_AMSDU_DEF: case IWL_AMSDU_DEF:
if (cfg->mq_rx_supported) if (trans->trans_cfg->mq_rx_supported)
vht_cap->cap |= vht_cap->cap |=
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454; IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
else else
vht_cap->cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895; vht_cap->cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895;
break; break;
case IWL_AMSDU_2K: case IWL_AMSDU_2K:
if (cfg->mq_rx_supported) if (trans->trans_cfg->mq_rx_supported)
vht_cap->cap |= vht_cap->cap |=
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454; IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
else else
...@@ -669,11 +670,13 @@ static void iwl_init_he_hw_capab(struct ieee80211_supported_band *sband, ...@@ -669,11 +670,13 @@ static void iwl_init_he_hw_capab(struct ieee80211_supported_band *sband,
} }
} }
static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, static void iwl_init_sbands(struct iwl_trans *trans,
struct iwl_nvm_data *data, struct iwl_nvm_data *data,
const void *nvm_ch_flags, u8 tx_chains, const void *nvm_ch_flags, u8 tx_chains,
u8 rx_chains, u32 sbands_flags, bool v4) u8 rx_chains, u32 sbands_flags, bool v4)
{ {
struct device *dev = trans->dev;
const struct iwl_cfg *cfg = trans->cfg;
int n_channels; int n_channels;
int n_used = 0; int n_used = 0;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
...@@ -686,7 +689,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, ...@@ -686,7 +689,7 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
sband->n_bitrates = N_RATES_24; sband->n_bitrates = N_RATES_24;
n_used += iwl_init_sband_channels(data, sband, n_channels, n_used += iwl_init_sband_channels(data, sband, n_channels,
NL80211_BAND_2GHZ); NL80211_BAND_2GHZ);
iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ, iwl_init_ht_hw_capab(trans, data, &sband->ht_cap, NL80211_BAND_2GHZ,
tx_chains, rx_chains); tx_chains, rx_chains);
if (data->sku_cap_11ax_enable && !iwlwifi_mod_params.disable_11ax) if (data->sku_cap_11ax_enable && !iwlwifi_mod_params.disable_11ax)
...@@ -698,10 +701,10 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, ...@@ -698,10 +701,10 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
sband->n_bitrates = N_RATES_52; sband->n_bitrates = N_RATES_52;
n_used += iwl_init_sband_channels(data, sband, n_channels, n_used += iwl_init_sband_channels(data, sband, n_channels,
NL80211_BAND_5GHZ); NL80211_BAND_5GHZ);
iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ, iwl_init_ht_hw_capab(trans, data, &sband->ht_cap, NL80211_BAND_5GHZ,
tx_chains, rx_chains); tx_chains, rx_chains);
if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac) if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac)
iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap, iwl_init_vht_hw_capab(trans, data, &sband->vht_cap,
tx_chains, rx_chains); tx_chains, rx_chains);
if (data->sku_cap_11ax_enable && !iwlwifi_mod_params.disable_11ax) if (data->sku_cap_11ax_enable && !iwlwifi_mod_params.disable_11ax)
...@@ -793,10 +796,10 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans, ...@@ -793,10 +796,10 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans,
{ {
__le32 mac_addr0 = __le32 mac_addr0 =
cpu_to_le32(iwl_read32(trans, cpu_to_le32(iwl_read32(trans,
trans->cfg->csr->mac_addr0_strap)); trans->trans_cfg->csr->mac_addr0_strap));
__le32 mac_addr1 = __le32 mac_addr1 =
cpu_to_le32(iwl_read32(trans, cpu_to_le32(iwl_read32(trans,
trans->cfg->csr->mac_addr1_strap)); trans->trans_cfg->csr->mac_addr1_strap));
iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr); iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr);
/* /*
...@@ -807,9 +810,9 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans, ...@@ -807,9 +810,9 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans,
return; return;
mac_addr0 = cpu_to_le32(iwl_read32(trans, mac_addr0 = cpu_to_le32(iwl_read32(trans,
trans->cfg->csr->mac_addr0_otp)); trans->trans_cfg->csr->mac_addr0_otp));
mac_addr1 = cpu_to_le32(iwl_read32(trans, mac_addr1 = cpu_to_le32(iwl_read32(trans,
trans->cfg->csr->mac_addr1_otp)); trans->trans_cfg->csr->mac_addr1_otp));
iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr); iwl_flip_hw_address(mac_addr0, mac_addr1, data->hw_addr);
} }
...@@ -896,7 +899,7 @@ static int iwl_set_hw_address(struct iwl_trans *trans, ...@@ -896,7 +899,7 @@ static int iwl_set_hw_address(struct iwl_trans *trans,
} }
static bool static bool
iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg, iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg,
const __be16 *nvm_hw) const __be16 *nvm_hw)
{ {
/* /*
...@@ -908,7 +911,7 @@ iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg, ...@@ -908,7 +911,7 @@ iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg,
* in 5GHz otherwise the FW will throw a sysassert when we try * in 5GHz otherwise the FW will throw a sysassert when we try
* to use them. * to use them.
*/ */
if (cfg->device_family == IWL_DEVICE_FAMILY_7000) { if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
/* /*
* Unlike the other sections in the NVM, the hw * Unlike the other sections in the NVM, the hw
* section uses big-endian. * section uses big-endian.
...@@ -917,7 +920,7 @@ iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg, ...@@ -917,7 +920,7 @@ iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg,
u8 sku = (subsystem_id & 0x1e) >> 1; u8 sku = (subsystem_id & 0x1e) >> 1;
if (sku == 5 || sku == 9) { if (sku == 5 || sku == 9) {
IWL_DEBUG_EEPROM(dev, IWL_DEBUG_EEPROM(trans->dev,
"disabling wide channels in 5GHz (0x%0x %d)\n", "disabling wide channels in 5GHz (0x%0x %d)\n",
subsystem_id, sku); subsystem_id, sku);
return true; return true;
...@@ -934,7 +937,6 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, ...@@ -934,7 +937,6 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
const __le16 *mac_override, const __le16 *phy_sku, const __le16 *mac_override, const __le16 *phy_sku,
u8 tx_chains, u8 rx_chains, bool lar_fw_supported) u8 tx_chains, u8 rx_chains, bool lar_fw_supported)
{ {
struct device *dev = trans->dev;
struct iwl_nvm_data *data; struct iwl_nvm_data *data;
bool lar_enabled; bool lar_enabled;
u32 sku, radio_cfg; u32 sku, radio_cfg;
...@@ -942,7 +944,11 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, ...@@ -942,7 +944,11 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
u16 lar_config; u16 lar_config;
const __le16 *ch_section; const __le16 *ch_section;
if (cfg->nvm_type != IWL_NVM_EXT) if (cfg->uhb_supported)
data = kzalloc(struct_size(data, channels,
IWL_NVM_NUM_CHANNELS_UHB),
GFP_KERNEL);
else if (cfg->nvm_type != IWL_NVM_EXT)
data = kzalloc(struct_size(data, channels, data = kzalloc(struct_size(data, channels,
IWL_NVM_NUM_CHANNELS), IWL_NVM_NUM_CHANNELS),
GFP_KERNEL); GFP_KERNEL);
...@@ -1012,10 +1018,10 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, ...@@ -1012,10 +1018,10 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
if (lar_fw_supported && lar_enabled) if (lar_fw_supported && lar_enabled)
sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR; sbands_flags |= IWL_NVM_SBANDS_FLAGS_LAR;
if (iwl_nvm_no_wide_in_5ghz(dev, cfg, nvm_hw)) if (iwl_nvm_no_wide_in_5ghz(trans, cfg, nvm_hw))
sbands_flags |= IWL_NVM_SBANDS_FLAGS_NO_WIDE_IN_5GHZ; sbands_flags |= IWL_NVM_SBANDS_FLAGS_NO_WIDE_IN_5GHZ;
iwl_init_sbands(dev, cfg, data, ch_section, tx_chains, rx_chains, iwl_init_sbands(trans, data, ch_section, tx_chains, rx_chains,
sbands_flags, false); sbands_flags, false);
data->calib_version = 255; data->calib_version = 255;
...@@ -1066,11 +1072,6 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, ...@@ -1066,11 +1072,6 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
return flags; return flags;
} }
struct regdb_ptrs {
struct ieee80211_wmm_rule *rule;
u32 token;
};
struct ieee80211_regdomain * struct ieee80211_regdomain *
iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
int num_of_ch, __le32 *channels, u16 fw_mcc, int num_of_ch, __le32 *channels, u16 fw_mcc,
...@@ -1082,7 +1083,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, ...@@ -1082,7 +1083,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
const u16 *nvm_chan; const u16 *nvm_chan;
struct ieee80211_regdomain *regd, *copy_rd; struct ieee80211_regdomain *regd, *copy_rd;
struct ieee80211_reg_rule *rule; struct ieee80211_reg_rule *rule;
struct regdb_ptrs *regdb_ptrs;
enum nl80211_band band; enum nl80211_band band;
int center_freq, prev_center_freq = 0; int center_freq, prev_center_freq = 0;
int valid_rules = 0; int valid_rules = 0;
...@@ -1114,12 +1114,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, ...@@ -1114,12 +1114,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
if (!regd) if (!regd)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
regdb_ptrs = kcalloc(num_of_ch, sizeof(*regdb_ptrs), GFP_KERNEL);
if (!regdb_ptrs) {
copy_rd = ERR_PTR(-ENOMEM);
goto out;
}
/* set alpha2 from FW. */ /* set alpha2 from FW. */
regd->alpha2[0] = fw_mcc >> 8; regd->alpha2[0] = fw_mcc >> 8;
regd->alpha2[1] = fw_mcc & 0xff; regd->alpha2[1] = fw_mcc & 0xff;
...@@ -1191,8 +1185,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, ...@@ -1191,8 +1185,6 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
if (!copy_rd) if (!copy_rd)
copy_rd = ERR_PTR(-ENOMEM); copy_rd = ERR_PTR(-ENOMEM);
out:
kfree(regdb_ptrs);
kfree(regd); kfree(regd);
return copy_rd; return copy_rd;
} }
...@@ -1311,7 +1303,7 @@ int iwl_read_external_nvm(struct iwl_trans *trans, ...@@ -1311,7 +1303,7 @@ int iwl_read_external_nvm(struct iwl_trans *trans,
le32_to_cpu(dword_buff[3])); le32_to_cpu(dword_buff[3]));
/* nvm file validation, dword_buff[2] holds the file version */ /* nvm file validation, dword_buff[2] holds the file version */
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000 && if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_8000 &&
CSR_HW_REV_STEP(trans->hw_rev) == SILICON_C_STEP && CSR_HW_REV_STEP(trans->hw_rev) == SILICON_C_STEP &&
le32_to_cpu(dword_buff[2]) < 0xE4A) { le32_to_cpu(dword_buff[2]) < 0xE4A) {
ret = -EFAULT; ret = -EFAULT;
...@@ -1495,7 +1487,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans, ...@@ -1495,7 +1487,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
channel_profile = v4 ? (void *)rsp->regulatory.channel_profile : channel_profile = v4 ? (void *)rsp->regulatory.channel_profile :
(void *)rsp_v3->regulatory.channel_profile; (void *)rsp_v3->regulatory.channel_profile;
iwl_init_sbands(trans->dev, trans->cfg, nvm, iwl_init_sbands(trans, nvm,
channel_profile, channel_profile,
nvm->valid_tx_ant & fw->valid_tx_ant, nvm->valid_tx_ant & fw->valid_tx_ant,
nvm->valid_rx_ant & fw->valid_rx_ant, nvm->valid_rx_ant & fw->valid_rx_ant,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of version 2 of the GNU General Public License as
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation * Copyright(c) 2018 - 2019 Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -140,9 +140,6 @@ struct iwl_cfg; ...@@ -140,9 +140,6 @@ struct iwl_cfg;
* @nic_config: configure NIC, called before firmware is started. * @nic_config: configure NIC, called before firmware is started.
* May sleep * May sleep
* @wimax_active: invoked when WiMax becomes active. May sleep * @wimax_active: invoked when WiMax becomes active. May sleep
* @enter_d0i3: configure the fw to enter d0i3. return 1 to indicate d0i3
* entrance is aborted (e.g. due to held reference). May sleep.
* @exit_d0i3: configure the fw to exit d0i3. May sleep.
*/ */
struct iwl_op_mode_ops { struct iwl_op_mode_ops {
struct iwl_op_mode *(*start)(struct iwl_trans *trans, struct iwl_op_mode *(*start)(struct iwl_trans *trans,
...@@ -164,8 +161,6 @@ struct iwl_op_mode_ops { ...@@ -164,8 +161,6 @@ struct iwl_op_mode_ops {
void (*cmd_queue_full)(struct iwl_op_mode *op_mode); void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
void (*nic_config)(struct iwl_op_mode *op_mode); void (*nic_config)(struct iwl_op_mode *op_mode);
void (*wimax_active)(struct iwl_op_mode *op_mode); void (*wimax_active)(struct iwl_op_mode *op_mode);
int (*enter_d0i3)(struct iwl_op_mode *op_mode);
int (*exit_d0i3)(struct iwl_op_mode *op_mode);
}; };
int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops); int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops);
...@@ -258,22 +253,4 @@ static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode) ...@@ -258,22 +253,4 @@ static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode)
op_mode->ops->wimax_active(op_mode); op_mode->ops->wimax_active(op_mode);
} }
static inline int iwl_op_mode_enter_d0i3(struct iwl_op_mode *op_mode)
{
might_sleep();
if (!op_mode->ops->enter_d0i3)
return 0;
return op_mode->ops->enter_d0i3(op_mode);
}
static inline int iwl_op_mode_exit_d0i3(struct iwl_op_mode *op_mode)
{
might_sleep();
if (!op_mode->ops->exit_d0i3)
return 0;
return op_mode->ops->exit_d0i3(op_mode);
}
#endif /* __iwl_op_mode_h__ */ #endif /* __iwl_op_mode_h__ */
...@@ -451,6 +451,8 @@ enum { ...@@ -451,6 +451,8 @@ enum {
#define UREG_DOORBELL_TO_ISR6 0xA05C04 #define UREG_DOORBELL_TO_ISR6 0xA05C04
#define UREG_DOORBELL_TO_ISR6_NMI_BIT BIT(0) #define UREG_DOORBELL_TO_ISR6_NMI_BIT BIT(0)
#define UREG_DOORBELL_TO_ISR6_SUSPEND BIT(18)
#define UREG_DOORBELL_TO_ISR6_RESUME BIT(19)
#define FSEQ_ERROR_CODE 0xA340C8 #define FSEQ_ERROR_CODE 0xA340C8
#define FSEQ_TOP_INIT_VERSION 0xA34038 #define FSEQ_TOP_INIT_VERSION 0xA34038
...@@ -460,4 +462,7 @@ enum { ...@@ -460,4 +462,7 @@ enum {
#define FSEQ_ALIVE_TOKEN 0xA340F0 #define FSEQ_ALIVE_TOKEN 0xA340F0
#define FSEQ_CNVI_ID 0xA3408C #define FSEQ_CNVI_ID 0xA3408C
#define FSEQ_CNVR_ID 0xA34090 #define FSEQ_CNVR_ID 0xA34090
#define IWL_D3_SLEEP_STATUS_SUSPEND 0xD3
#define IWL_D3_SLEEP_STATUS_RESUME 0xD0
#endif /* __iwl_prph_h__ */ #endif /* __iwl_prph_h__ */
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
struct iwl_trans *iwl_trans_alloc(unsigned int priv_size, struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
struct device *dev, struct device *dev,
const struct iwl_cfg *cfg,
const struct iwl_trans_ops *ops) const struct iwl_trans_ops *ops)
{ {
struct iwl_trans *trans; struct iwl_trans *trans;
...@@ -84,7 +83,6 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size, ...@@ -84,7 +83,6 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
#endif #endif
trans->dev = dev; trans->dev = dev;
trans->cfg = cfg;
trans->ops = ops; trans->ops = ops;
trans->num_rx_queues = 1; trans->num_rx_queues = 1;
...@@ -202,17 +200,3 @@ int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans) ...@@ -202,17 +200,3 @@ int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans)
return 0; return 0;
} }
IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted); IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted);
void iwl_trans_ref(struct iwl_trans *trans)
{
if (trans->ops->ref)
trans->ops->ref(trans);
}
IWL_EXPORT_SYMBOL(iwl_trans_ref);
void iwl_trans_unref(struct iwl_trans *trans)
{
if (trans->ops->unref)
trans->ops->unref(trans);
}
IWL_EXPORT_SYMBOL(iwl_trans_unref);
...@@ -153,5 +153,6 @@ ...@@ -153,5 +153,6 @@
#define IWL_MVM_FTM_INITIATOR_DYNACK true #define IWL_MVM_FTM_INITIATOR_DYNACK true
#define IWL_MVM_D3_DEBUG false #define IWL_MVM_D3_DEBUG false
#define IWL_MVM_USE_TWT false #define IWL_MVM_USE_TWT false
#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA 10
#endif /* __MVM_CONSTANTS_H */ #endif /* __MVM_CONSTANTS_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment