aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2014-07-17 18:55:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-18 13:45:26 -0400
commit1d9e954e8b522ae37c7c0fdd791b5736321684a0 (patch)
tree0d2f7e9ecbe38277ca872d77d2c5009aa51ada61 /drivers
parent71954f24c93fd569314985e9a7319b68e0b918e6 (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')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c40
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c14
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c14
3 files changed, 20 insertions, 48 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),
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 5f7afffdd34e..c16dd2cc8198 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -2238,7 +2238,6 @@ static void mwifiex_pcie_fw_dump_work(struct mwifiex_adapter *adapter)
2238 struct pcie_service_card *card = adapter->card; 2238 struct pcie_service_card *card = adapter->card;
2239 const struct mwifiex_pcie_card_reg *creg = card->pcie.reg; 2239 const struct mwifiex_pcie_card_reg *creg = card->pcie.reg;
2240 unsigned int reg, reg_start, reg_end; 2240 unsigned int reg, reg_start, reg_end;
2241 struct timeval t;
2242 u8 *dbg_ptr, *end_ptr, dump_num, idx, i, read_reg, doneflag = 0; 2241 u8 *dbg_ptr, *end_ptr, dump_num, idx, i, read_reg, doneflag = 0;
2243 enum rdwr_status stat; 2242 enum rdwr_status stat;
2244 u32 memory_size; 2243 u32 memory_size;
@@ -2257,9 +2256,7 @@ static void mwifiex_pcie_fw_dump_work(struct mwifiex_adapter *adapter)
2257 entry->mem_size = 0; 2256 entry->mem_size = 0;
2258 } 2257 }
2259 2258
2260 do_gettimeofday(&t); 2259 dev_info(adapter->dev, "== mwifiex firmware dump start ==\n");
2261 dev_info(adapter->dev, "== mwifiex firmware dump start: %u.%06u ==\n",
2262 (u32)t.tv_sec, (u32)t.tv_usec);
2263 2260
2264 /* Read the number of the memories which will dump */ 2261 /* Read the number of the memories which will dump */
2265 stat = mwifiex_pcie_rdwr_firmware(adapter, doneflag); 2262 stat = mwifiex_pcie_rdwr_firmware(adapter, doneflag);
@@ -2303,9 +2300,8 @@ static void mwifiex_pcie_fw_dump_work(struct mwifiex_adapter *adapter)
2303 end_ptr = dbg_ptr + memory_size; 2300 end_ptr = dbg_ptr + memory_size;
2304 2301
2305 doneflag = entry->done_flag; 2302 doneflag = entry->done_flag;
2306 do_gettimeofday(&t); 2303 dev_info(adapter->dev, "Start %s output, please wait...\n",
2307 dev_info(adapter->dev, "Start %s output %u.%06u, please wait...\n", 2304 entry->mem_name);
2308 entry->mem_name, (u32)t.tv_sec, (u32)t.tv_usec);
2309 2305
2310 do { 2306 do {
2311 stat = mwifiex_pcie_rdwr_firmware(adapter, doneflag); 2307 stat = mwifiex_pcie_rdwr_firmware(adapter, doneflag);
@@ -2331,9 +2327,7 @@ static void mwifiex_pcie_fw_dump_work(struct mwifiex_adapter *adapter)
2331 break; 2327 break;
2332 } while (true); 2328 } while (true);
2333 } 2329 }
2334 do_gettimeofday(&t); 2330 dev_info(adapter->dev, "== mwifiex firmware dump end ==\n");
2335 dev_info(adapter->dev, "== mwifiex firmware dump end: %u.%06u ==\n",
2336 (u32)t.tv_sec, (u32)t.tv_usec);
2337 2331
2338 kobject_uevent_env(&adapter->wiphy->dev.kobj, KOBJ_CHANGE, env); 2332 kobject_uevent_env(&adapter->wiphy->dev.kobj, KOBJ_CHANGE, env);
2339 2333
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 1da04a086bd9..3e48ef5ca53c 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -2012,7 +2012,6 @@ static void mwifiex_sdio_fw_dump_work(struct work_struct *work)
2012 int ret = 0; 2012 int ret = 0;
2013 unsigned int reg, reg_start, reg_end; 2013 unsigned int reg, reg_start, reg_end;
2014 u8 *dbg_ptr, *end_ptr, dump_num, idx, i, read_reg, doneflag = 0; 2014 u8 *dbg_ptr, *end_ptr, dump_num, idx, i, read_reg, doneflag = 0;
2015 struct timeval t;
2016 enum rdwr_status stat; 2015 enum rdwr_status stat;
2017 u32 memory_size; 2016 u32 memory_size;
2018 static char *env[] = { "DRIVER=mwifiex_sdio", "EVENT=fw_dump", NULL }; 2017 static char *env[] = { "DRIVER=mwifiex_sdio", "EVENT=fw_dump", NULL };
@@ -2033,9 +2032,7 @@ static void mwifiex_sdio_fw_dump_work(struct work_struct *work)
2033 mwifiex_pm_wakeup_card(adapter); 2032 mwifiex_pm_wakeup_card(adapter);
2034 sdio_claim_host(card->func); 2033 sdio_claim_host(card->func);
2035 2034
2036 do_gettimeofday(&t); 2035 dev_info(adapter->dev, "== mwifiex firmware dump start ==\n");
2037 dev_info(adapter->dev, "== mwifiex firmware dump start: %u.%06u ==\n",
2038 (u32)t.tv_sec, (u32)t.tv_usec);
2039 2036
2040 stat = mwifiex_sdio_rdwr_firmware(adapter, doneflag); 2037 stat = mwifiex_sdio_rdwr_firmware(adapter, doneflag);
2041 if (stat == RDWR_STATUS_FAILURE) 2038 if (stat == RDWR_STATUS_FAILURE)
@@ -2087,9 +2084,8 @@ static void mwifiex_sdio_fw_dump_work(struct work_struct *work)
2087 end_ptr = dbg_ptr + memory_size; 2084 end_ptr = dbg_ptr + memory_size;
2088 2085
2089 doneflag = entry->done_flag; 2086 doneflag = entry->done_flag;
2090 do_gettimeofday(&t); 2087 dev_info(adapter->dev, "Start %s output, please wait...\n",
2091 dev_info(adapter->dev, "Start %s output %u.%06u, please wait...\n", 2088 entry->mem_name);
2092 entry->mem_name, (u32)t.tv_sec, (u32)t.tv_usec);
2093 2089
2094 do { 2090 do {
2095 stat = mwifiex_sdio_rdwr_firmware(adapter, doneflag); 2091 stat = mwifiex_sdio_rdwr_firmware(adapter, doneflag);
@@ -2120,9 +2116,7 @@ static void mwifiex_sdio_fw_dump_work(struct work_struct *work)
2120 break; 2116 break;
2121 } while (1); 2117 } while (1);
2122 } 2118 }
2123 do_gettimeofday(&t); 2119 dev_info(adapter->dev, "== mwifiex firmware dump end ==\n");
2124 dev_info(adapter->dev, "== mwifiex firmware dump end: %u.%06u ==\n",
2125 (u32)t.tv_sec, (u32)t.tv_usec);
2126 2120
2127 kobject_uevent_env(&adapter->wiphy->dev.kobj, KOBJ_CHANGE, env); 2121 kobject_uevent_env(&adapter->wiphy->dev.kobj, KOBJ_CHANGE, env);
2128 2122