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

Commit c98c8d99 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy
Browse files

iwlwifi: move iwl_cmd_echo_test



The function can be static with the only user.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent ccc369a6
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -275,20 +275,3 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
	}
}
#endif

int iwl_cmd_echo_test(struct iwl_priv *priv)
{
	int ret;
	struct iwl_host_cmd cmd = {
		.id = REPLY_ECHO,
		.len = { 0 },
		.flags = CMD_SYNC,
	};

	ret = iwl_dvm_send_cmd(priv, &cmd);
	if (ret)
		IWL_ERR(priv, "echo testing fail: 0X%x\n", ret);
	else
		IWL_DEBUG_INFO(priv, "echo testing pass\n");
	return ret;
}
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ struct iwl_cmd;
 *   L i b                 *
 ***************************/

int iwl_cmd_echo_test(struct iwl_priv *priv);
#ifdef CONFIG_IWLWIFI_DEBUGFS
int iwl_alloc_traffic_mem(struct iwl_priv *priv);
void iwl_free_traffic_mem(struct iwl_priv *priv);
+17 −0
Original line number Diff line number Diff line
@@ -2383,6 +2383,23 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
	return count;
}

static int iwl_cmd_echo_test(struct iwl_priv *priv)
{
	int ret;
	struct iwl_host_cmd cmd = {
		.id = REPLY_ECHO,
		.len = { 0 },
		.flags = CMD_SYNC,
	};

	ret = iwl_dvm_send_cmd(priv, &cmd);
	if (ret)
		IWL_ERR(priv, "echo testing fail: 0X%x\n", ret);
	else
		IWL_DEBUG_INFO(priv, "echo testing pass\n");
	return ret;
}

static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
					const char __user *user_buf,
					size_t count, loff_t *ppos)