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

Commit 1fe79d7f authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2017-08-18' of...

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

Third set of iwlwifi patches for 4.14

* Work for the upcoming A000 device family continues;
* Improvements in debugging;
* A couple of improvements in block-ack sessions;
* Some fixes for channel switch;
* A workaround for a HW data bug;
* Some FW API updates;
* General fixes and cleanups here and there.
parents 38ef6235 8fe34b06
Loading
Loading
Loading
Loading
+31 −3
Original line number Diff line number Diff line
@@ -76,13 +76,19 @@
#define IWL_A000_HR_FW_PRE	"iwlwifi-Qu-a0-hr-a0-"
#define IWL_A000_HR_CDB_FW_PRE	"iwlwifi-QuIcp-z0-hrcdb-a0-"
#define IWL_A000_HR_F0_FW_PRE	"iwlwifi-QuQnj-f0-hr-a0-"
#define IWL_A000_JF_B0_FW_PRE	"iwlwifi-QuQnj-a0-jf-b0-"
#define IWL_A000_HR_A0_FW_PRE	"iwlwifi-QuQnj-a0-hr-a0-"

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

#define NVM_HW_SECTION_NUM_FAMILY_A000		10

@@ -171,7 +177,7 @@ const struct iwl_cfg iwla000_2ax_cfg_hr = {
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

const struct iwl_cfg iwla000_2ax_cfg_qnj_hr = {
const struct iwl_cfg iwla000_2ax_cfg_qnj_hr_f0 = {
		.name = "Intel(R) Dual Band Wireless AX a000",
		.fw_name_pre = IWL_A000_HR_F0_FW_PRE,
		IWL_DEVICE_A000,
@@ -181,6 +187,28 @@ const struct iwl_cfg iwla000_2ax_cfg_qnj_hr = {
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

const struct iwl_cfg iwla000_2ax_cfg_qnj_jf_b0 = {
		.name = "Intel(R) Dual Band Wireless AX a000",
		.fw_name_pre = IWL_A000_JF_B0_FW_PRE,
		IWL_DEVICE_A000,
		.ht_params = &iwl_a000_ht_params,
		.nvm_ver = IWL_A000_NVM_VERSION,
		.nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

const struct iwl_cfg iwla000_2ax_cfg_qnj_hr_a0 = {
		.name = "Intel(R) Dual Band Wireless AX a000",
		.fw_name_pre = IWL_A000_HR_A0_FW_PRE,
		IWL_DEVICE_A000,
		.ht_params = &iwl_a000_ht_params,
		.nvm_ver = IWL_A000_NVM_VERSION,
		.nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

MODULE_FIRMWARE(IWL_A000_HR_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_JF_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_HR_QNJ_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_HR_F0_QNJ_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_JF_B0_QNJ_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
+37 −13
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ enum iwl_bt_coex_lut_type {
	BT_COEX_INVALID_LUT = 0xff,
}; /* BT_COEX_DECISION_LUT_INDEX_API_E_VER_1 */

#define BT_COEX_CORUN_LUT_SIZE (32)
#define BT_REDUCED_TX_POWER_BIT BIT(7)

enum iwl_bt_coex_mode {
@@ -106,18 +105,6 @@ struct iwl_bt_coex_cmd {
	__le32 enabled_modules;
} __packed; /* BT_COEX_CMD_API_S_VER_6 */

/**
 * struct iwl_bt_coex_corun_lut_update - bt coex update the corun lut
 * @corun_lut20: co-running 20 MHz LUT configuration
 * @corun_lut40: co-running 40 MHz LUT configuration
 *
 * The structure is used for the BT_COEX_UPDATE_CORUN_LUT command.
 */
struct iwl_bt_coex_corun_lut_update_cmd {
	__le32 corun_lut20[BT_COEX_CORUN_LUT_SIZE];
	__le32 corun_lut40[BT_COEX_CORUN_LUT_SIZE];
} __packed; /* BT_COEX_UPDATE_CORUN_LUT_API_S_VER_1 */

/**
 * struct iwl_bt_coex_reduced_txp_update_cmd
 * @reduced_txp: bit BT_REDUCED_TX_POWER_BIT to enable / disable, rest of the
@@ -191,6 +178,7 @@ enum iwl_bt_mxbox_dw3 {
	BT_MBOX(3, ACL_STATE, 3, 1),
	BT_MBOX(3, MSTR_STATE, 4, 1),
	BT_MBOX(3, OBX_STATE, 5, 1),
	BT_MBOX(3, A2DP_SRC, 6, 1),
	BT_MBOX(3, OPEN_CON_2, 8, 2),
	BT_MBOX(3, TRAFFIC_LOAD, 10, 2),
	BT_MBOX(3, CHL_SEQN_LSB, 12, 1),
@@ -200,10 +188,21 @@ enum iwl_bt_mxbox_dw3 {
	BT_MBOX(3, UPDATE_REQUEST, 21, 1),
};

enum iwl_bt_mxbox_dw4 {
	BT_MBOX(4, ATS_BT_INTERVAL, 0, 7),
	BT_MBOX(4, ATS_BT_ACTIVE_MAX_TH, 7, 7),
};

#define BT_MBOX_MSG(_notif, _num, _field)				     \
	((le32_to_cpu((_notif)->mbox_msg[(_num)]) & BT_MBOX##_num##_##_field)\
	>> BT_MBOX##_num##_##_field##_POS)

#define BT_MBOX_PRINT(_num, _field, _end)				    \
			pos += scnprintf(buf + pos, bufsz - pos,	    \
					 "\t%s: %d%s",			    \
					 #_field,			    \
					 BT_MBOX_MSG(notif, _num, _field),  \
					 true ? "\n" : ", ");
enum iwl_bt_activity_grading {
	BT_OFF			= 0,
	BT_ON_NO_CONNECTION	= 1,
@@ -233,6 +232,31 @@ enum iwl_bt_ci_compliance {
 * @reserved: reserved
 */
struct iwl_bt_coex_profile_notif {
	__le32 mbox_msg[8];
	__le32 msg_idx;
	__le32 bt_ci_compliance;

	__le32 primary_ch_lut;
	__le32 secondary_ch_lut;
	__le32 bt_activity_grading;
	u8 ttc_status;
	u8 rrc_status;
	__le16 reserved;
} __packed; /* BT_COEX_PROFILE_NTFY_API_S_VER_5 */

/**
 * struct iwl_bt_coex_profile_notif - notification about BT coex
 * @mbox_msg: message from BT to WiFi
 * @msg_idx: the index of the message
 * @bt_ci_compliance: enum %iwl_bt_ci_compliance
 * @primary_ch_lut: LUT used for primary channel &enum iwl_bt_coex_lut_type
 * @secondary_ch_lut: LUT used for secondary channel &enum iwl_bt_coex_lut_type
 * @bt_activity_grading: the activity of BT &enum iwl_bt_activity_grading
 * @ttc_status: is TTC enabled - one bit per PHY
 * @rrc_status: is RRC enabled - one bit per PHY
 * @reserved: reserved
 */
struct iwl_bt_coex_profile_notif_v4 {
	__le32 mbox_msg[4];
	__le32 msg_idx;
	__le32 bt_ci_compliance;
+0 −12
Original line number Diff line number Diff line
@@ -135,12 +135,6 @@ enum iwl_legacy_cmds {
	 */
	DBG_CFG = 0x9,

	/**
	 * @ANTENNA_COUPLING_NOTIFICATION:
	 * Antenna coupling data, &struct iwl_mvm_antenna_coupling_notif
	 */
	ANTENNA_COUPLING_NOTIFICATION = 0xa,

	/**
	 * @SCAN_ITERATION_COMPLETE_UMAC:
	 * Firmware indicates a scan iteration completed, using
@@ -523,12 +517,6 @@ enum iwl_legacy_cmds {
	 */
	BT_CONFIG = 0x9b,

	/**
	 * @BT_COEX_UPDATE_CORUN_LUT:
	 * &struct iwl_bt_coex_corun_lut_update_cmd
	 */
	BT_COEX_UPDATE_CORUN_LUT = 0x5b,

	/**
	 * @BT_COEX_UPDATE_REDUCED_TXP:
	 * &struct iwl_bt_coex_reduced_txp_update_cmd
+0 −8
Original line number Diff line number Diff line
@@ -181,12 +181,4 @@ struct iwl_dc2dc_config_resp {
	__le32 dc2dc_freq_tune1;
} __packed; /* DC2DC_CONFIG_RESP_API_S_VER_1 */

/**
 * struct iwl_mvm_antenna_coupling_notif - antenna coupling notification
 * @isolation: antenna isolation value
 */
struct iwl_mvm_antenna_coupling_notif {
	__le32 isolation;
} __packed;

#endif /* __iwl_fw_api_config_h__ */
+3 −6
Original line number Diff line number Diff line
@@ -409,7 +409,8 @@ enum iwl_tx_status {
 * @AGG_TX_STATE_BT_PRIO:
 * @AGG_TX_STATE_FEW_BYTES:
 * @AGG_TX_STATE_ABORT:
 * @AGG_TX_STATE_LAST_SENT_TTL:
 * @AGG_TX_STATE_TX_ON_AIR_DROP: TX_ON_AIR signal drop without underrun or
 *	BT detection
 * @AGG_TX_STATE_LAST_SENT_TRY_CNT:
 * @AGG_TX_STATE_LAST_SENT_BT_KILL:
 * @AGG_TX_STATE_SCD_QUERY:
@@ -433,7 +434,7 @@ enum iwl_tx_agg_status {
	AGG_TX_STATE_BT_PRIO = 0x002,
	AGG_TX_STATE_FEW_BYTES = 0x004,
	AGG_TX_STATE_ABORT = 0x008,
	AGG_TX_STATE_LAST_SENT_TTL = 0x010,
	AGG_TX_STATE_TX_ON_AIR_DROP = 0x010,
	AGG_TX_STATE_LAST_SENT_TRY_CNT = 0x020,
	AGG_TX_STATE_LAST_SENT_BT_KILL = 0x040,
	AGG_TX_STATE_SCD_QUERY = 0x080,
@@ -445,10 +446,6 @@ enum iwl_tx_agg_status {
	AGG_TX_STATE_TRY_CNT_MSK = 0xf << AGG_TX_STATE_TRY_CNT_POS,
};

#define AGG_TX_STATE_LAST_SENT_MSK  (AGG_TX_STATE_LAST_SENT_TTL| \
				     AGG_TX_STATE_LAST_SENT_TRY_CNT| \
				     AGG_TX_STATE_LAST_SENT_BT_KILL)

/*
 * The mask below describes a status where we are absolutely sure that the MPDU
 * wasn't sent. For BA/Underrun we cannot be that sure. All we know that we've
Loading