diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-04-02 09:15:58 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-23 17:23:17 -0400 |
commit | c98c8d9976d77328c9fee64be60f533b5cee0aa3 (patch) | |
tree | 4c42fc92b53e287ebbcd36ce2cf82da1ecc0b2f2 /drivers | |
parent | ccc369a6b6188724c7ac4a7551efa19d4782af68 (diff) |
iwlwifi: move iwl_cmd_echo_test
The function can be static with the only user.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 17 |
3 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 2a09678ef18c..a476397d5ab1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -275,20 +275,3 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len) | |||
275 | } | 275 | } |
276 | } | 276 | } |
277 | #endif | 277 | #endif |
278 | |||
279 | int iwl_cmd_echo_test(struct iwl_priv *priv) | ||
280 | { | ||
281 | int ret; | ||
282 | struct iwl_host_cmd cmd = { | ||
283 | .id = REPLY_ECHO, | ||
284 | .len = { 0 }, | ||
285 | .flags = CMD_SYNC, | ||
286 | }; | ||
287 | |||
288 | ret = iwl_dvm_send_cmd(priv, &cmd); | ||
289 | if (ret) | ||
290 | IWL_ERR(priv, "echo testing fail: 0X%x\n", ret); | ||
291 | else | ||
292 | IWL_DEBUG_INFO(priv, "echo testing pass\n"); | ||
293 | return ret; | ||
294 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index de7f6cd41002..3ec011bd879e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -76,7 +76,6 @@ struct iwl_cmd; | |||
76 | * L i b * | 76 | * L i b * |
77 | ***************************/ | 77 | ***************************/ |
78 | 78 | ||
79 | int iwl_cmd_echo_test(struct iwl_priv *priv); | ||
80 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 79 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
81 | int iwl_alloc_traffic_mem(struct iwl_priv *priv); | 80 | int iwl_alloc_traffic_mem(struct iwl_priv *priv); |
82 | void iwl_free_traffic_mem(struct iwl_priv *priv); | 81 | void iwl_free_traffic_mem(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 11ca48ea6b8f..f4a9910b5e75 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -2383,6 +2383,23 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file, | |||
2383 | return count; | 2383 | return count; |
2384 | } | 2384 | } |
2385 | 2385 | ||
2386 | static int iwl_cmd_echo_test(struct iwl_priv *priv) | ||
2387 | { | ||
2388 | int ret; | ||
2389 | struct iwl_host_cmd cmd = { | ||
2390 | .id = REPLY_ECHO, | ||
2391 | .len = { 0 }, | ||
2392 | .flags = CMD_SYNC, | ||
2393 | }; | ||
2394 | |||
2395 | ret = iwl_dvm_send_cmd(priv, &cmd); | ||
2396 | if (ret) | ||
2397 | IWL_ERR(priv, "echo testing fail: 0X%x\n", ret); | ||
2398 | else | ||
2399 | IWL_DEBUG_INFO(priv, "echo testing pass\n"); | ||
2400 | return ret; | ||
2401 | } | ||
2402 | |||
2386 | static ssize_t iwl_dbgfs_echo_test_write(struct file *file, | 2403 | static ssize_t iwl_dbgfs_echo_test_write(struct file *file, |
2387 | const char __user *user_buf, | 2404 | const char __user *user_buf, |
2388 | size_t count, loff_t *ppos) | 2405 | size_t count, loff_t *ppos) |