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

Commit 1514f6fc authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-for-kalle-2017-11-19' of...

Merge tag 'iwlwifi-for-kalle-2017-11-19' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

iwlwifi: first set of fixes for 4.15

* Support new FW API version of scan cmd (used in FW version 34);
* Add a bunch of PCI IDs and fix configuration structs for A000
  devices;
* Fix the exported firmware name strings for 9000 and A000 devices;
parents 32a72bbd c2c48ddf
Loading
Loading
Loading
Loading
+65 −8
Original line number Original line Diff line number Diff line
@@ -72,18 +72,21 @@
#define IWL9000_SMEM_OFFSET		0x400000
#define IWL9000_SMEM_OFFSET		0x400000
#define IWL9000_SMEM_LEN		0x68000
#define IWL9000_SMEM_LEN		0x68000


#define  IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"
#define  IWL9000A_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"
#define  IWL9000B_FW_PRE "iwlwifi-9000-pu-b0-jf-b0-"
#define  IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-"
#define  IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-"
#define  IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-"
#define  IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-"
#define  IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"
#define  IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"
#define IWL9000_MODULE_FIRMWARE(api) \
#define IWL9000A_MODULE_FIRMWARE(api) \
	IWL9000_FW_PRE "-" __stringify(api) ".ucode"
	IWL9000A_FW_PRE __stringify(api) ".ucode"
#define IWL9000B_MODULE_FIRMWARE(api) \
	IWL9000B_FW_PRE __stringify(api) ".ucode"
#define IWL9000RFB_MODULE_FIRMWARE(api) \
#define IWL9000RFB_MODULE_FIRMWARE(api) \
	IWL9000RFB_FW_PRE "-" __stringify(api) ".ucode"
	IWL9000RFB_FW_PRE __stringify(api) ".ucode"
#define IWL9260A_MODULE_FIRMWARE(api) \
#define IWL9260A_MODULE_FIRMWARE(api) \
	IWL9260A_FW_PRE "-" __stringify(api) ".ucode"
	IWL9260A_FW_PRE __stringify(api) ".ucode"
#define IWL9260B_MODULE_FIRMWARE(api) \
#define IWL9260B_MODULE_FIRMWARE(api) \
	IWL9260B_FW_PRE "-" __stringify(api) ".ucode"
	IWL9260B_FW_PRE __stringify(api) ".ucode"


#define NVM_HW_SECTION_NUM_FAMILY_9000		10
#define NVM_HW_SECTION_NUM_FAMILY_9000		10


@@ -194,7 +197,48 @@ const struct iwl_cfg iwl9460_2ac_cfg = {
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

const struct iwl_cfg iwl9460_2ac_cfg_soc = {
	.name = "Intel(R) Dual Band Wireless AC 9460",
	.fw_name_pre = IWL9000A_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
	.integrated = true,
	.integrated = true,
	.soc_latency = 5000,
};

const struct iwl_cfg iwl9461_2ac_cfg_soc = {
		.name = "Intel(R) Dual Band Wireless AC 9461",
		.fw_name_pre = IWL9000A_FW_PRE,
		.fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
		.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
		IWL_DEVICE_9000,
		.ht_params = &iwl9000_ht_params,
		.nvm_ver = IWL9000_NVM_VERSION,
		.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
		.integrated = true,
		.soc_latency = 5000,
};

const struct iwl_cfg iwl9462_2ac_cfg_soc = {
		.name = "Intel(R) Dual Band Wireless AC 9462",
		.fw_name_pre = IWL9000A_FW_PRE,
		.fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
		.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
		IWL_DEVICE_9000,
		.ht_params = &iwl9000_ht_params,
		.nvm_ver = IWL9000_NVM_VERSION,
		.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
		.integrated = true,
		.soc_latency = 5000,
};
};


const struct iwl_cfg iwl9560_2ac_cfg = {
const struct iwl_cfg iwl9560_2ac_cfg = {
@@ -206,10 +250,23 @@ const struct iwl_cfg iwl9560_2ac_cfg = {
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
	.integrated = true,
};
};


MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
const struct iwl_cfg iwl9560_2ac_cfg_soc = {
	.name = "Intel(R) Dual Band Wireless AC 9560",
	.fw_name_pre = IWL9000A_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_calib_ver = IWL9000_TX_POWER_VERSION,
	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
	.integrated = true,
	.soc_latency = 5000,
};
MODULE_FIRMWARE(IWL9000A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9000B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9000RFB_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(IWL9260A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
+5 −5
Original line number Original line Diff line number Diff line
@@ -80,15 +80,15 @@
#define IWL_A000_HR_A0_FW_PRE	"iwlwifi-QuQnj-a0-hr-a0-"
#define IWL_A000_HR_A0_FW_PRE	"iwlwifi-QuQnj-a0-hr-a0-"


#define IWL_A000_HR_MODULE_FIRMWARE(api) \
#define IWL_A000_HR_MODULE_FIRMWARE(api) \
	IWL_A000_HR_FW_PRE "-" __stringify(api) ".ucode"
	IWL_A000_HR_FW_PRE __stringify(api) ".ucode"
#define IWL_A000_JF_MODULE_FIRMWARE(api) \
#define IWL_A000_JF_MODULE_FIRMWARE(api) \
	IWL_A000_JF_FW_PRE "-" __stringify(api) ".ucode"
	IWL_A000_JF_FW_PRE __stringify(api) ".ucode"
#define IWL_A000_HR_F0_QNJ_MODULE_FIRMWARE(api) \
#define IWL_A000_HR_F0_QNJ_MODULE_FIRMWARE(api) \
	IWL_A000_HR_F0_FW_PRE "-" __stringify(api) ".ucode"
	IWL_A000_HR_F0_FW_PRE __stringify(api) ".ucode"
#define IWL_A000_JF_B0_QNJ_MODULE_FIRMWARE(api) \
#define IWL_A000_JF_B0_QNJ_MODULE_FIRMWARE(api) \
	IWL_A000_JF_B0_FW_PRE "-" __stringify(api) ".ucode"
	IWL_A000_JF_B0_FW_PRE __stringify(api) ".ucode"
#define IWL_A000_HR_A0_QNJ_MODULE_FIRMWARE(api) \
#define IWL_A000_HR_A0_QNJ_MODULE_FIRMWARE(api) \
	IWL_A000_HR_A0_FW_PRE "-" __stringify(api) ".ucode"
	IWL_A000_HR_A0_FW_PRE __stringify(api) ".ucode"


#define NVM_HW_SECTION_NUM_FAMILY_A000		10
#define NVM_HW_SECTION_NUM_FAMILY_A000		10


+46 −13
Original line number Original line Diff line number Diff line
@@ -531,6 +531,8 @@ struct iwl_scan_config_v1 {
} __packed; /* SCAN_CONFIG_DB_CMD_API_S */
} __packed; /* SCAN_CONFIG_DB_CMD_API_S */


#define SCAN_TWO_LMACS 2
#define SCAN_TWO_LMACS 2
#define SCAN_LB_LMAC_IDX 0
#define SCAN_HB_LMAC_IDX 1


struct iwl_scan_config {
struct iwl_scan_config {
	__le32 flags;
	__le32 flags;
@@ -578,6 +580,7 @@ enum iwl_umac_scan_general_flags {
	IWL_UMAC_SCAN_GEN_FLAGS_MATCH			= BIT(9),
	IWL_UMAC_SCAN_GEN_FLAGS_MATCH			= BIT(9),
	IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL		= BIT(10),
	IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL		= BIT(10),
	IWL_UMAC_SCAN_GEN_FLAGS_LMAC2_FRAGMENTED	= BIT(11),
	IWL_UMAC_SCAN_GEN_FLAGS_LMAC2_FRAGMENTED	= BIT(11),
	IWL_UMAC_SCAN_GEN_FLAGS_ADAPTIVE_DWELL		= BIT(13),
};
};


/**
/**
@@ -631,12 +634,17 @@ struct iwl_scan_req_umac_tail {
 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
 * @ooc_priority: out of channel priority - &enum iwl_scan_priority
 * @ooc_priority: out of channel priority - &enum iwl_scan_priority
 * @general_flags: &enum iwl_umac_scan_general_flags
 * @general_flags: &enum iwl_umac_scan_general_flags
 * @reserved2: for future use and alignment
 * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
 * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
 * @extended_dwell: dwell time for channels 1, 6 and 11
 * @extended_dwell: dwell time for channels 1, 6 and 11
 * @active_dwell: dwell time for active scan
 * @active_dwell: dwell time for active scan
 * @passive_dwell: dwell time for passive scan
 * @passive_dwell: dwell time for passive scan
 * @fragmented_dwell: dwell time for fragmented passive scan
 * @fragmented_dwell: dwell time for fragmented passive scan
 * @adwell_default_n_aps: for adaptive dwell the default number of APs
 *	per channel
 * @adwell_default_n_aps_social: for adaptive dwell the default
 *	number of APs per social (1,6,11) channel
 * @adwell_max_budget: for adaptive dwell the maximal budget of TU to be added
 *	to total scan time
 * @max_out_time: max out of serving channel time, per LMAC - for CDB there
 * @max_out_time: max out of serving channel time, per LMAC - for CDB there
 *	are 2 LMACs
 *	are 2 LMACs
 * @suspend_time: max suspend time, per LMAC - for CDB there are 2 LMACs
 * @suspend_time: max suspend time, per LMAC - for CDB there are 2 LMACs
@@ -644,6 +652,8 @@ struct iwl_scan_req_umac_tail {
 * @channel_flags: &enum iwl_scan_channel_flags
 * @channel_flags: &enum iwl_scan_channel_flags
 * @n_channels: num of channels in scan request
 * @n_channels: num of channels in scan request
 * @reserved: for future use and alignment
 * @reserved: for future use and alignment
 * @reserved2: for future use and alignment
 * @reserved3: for future use and alignment
 * @data: &struct iwl_scan_channel_cfg_umac and
 * @data: &struct iwl_scan_channel_cfg_umac and
 *	&struct iwl_scan_req_umac_tail
 *	&struct iwl_scan_req_umac_tail
 */
 */
@@ -651,41 +661,64 @@ struct iwl_scan_req_umac {
	__le32 flags;
	__le32 flags;
	__le32 uid;
	__le32 uid;
	__le32 ooc_priority;
	__le32 ooc_priority;
	/* SCAN_GENERAL_PARAMS_API_S_VER_4 */
	__le16 general_flags;
	__le16 general_flags;
	u8 reserved2;
	u8 reserved;
	u8 scan_start_mac_id;
	u8 scan_start_mac_id;
	union {
		struct {
			u8 extended_dwell;
			u8 extended_dwell;
			u8 active_dwell;
			u8 active_dwell;
			u8 passive_dwell;
			u8 passive_dwell;
			u8 fragmented_dwell;
			u8 fragmented_dwell;
	union {
		struct {
			__le32 max_out_time;
			__le32 max_out_time;
			__le32 suspend_time;
			__le32 suspend_time;
			__le32 scan_priority;
			__le32 scan_priority;
			/* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
			/* SCAN_CHANNEL_PARAMS_API_S_VER_1 */
			u8 channel_flags;
			u8 channel_flags;
			u8 n_channels;
			u8 n_channels;
			__le16 reserved;
			__le16 reserved2;
			u8 data[];
			u8 data[];
		} v1; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
		} v1; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
		struct {
		struct {
			u8 extended_dwell;
			u8 active_dwell;
			u8 passive_dwell;
			u8 fragmented_dwell;
			__le32 max_out_time[SCAN_TWO_LMACS];
			__le32 max_out_time[SCAN_TWO_LMACS];
			__le32 suspend_time[SCAN_TWO_LMACS];
			__le32 suspend_time[SCAN_TWO_LMACS];
			__le32 scan_priority;
			__le32 scan_priority;
			/* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
			/* SCAN_CHANNEL_PARAMS_API_S_VER_1 */
			u8 channel_flags;
			u8 channel_flags;
			u8 n_channels;
			u8 n_channels;
			__le16 reserved;
			__le16 reserved2;
			u8 data[];
			u8 data[];
		} v6; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_6 */
		} v6; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_6 */
		struct {
			u8 active_dwell;
			u8 passive_dwell;
			u8 fragmented_dwell;
			u8 adwell_default_n_aps;
			u8 adwell_default_n_aps_social;
			u8 reserved3;
			__le16 adwell_max_budget;
			__le32 max_out_time[SCAN_TWO_LMACS];
			__le32 suspend_time[SCAN_TWO_LMACS];
			__le32 scan_priority;
			/* SCAN_CHANNEL_PARAMS_API_S_VER_1 */
			u8 channel_flags;
			u8 n_channels;
			__le16 reserved2;
			u8 data[];
		} v7; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_7 */
	};
	};
} __packed;
} __packed;


#define IWL_SCAN_REQ_UMAC_SIZE sizeof(struct iwl_scan_req_umac)
#define IWL_SCAN_REQ_UMAC_SIZE_V7 sizeof(struct iwl_scan_req_umac)
#define IWL_SCAN_REQ_UMAC_SIZE_V6 (sizeof(struct iwl_scan_req_umac) - \
				   2 * sizeof(u8) - sizeof(__le16))
#define IWL_SCAN_REQ_UMAC_SIZE_V1 (sizeof(struct iwl_scan_req_umac) - \
#define IWL_SCAN_REQ_UMAC_SIZE_V1 (sizeof(struct iwl_scan_req_umac) - \
				   2 * sizeof(__le32))
				   2 * sizeof(__le32) - 2 * sizeof(u8) - \
				   sizeof(__le16))


/**
/**
 * struct iwl_umac_scan_abort
 * struct iwl_umac_scan_abort
+1 −0
Original line number Original line Diff line number Diff line
@@ -264,6 +264,7 @@ enum iwl_ucode_tlv_api {
	IWL_UCODE_TLV_API_STA_TYPE		= (__force iwl_ucode_tlv_api_t)30,
	IWL_UCODE_TLV_API_STA_TYPE		= (__force iwl_ucode_tlv_api_t)30,
	IWL_UCODE_TLV_API_NAN2_VER2		= (__force iwl_ucode_tlv_api_t)31,
	IWL_UCODE_TLV_API_NAN2_VER2		= (__force iwl_ucode_tlv_api_t)31,
	/* API Set 1 */
	/* API Set 1 */
	IWL_UCODE_TLV_API_ADAPTIVE_DWELL	= (__force iwl_ucode_tlv_api_t)32,
	IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE	= (__force iwl_ucode_tlv_api_t)34,
	IWL_UCODE_TLV_API_NEW_BEACON_TEMPLATE	= (__force iwl_ucode_tlv_api_t)34,
	IWL_UCODE_TLV_API_NEW_RX_STATS		= (__force iwl_ucode_tlv_api_t)35,
	IWL_UCODE_TLV_API_NEW_RX_STATS		= (__force iwl_ucode_tlv_api_t)35,
	IWL_UCODE_TLV_API_COEX_ATS_EXTERNAL	= (__force iwl_ucode_tlv_api_t)37,
	IWL_UCODE_TLV_API_COEX_ATS_EXTERNAL	= (__force iwl_ucode_tlv_api_t)37,
+5 −0
Original line number Original line Diff line number Diff line
@@ -366,6 +366,7 @@ struct iwl_cfg {
	u32 dccm2_len;
	u32 dccm2_len;
	u32 smem_offset;
	u32 smem_offset;
	u32 smem_len;
	u32 smem_len;
	u32 soc_latency;
	u16 nvm_ver;
	u16 nvm_ver;
	u16 nvm_calib_ver;
	u16 nvm_calib_ver;
	u16 rx_with_siso_diversity:1,
	u16 rx_with_siso_diversity:1,
@@ -472,6 +473,10 @@ extern const struct iwl_cfg iwl9260_2ac_cfg;
extern const struct iwl_cfg iwl9270_2ac_cfg;
extern const struct iwl_cfg iwl9270_2ac_cfg;
extern const struct iwl_cfg iwl9460_2ac_cfg;
extern const struct iwl_cfg iwl9460_2ac_cfg;
extern const struct iwl_cfg iwl9560_2ac_cfg;
extern const struct iwl_cfg iwl9560_2ac_cfg;
extern const struct iwl_cfg iwl9460_2ac_cfg_soc;
extern const struct iwl_cfg iwl9461_2ac_cfg_soc;
extern const struct iwl_cfg iwl9462_2ac_cfg_soc;
extern const struct iwl_cfg iwl9560_2ac_cfg_soc;
extern const struct iwl_cfg iwla000_2ac_cfg_hr;
extern const struct iwl_cfg iwla000_2ac_cfg_hr;
extern const struct iwl_cfg iwla000_2ac_cfg_hr_cdb;
extern const struct iwl_cfg iwla000_2ac_cfg_hr_cdb;
extern const struct iwl_cfg iwla000_2ac_cfg_jf;
extern const struct iwl_cfg iwla000_2ac_cfg_jf;
Loading