Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83368904 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of...

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

First batch of iwlwifi driver patches 4.13

* Loads of FW API documentation improvements (for tools and htmldoc);
* Continued work for the new A000 family;
* Bumped the maximum supported FW API to 31;
* Improve the differentiation between 8000, 9000 and A000 families;
* A lot of fixes and cleanups here and there;

kvalo: There were conflicts iwl_mvm_stop_device() and
iwl_mvm_tcool_set_cur_state(). The former was easy but latter needed more
thought. Apparently the mutex was taken too late, so I fixed so that the mutex
is taken first and then check for iwl_mvm_firmware_running().
parents 63a2f310 0ae0bb3f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@
#include "iwl-agn-hw.h"

/* Highest firmware API version supported */
#define IWL8000_UCODE_API_MAX	30
#define IWL8265_UCODE_API_MAX	30
#define IWL8000_UCODE_API_MAX	31
#define IWL8265_UCODE_API_MAX	31

/* Lowest firmware API version supported */
#define IWL8000_UCODE_API_MIN	22
@@ -98,7 +98,6 @@
	IWL8265_FW_PRE __stringify(api) ".ucode"

#define NVM_HW_SECTION_NUM_FAMILY_8000		10
#define DEFAULT_NVM_FILE_FAMILY_8000B		"nvmData-8000B"
#define DEFAULT_NVM_FILE_FAMILY_8000C		"nvmData-8000C"

/* Max SDIO RX/TX aggregation sizes of the ADDBA request/response */
@@ -162,10 +161,11 @@ static const struct iwl_tt_params iwl8000_tt_params = {
	.dccm2_len = IWL8260_DCCM2_LEN,					\
	.smem_offset = IWL8260_SMEM_OFFSET,				\
	.smem_len = IWL8260_SMEM_LEN,					\
	.default_nvm_file_B_step = DEFAULT_NVM_FILE_FAMILY_8000B,	\
	.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,	\
	.thermal_params = &iwl8000_tt_params,				\
	.apmg_not_supported = true
	.apmg_not_supported = true,					\
	.ext_nvm = true,						\
	.dbgc_supported = true

#define IWL_DEVICE_8000							\
	IWL_DEVICE_8000_COMMON,						\
+11 −3
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#include "iwl-agn-hw.h"

/* Highest firmware API version supported */
#define IWL9000_UCODE_API_MAX	30
#define IWL9000_UCODE_API_MAX	31

/* Lowest firmware API version supported */
#define IWL9000_UCODE_API_MIN	30
@@ -73,10 +73,13 @@
#define IWL9000_SMEM_LEN		0x68000

#define  IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"
#define  IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-"
#define  IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-"
#define  IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"
#define IWL9000_MODULE_FIRMWARE(api) \
	IWL9000_FW_PRE "-" __stringify(api) ".ucode"
#define IWL9000RFB_MODULE_FIRMWARE(api) \
	IWL9000RFB_FW_PRE "-" __stringify(api) ".ucode"
#define IWL9260A_MODULE_FIRMWARE(api) \
	IWL9260A_FW_PRE "-" __stringify(api) ".ucode"
#define IWL9260B_MODULE_FIRMWARE(api) \
@@ -125,7 +128,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
#define IWL_DEVICE_9000							\
	.ucode_api_max = IWL9000_UCODE_API_MAX,				\
	.ucode_api_min = IWL9000_UCODE_API_MIN,				\
	.device_family = IWL_DEVICE_FAMILY_8000,			\
	.device_family = IWL_DEVICE_FAMILY_9000,			\
	.max_inst_size = IWL60_RTC_INST_SIZE,				\
	.max_data_size = IWL60_RTC_DATA_SIZE,				\
	.base_params = &iwl9000_base_params,				\
@@ -144,7 +147,9 @@ static const struct iwl_tt_params iwl9000_tt_params = {
	.mq_rx_supported = true,					\
	.vht_mu_mimo_supported = true,					\
	.mac_addr_from_csr = true,					\
	.rf_id = true
	.rf_id = true,							\
	.ext_nvm = true,						\
	.dbgc_supported = true

const struct iwl_cfg iwl9160_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9160",
@@ -182,6 +187,7 @@ const struct iwl_cfg iwl9270_2ac_cfg = {
const struct iwl_cfg iwl9460_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9460",
	.fw_name_pre = IWL9000_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -193,6 +199,7 @@ const struct iwl_cfg iwl9460_2ac_cfg = {
const struct iwl_cfg iwl9560_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9560",
	.fw_name_pre = IWL9000_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -202,5 +209,6 @@ const struct iwl_cfg iwl9560_2ac_cfg = {
};

MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9000RFB_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9260A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
+5 −3
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#include "iwl-agn-hw.h"

/* Highest firmware API version supported */
#define IWL_A000_UCODE_API_MAX	30
#define IWL_A000_UCODE_API_MAX	31

/* Lowest firmware API version supported */
#define IWL_A000_UCODE_API_MIN	24
@@ -103,7 +103,7 @@ static const struct iwl_ht_params iwl_a000_ht_params = {
#define IWL_DEVICE_A000							\
	.ucode_api_max = IWL_A000_UCODE_API_MAX,			\
	.ucode_api_min = IWL_A000_UCODE_API_MIN,			\
	.device_family = IWL_DEVICE_FAMILY_8000,			\
	.device_family = IWL_DEVICE_FAMILY_A000,			\
	.max_inst_size = IWL60_RTC_INST_SIZE,				\
	.max_data_size = IWL60_RTC_DATA_SIZE,				\
	.base_params = &iwl_a000_base_params,				\
@@ -123,7 +123,9 @@ static const struct iwl_ht_params iwl_a000_ht_params = {
	.mac_addr_from_csr = true,					\
	.use_tfh = true,						\
	.rf_id = true,							\
	.gen2 = true
	.gen2 = true,							\
	.ext_nvm = true,						\
	.dbgc_supported = true

const struct iwl_cfg iwla000_2ac_cfg_hr = {
		.name = "Intel(R) Dual Band Wireless AC a000",
+9 −2
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ enum iwl_device_family {
	IWL_DEVICE_FAMILY_6150,
	IWL_DEVICE_FAMILY_7000,
	IWL_DEVICE_FAMILY_8000,
	IWL_DEVICE_FAMILY_9000,
	IWL_DEVICE_FAMILY_A000,
};

/*
@@ -275,6 +277,8 @@ struct iwl_pwr_tx_backoff {
 *	filename is constructed as fw_name_pre<api>.ucode.
 * @fw_name_pre_next_step: same as @fw_name_pre, only for next step
 *	(if supported)
 * @fw_name_pre_rf_next_step: same as @fw_name_pre_next_step, only for rf next
 *	step. Supported only in integrated solutions.
 * @ucode_api_max: Highest version of uCode API supported by driver.
 * @ucode_api_min: Lowest version of uCode API supported by driver.
 * @max_inst_size: The maximal length of the fw inst section
@@ -315,6 +319,7 @@ struct iwl_pwr_tx_backoff {
 * @integrated: discrete or integrated
 * @gen2: a000 and on transport operation
 * @cdb: CDB support
 * @ext_nvm: extended NVM format
 *
 * We enable the driver to be backward compatible wrt. hardware features.
 * API differences in uCode shouldn't be handled here but through TLVs
@@ -325,13 +330,13 @@ struct iwl_cfg {
	const char *name;
	const char *fw_name_pre;
	const char *fw_name_pre_next_step;
	const char *fw_name_pre_rf_next_step;
	/* params not likely to change within a device family */
	const struct iwl_base_params *base_params;
	/* params likely to change within a device family */
	const struct iwl_ht_params *ht_params;
	const struct iwl_eeprom_params *eeprom_params;
	const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
	const char *default_nvm_file_B_step;
	const char *default_nvm_file_C_step;
	const struct iwl_tt_params *thermal_params;
	enum iwl_device_family device_family;
@@ -362,7 +367,9 @@ struct iwl_cfg {
	    integrated:1,
	    use_tfh:1,
	    gen2:1,
	    cdb:1;
	    cdb:1,
	    ext_nvm:1,
	    dbgc_supported:1;
	u8 valid_tx_ant;
	u8 valid_rx_ant;
	u8 non_shared_ant;
+7 −1
Original line number Diff line number Diff line
@@ -316,6 +316,11 @@
#define CSR_HW_REV_DASH(_val)          (((_val) & 0x0000003) >> 0)
#define CSR_HW_REV_STEP(_val)          (((_val) & 0x000000C) >> 2)

/* HW RFID */
#define CSR_HW_RFID_FLAVOR(_val)       (((_val) & 0x000000F) >> 0)
#define CSR_HW_RFID_DASH(_val)         (((_val) & 0x00000F0) >> 4)
#define CSR_HW_RFID_STEP(_val)         (((_val) & 0x0000F00) >> 8)
#define CSR_HW_RFID_TYPE(_val)         (((_val) & 0x0FFF000) >> 12)

/**
 *  hw_rev values
@@ -348,7 +353,8 @@ enum {

/* RF_ID value */
#define CSR_HW_RF_ID_TYPE_JF		(0x00105000)
#define CSR_HW_RF_ID_TYPE_HR		(0x00109000)
#define CSR_HW_RF_ID_TYPE_HR		(0x0010A000)
#define CSR_HW_RF_ID_TYPE_HRCDB		(0x00109000)

/* EEPROM REG */
#define CSR_EEPROM_REG_READ_VALID_MSK	(0x00000001)
Loading