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

Commit 4837696f authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-for-kalle-2019-03-22' of...

Merge tag 'iwlwifi-for-kalle-2019-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

First batch of iwlwifi fixes intended for v5.1

* add some new PCI IDs (plus a struct name change they depend on);
* fix crypto with new devices, namely 22560 and above;
* a bunch of fixes (and a dependency) for the new debugging infra;
parents 22bdf7d4 972d8e13
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -235,8 +235,8 @@ const struct iwl_cfg iwl_ax101_cfg_qu_hr = {
	.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
};

const struct iwl_cfg iwl22260_2ax_cfg = {
	.name = "Intel(R) Wireless-AX 22260",
const struct iwl_cfg iwl_ax200_cfg_cc = {
	.name = "Intel(R) Wi-Fi 6 AX200 160MHz",
	.fw_name_pre = IWL_CC_A_FW_PRE,
	IWL_DEVICE_22500,
	/*
@@ -249,7 +249,7 @@ const struct iwl_cfg iwl22260_2ax_cfg = {
};

const struct iwl_cfg killer1650x_2ax_cfg = {
	.name = "Killer(R) Wireless-AX 1650x Wireless Network Adapter (200NGW)",
	.name = "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)",
	.fw_name_pre = IWL_CC_A_FW_PRE,
	IWL_DEVICE_22500,
	/*
@@ -262,7 +262,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
};

const struct iwl_cfg killer1650w_2ax_cfg = {
	.name = "Killer(R) Wireless-AX 1650w Wireless Network Adapter (200D2W)",
	.name = "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)",
	.fw_name_pre = IWL_CC_A_FW_PRE,
	IWL_DEVICE_22500,
	/*
@@ -328,7 +328,7 @@ const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0 = {
};

const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
	.name = "Killer(R) Wireless-AX 1650i Wireless Network Adapter (22560NGW)",
	.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
	.fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
	IWL_DEVICE_22500,
	/*
@@ -340,7 +340,7 @@ const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
};

const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
	.name = "Killer(R) Wireless-AX 1650s Wireless Network Adapter (22560D2W)",
	.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
	.fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
	IWL_DEVICE_22500,
	/*
+8 −26
Original line number Diff line number Diff line
@@ -1614,6 +1614,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
	if (!range) {
		IWL_ERR(fwrt, "Failed to fill region header: id=%d, type=%d\n",
			le32_to_cpu(reg->region_id), type);
		memset(*data, 0, le32_to_cpu((*data)->len));
		return;
	}

@@ -1623,6 +1624,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
		if (range_size < 0) {
			IWL_ERR(fwrt, "Failed to dump region: id=%d, type=%d\n",
				le32_to_cpu(reg->region_id), type);
			memset(*data, 0, le32_to_cpu((*data)->len));
			return;
		}
		range = range + range_size;
@@ -1807,12 +1809,12 @@ _iwl_fw_error_ini_dump(struct iwl_fw_runtime *fwrt,

	trigger = fwrt->dump.active_trigs[id].trig;

	size = sizeof(*dump_file);
	size += iwl_fw_ini_get_trigger_len(fwrt, trigger);

	size = iwl_fw_ini_get_trigger_len(fwrt, trigger);
	if (!size)
		return NULL;

	size += sizeof(*dump_file);

	dump_file = vzalloc(size);
	if (!dump_file)
		return NULL;
@@ -1942,14 +1944,10 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
	iwl_dump_error_desc->len = 0;

	ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, false, 0);
	if (ret) {
	if (ret)
		kfree(iwl_dump_error_desc);
	} else {
		set_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status);

		/* trigger nmi to halt the fw */
		iwl_force_nmi(fwrt->trans);
	}
	else
		iwl_trans_sync_nmi(fwrt->trans);

	return ret;
}
@@ -2489,22 +2487,6 @@ IWL_EXPORT_SYMBOL(iwl_fw_dbg_apply_point);

void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt)
{
	/* if the wait event timeout elapses instead of wake up then
	 * the driver did not receive NMI interrupt and can not assume the FW
	 * is halted
	 */
	int ret = wait_event_timeout(fwrt->trans->fw_halt_waitq,
				     !test_bit(STATUS_FW_WAIT_DUMP,
					       &fwrt->trans->status),
				     msecs_to_jiffies(2000));
	if (!ret) {
		/* failed to receive NMI interrupt, assuming the FW is stuck */
		set_bit(STATUS_FW_ERROR, &fwrt->trans->status);

		clear_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status);
	}

	/* Assuming the op mode mutex is held at this point */
	iwl_fw_dbg_collect_sync(fwrt);

	iwl_trans_stop_device(fwrt->trans);
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
	fwrt->ops_ctx = ops_ctx;
	INIT_DELAYED_WORK(&fwrt->dump.wk, iwl_fw_error_dump_wk);
	iwl_fwrt_dbgfs_register(fwrt, dbgfs_dir);
	init_waitqueue_head(&fwrt->trans->fw_halt_waitq);
}
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);

+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;
extern const struct iwl_cfg iwl22000_2ac_cfg_jf;
extern const struct iwl_cfg iwl_ax101_cfg_qu_hr;
extern const struct iwl_cfg iwl22000_2ax_cfg_hr;
extern const struct iwl_cfg iwl22260_2ax_cfg;
extern const struct iwl_cfg iwl_ax200_cfg_cc;
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0;
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0;
extern const struct iwl_cfg killer1650x_2ax_cfg;
+6 −6
Original line number Diff line number Diff line
@@ -338,7 +338,6 @@ enum iwl_d3_status {
 *	are sent
 * @STATUS_TRANS_IDLE: the trans is idle - general commands are not to be sent
 * @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
 * @STATUS_FW_WAIT_DUMP: if set, wait until cleared before collecting dump
 */
enum iwl_trans_status {
	STATUS_SYNC_HCMD_ACTIVE,
@@ -351,7 +350,6 @@ enum iwl_trans_status {
	STATUS_TRANS_GOING_IDLE,
	STATUS_TRANS_IDLE,
	STATUS_TRANS_DEAD,
	STATUS_FW_WAIT_DUMP,
};

static inline int
@@ -618,6 +616,7 @@ struct iwl_trans_ops {
	struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
						 u32 dump_mask);
	void (*debugfs_cleanup)(struct iwl_trans *trans);
	void (*sync_nmi)(struct iwl_trans *trans);
};

/**
@@ -831,7 +830,6 @@ struct iwl_trans {
	u32 lmac_error_event_table[2];
	u32 umac_error_event_table;
	unsigned int error_event_table_tlv_status;
	wait_queue_head_t fw_halt_waitq;

	/* pointer to trans specific struct */
	/*Ensure that this pointer will always be aligned to sizeof pointer */
@@ -1239,10 +1237,12 @@ static inline void iwl_trans_fw_error(struct iwl_trans *trans)
	/* prevent double restarts due to the same erroneous FW */
	if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status))
		iwl_op_mode_nic_error(trans->op_mode);
}

	if (test_and_clear_bit(STATUS_FW_WAIT_DUMP, &trans->status))
		wake_up(&trans->fw_halt_waitq);

static inline void iwl_trans_sync_nmi(struct iwl_trans *trans)
{
	if (trans->ops->sync_nmi)
		trans->ops->sync_nmi(trans);
}

/*****************************************************
Loading