diff options
author | Bing Zhao <bzhao@marvell.com> | 2014-07-17 18:55:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-18 13:45:26 -0400 |
commit | 1d9e954e8b522ae37c7c0fdd791b5736321684a0 (patch) | |
tree | 0d2f7e9ecbe38277ca872d77d2c5009aa51ada61 /drivers/net/wireless/mwifiex/cmdevt.c | |
parent | 71954f24c93fd569314985e9a7319b68e0b918e6 (diff) |
mwifiex: remove redundant timestamps in debug prints
We don't need wall-clock time here, and in most configurations
that care, there are already timestamps in the kernel using
CONFIG_PRINTK_TIME=y.
Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index 5899eee87fb1..baf0aab63c04 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c | |||
@@ -137,7 +137,6 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv, | |||
137 | struct host_cmd_ds_command *host_cmd; | 137 | struct host_cmd_ds_command *host_cmd; |
138 | uint16_t cmd_code; | 138 | uint16_t cmd_code; |
139 | uint16_t cmd_size; | 139 | uint16_t cmd_size; |
140 | struct timeval tstamp; | ||
141 | unsigned long flags; | 140 | unsigned long flags; |
142 | __le32 tmp; | 141 | __le32 tmp; |
143 | 142 | ||
@@ -198,10 +197,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv, | |||
198 | */ | 197 | */ |
199 | skb_put(cmd_node->cmd_skb, cmd_size - cmd_node->cmd_skb->len); | 198 | skb_put(cmd_node->cmd_skb, cmd_size - cmd_node->cmd_skb->len); |
200 | 199 | ||
201 | do_gettimeofday(&tstamp); | 200 | dev_dbg(adapter->dev, |
202 | dev_dbg(adapter->dev, "cmd: DNLD_CMD: (%lu.%lu): %#x, act %#x, len %d," | 201 | "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n", cmd_code, |
203 | " seqno %#x\n", | ||
204 | tstamp.tv_sec, tstamp.tv_usec, cmd_code, | ||
205 | le16_to_cpu(*(__le16 *) ((u8 *) host_cmd + S_DS_GEN)), cmd_size, | 202 | le16_to_cpu(*(__le16 *) ((u8 *) host_cmd + S_DS_GEN)), cmd_size, |
206 | le16_to_cpu(host_cmd->seq_num)); | 203 | le16_to_cpu(host_cmd->seq_num)); |
207 | 204 | ||
@@ -273,7 +270,6 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter) | |||
273 | (struct mwifiex_opt_sleep_confirm *) | 270 | (struct mwifiex_opt_sleep_confirm *) |
274 | adapter->sleep_cfm->data; | 271 | adapter->sleep_cfm->data; |
275 | struct sk_buff *sleep_cfm_tmp; | 272 | struct sk_buff *sleep_cfm_tmp; |
276 | struct timeval ts; | ||
277 | __le32 tmp; | 273 | __le32 tmp; |
278 | 274 | ||
279 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); | 275 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); |
@@ -284,10 +280,9 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter) | |||
284 | (adapter->seq_num, priv->bss_num, | 280 | (adapter->seq_num, priv->bss_num, |
285 | priv->bss_type))); | 281 | priv->bss_type))); |
286 | 282 | ||
287 | do_gettimeofday(&ts); | ||
288 | dev_dbg(adapter->dev, | 283 | dev_dbg(adapter->dev, |
289 | "cmd: DNLD_CMD: (%lu.%lu): %#x, act %#x, len %d, seqno %#x\n", | 284 | "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n", |
290 | ts.tv_sec, ts.tv_usec, le16_to_cpu(sleep_cfm_buf->command), | 285 | le16_to_cpu(sleep_cfm_buf->command), |
291 | le16_to_cpu(sleep_cfm_buf->action), | 286 | le16_to_cpu(sleep_cfm_buf->action), |
292 | le16_to_cpu(sleep_cfm_buf->size), | 287 | le16_to_cpu(sleep_cfm_buf->size), |
293 | le16_to_cpu(sleep_cfm_buf->seq_num)); | 288 | le16_to_cpu(sleep_cfm_buf->seq_num)); |
@@ -442,7 +437,6 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter) | |||
442 | mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); | 437 | mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); |
443 | struct sk_buff *skb = adapter->event_skb; | 438 | struct sk_buff *skb = adapter->event_skb; |
444 | u32 eventcause = adapter->event_cause; | 439 | u32 eventcause = adapter->event_cause; |
445 | struct timeval tstamp; | ||
446 | struct mwifiex_rxinfo *rx_info; | 440 | struct mwifiex_rxinfo *rx_info; |
447 | 441 | ||
448 | /* Save the last event to debug log */ | 442 | /* Save the last event to debug log */ |
@@ -467,9 +461,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter) | |||
467 | rx_info->bss_type = priv->bss_type; | 461 | rx_info->bss_type = priv->bss_type; |
468 | } | 462 | } |
469 | 463 | ||
470 | do_gettimeofday(&tstamp); | 464 | dev_dbg(adapter->dev, "EVENT: cause: %#x\n", eventcause); |
471 | dev_dbg(adapter->dev, "EVENT: %lu.%lu: cause: %#x\n", | ||
472 | tstamp.tv_sec, tstamp.tv_usec, eventcause); | ||
473 | if (eventcause == EVENT_PS_SLEEP || eventcause == EVENT_PS_AWAKE) { | 465 | if (eventcause == EVENT_PS_SLEEP || eventcause == EVENT_PS_AWAKE) { |
474 | /* Handle PS_SLEEP/AWAKE events on STA */ | 466 | /* Handle PS_SLEEP/AWAKE events on STA */ |
475 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA); | 467 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA); |
@@ -781,7 +773,6 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter) | |||
781 | uint16_t orig_cmdresp_no; | 773 | uint16_t orig_cmdresp_no; |
782 | uint16_t cmdresp_no; | 774 | uint16_t cmdresp_no; |
783 | uint16_t cmdresp_result; | 775 | uint16_t cmdresp_result; |
784 | struct timeval tstamp; | ||
785 | unsigned long flags; | 776 | unsigned long flags; |
786 | 777 | ||
787 | /* Now we got response from FW, cancel the command timer */ | 778 | /* Now we got response from FW, cancel the command timer */ |
@@ -839,11 +830,10 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter) | |||
839 | adapter->dbg.last_cmd_resp_id[adapter->dbg.last_cmd_resp_index] = | 830 | adapter->dbg.last_cmd_resp_id[adapter->dbg.last_cmd_resp_index] = |
840 | orig_cmdresp_no; | 831 | orig_cmdresp_no; |
841 | 832 | ||
842 | do_gettimeofday(&tstamp); | 833 | dev_dbg(adapter->dev, |
843 | dev_dbg(adapter->dev, "cmd: CMD_RESP: (%lu.%lu): 0x%x, result %d," | 834 | "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n", |
844 | " len %d, seqno 0x%x\n", | 835 | orig_cmdresp_no, cmdresp_result, |
845 | tstamp.tv_sec, tstamp.tv_usec, orig_cmdresp_no, cmdresp_result, | 836 | le16_to_cpu(resp->size), le16_to_cpu(resp->seq_num)); |
846 | le16_to_cpu(resp->size), le16_to_cpu(resp->seq_num)); | ||
847 | 837 | ||
848 | if (!(orig_cmdresp_no & HostCmd_RET_BIT)) { | 838 | if (!(orig_cmdresp_no & HostCmd_RET_BIT)) { |
849 | dev_err(adapter->dev, "CMD_RESP: invalid cmd resp\n"); | 839 | dev_err(adapter->dev, "CMD_RESP: invalid cmd resp\n"); |
@@ -903,7 +893,6 @@ mwifiex_cmd_timeout_func(unsigned long function_context) | |||
903 | struct mwifiex_adapter *adapter = | 893 | struct mwifiex_adapter *adapter = |
904 | (struct mwifiex_adapter *) function_context; | 894 | (struct mwifiex_adapter *) function_context; |
905 | struct cmd_ctrl_node *cmd_node; | 895 | struct cmd_ctrl_node *cmd_node; |
906 | struct timeval tstamp; | ||
907 | 896 | ||
908 | adapter->is_cmd_timedout = 1; | 897 | adapter->is_cmd_timedout = 1; |
909 | if (!adapter->curr_cmd) { | 898 | if (!adapter->curr_cmd) { |
@@ -916,10 +905,8 @@ mwifiex_cmd_timeout_func(unsigned long function_context) | |||
916 | adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index]; | 905 | adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index]; |
917 | adapter->dbg.timeout_cmd_act = | 906 | adapter->dbg.timeout_cmd_act = |
918 | adapter->dbg.last_cmd_act[adapter->dbg.last_cmd_index]; | 907 | adapter->dbg.last_cmd_act[adapter->dbg.last_cmd_index]; |
919 | do_gettimeofday(&tstamp); | ||
920 | dev_err(adapter->dev, | 908 | dev_err(adapter->dev, |
921 | "%s: Timeout cmd id (%lu.%lu) = %#x, act = %#x\n", | 909 | "%s: Timeout cmd id = %#x, act = %#x\n", __func__, |
922 | __func__, tstamp.tv_sec, tstamp.tv_usec, | ||
923 | adapter->dbg.timeout_cmd_id, | 910 | adapter->dbg.timeout_cmd_id, |
924 | adapter->dbg.timeout_cmd_act); | 911 | adapter->dbg.timeout_cmd_act); |
925 | 912 | ||
@@ -1237,18 +1224,15 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter, | |||
1237 | uint16_t result = le16_to_cpu(cmd->result); | 1224 | uint16_t result = le16_to_cpu(cmd->result); |
1238 | uint16_t command = le16_to_cpu(cmd->command); | 1225 | uint16_t command = le16_to_cpu(cmd->command); |
1239 | uint16_t seq_num = le16_to_cpu(cmd->seq_num); | 1226 | uint16_t seq_num = le16_to_cpu(cmd->seq_num); |
1240 | struct timeval ts; | ||
1241 | 1227 | ||
1242 | if (!upld_len) { | 1228 | if (!upld_len) { |
1243 | dev_err(adapter->dev, "%s: cmd size is 0\n", __func__); | 1229 | dev_err(adapter->dev, "%s: cmd size is 0\n", __func__); |
1244 | return; | 1230 | return; |
1245 | } | 1231 | } |
1246 | 1232 | ||
1247 | do_gettimeofday(&ts); | ||
1248 | dev_dbg(adapter->dev, | 1233 | dev_dbg(adapter->dev, |
1249 | "cmd: CMD_RESP: (%lu.%lu): 0x%x, result %d, len %d, seqno 0x%x\n", | 1234 | "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n", |
1250 | ts.tv_sec, ts.tv_usec, command, result, le16_to_cpu(cmd->size), | 1235 | command, result, le16_to_cpu(cmd->size), seq_num); |
1251 | seq_num); | ||
1252 | 1236 | ||
1253 | /* Get BSS number and corresponding priv */ | 1237 | /* Get BSS number and corresponding priv */ |
1254 | priv = mwifiex_get_priv_by_id(adapter, HostCmd_GET_BSS_NO(seq_num), | 1238 | priv = mwifiex_get_priv_by_id(adapter, HostCmd_GET_BSS_NO(seq_num), |