aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorZhaoyang Liu <liuzy@marvell.com>2015-05-11 15:18:20 -0400
committerKalle Valo <kvalo@codeaurora.org>2015-05-26 06:50:42 -0400
commitacebe8c10a6eabdb9c34370a774b5b3fcbae3ff4 (patch)
tree179cda22ce445d4ea96dbcafdbde46b4fa751854 /drivers/net/wireless/mwifiex/cmdevt.c
parent868093a9df7580d6d50639d58f2c6e334dd73622 (diff)
mwifiex: change dbg print func to mwifiex_dbg
This patch changes all debug print functions from dev_dbg/dev_err/dev_info to mwifiex specific debug functions. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c354
1 files changed, 204 insertions, 150 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 5b197860b584..ac89a1dd711b 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -62,7 +62,8 @@ mwifiex_get_cmd_node(struct mwifiex_adapter *adapter)
62 62
63 spin_lock_irqsave(&adapter->cmd_free_q_lock, flags); 63 spin_lock_irqsave(&adapter->cmd_free_q_lock, flags);
64 if (list_empty(&adapter->cmd_free_q)) { 64 if (list_empty(&adapter->cmd_free_q)) {
65 dev_err(adapter->dev, "GET_CMD_NODE: cmd node not available\n"); 65 mwifiex_dbg(adapter, ERROR,
66 "GET_CMD_NODE: cmd node not available\n");
66 spin_unlock_irqrestore(&adapter->cmd_free_q_lock, flags); 67 spin_unlock_irqrestore(&adapter->cmd_free_q_lock, flags);
67 return NULL; 68 return NULL;
68 } 69 }
@@ -116,7 +117,8 @@ static int mwifiex_cmd_host_cmd(struct mwifiex_private *priv,
116{ 117{
117 /* Copy the HOST command to command buffer */ 118 /* Copy the HOST command to command buffer */
118 memcpy(cmd, pcmd_ptr->cmd, pcmd_ptr->len); 119 memcpy(cmd, pcmd_ptr->cmd, pcmd_ptr->len);
119 dev_dbg(priv->adapter->dev, "cmd: host cmd size = %d\n", pcmd_ptr->len); 120 mwifiex_dbg(priv->adapter, CMD,
121 "cmd: host cmd size = %d\n", pcmd_ptr->len);
120 return 0; 122 return 0;
121} 123}
122 124
@@ -147,8 +149,9 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
147 149
148 /* Sanity test */ 150 /* Sanity test */
149 if (host_cmd == NULL || host_cmd->size == 0) { 151 if (host_cmd == NULL || host_cmd->size == 0) {
150 dev_err(adapter->dev, "DNLD_CMD: host_cmd is null" 152 mwifiex_dbg(adapter, ERROR,
151 " or cmd size is 0, not sending\n"); 153 "DNLD_CMD: host_cmd is null\t"
154 "or cmd size is 0, not sending\n");
152 if (cmd_node->wait_q_enabled) 155 if (cmd_node->wait_q_enabled)
153 adapter->cmd_wait_q.status = -1; 156 adapter->cmd_wait_q.status = -1;
154 mwifiex_recycle_cmd_node(adapter, cmd_node); 157 mwifiex_recycle_cmd_node(adapter, cmd_node);
@@ -161,8 +164,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
161 if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET && 164 if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET &&
162 cmd_code != HostCmd_CMD_FUNC_SHUTDOWN && 165 cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
163 cmd_code != HostCmd_CMD_FUNC_INIT) { 166 cmd_code != HostCmd_CMD_FUNC_INIT) {
164 dev_err(adapter->dev, 167 mwifiex_dbg(adapter, ERROR,
165 "DNLD_CMD: FW in reset state, ignore cmd %#x\n", 168 "DNLD_CMD: FW in reset state, ignore cmd %#x\n",
166 cmd_code); 169 cmd_code);
167 if (cmd_node->wait_q_enabled) 170 if (cmd_node->wait_q_enabled)
168 mwifiex_complete_cmd(adapter, cmd_node); 171 mwifiex_complete_cmd(adapter, cmd_node);
@@ -197,10 +200,11 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
197 */ 200 */
198 skb_put(cmd_node->cmd_skb, cmd_size - cmd_node->cmd_skb->len); 201 skb_put(cmd_node->cmd_skb, cmd_size - cmd_node->cmd_skb->len);
199 202
200 dev_dbg(adapter->dev, 203 mwifiex_dbg(adapter, CMD,
201 "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n", cmd_code, 204 "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n",
202 le16_to_cpu(*(__le16 *) ((u8 *) host_cmd + S_DS_GEN)), cmd_size, 205 cmd_code,
203 le16_to_cpu(host_cmd->seq_num)); 206 le16_to_cpu(*(__le16 *)((u8 *)host_cmd + S_DS_GEN)),
207 cmd_size, le16_to_cpu(host_cmd->seq_num));
204 mwifiex_dbg_dump(adapter, CMD_D, "cmd buffer:", host_cmd, cmd_size); 208 mwifiex_dbg_dump(adapter, CMD_D, "cmd buffer:", host_cmd, cmd_size);
205 209
206 if (adapter->iface_type == MWIFIEX_USB) { 210 if (adapter->iface_type == MWIFIEX_USB) {
@@ -222,7 +226,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
222 } 226 }
223 227
224 if (ret == -1) { 228 if (ret == -1) {
225 dev_err(adapter->dev, "DNLD_CMD: host to card failed\n"); 229 mwifiex_dbg(adapter, ERROR,
230 "DNLD_CMD: host to card failed\n");
226 if (adapter->iface_type == MWIFIEX_USB) 231 if (adapter->iface_type == MWIFIEX_USB)
227 adapter->cmd_sent = false; 232 adapter->cmd_sent = false;
228 if (cmd_node->wait_q_enabled) 233 if (cmd_node->wait_q_enabled)
@@ -281,8 +286,8 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter)
281 (adapter->seq_num, priv->bss_num, 286 (adapter->seq_num, priv->bss_num,
282 priv->bss_type))); 287 priv->bss_type)));
283 288
284 dev_dbg(adapter->dev, 289 mwifiex_dbg(adapter, CMD,
285 "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n", 290 "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n",
286 le16_to_cpu(sleep_cfm_buf->command), 291 le16_to_cpu(sleep_cfm_buf->command),
287 le16_to_cpu(sleep_cfm_buf->action), 292 le16_to_cpu(sleep_cfm_buf->action),
288 le16_to_cpu(sleep_cfm_buf->size), 293 le16_to_cpu(sleep_cfm_buf->size),
@@ -314,7 +319,7 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter)
314 } 319 }
315 320
316 if (ret == -1) { 321 if (ret == -1) {
317 dev_err(adapter->dev, "SLEEP_CFM: failed\n"); 322 mwifiex_dbg(adapter, ERROR, "SLEEP_CFM: failed\n");
318 adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure++; 323 adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure++;
319 return -1; 324 return -1;
320 } 325 }
@@ -365,8 +370,8 @@ int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter)
365 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) { 370 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) {
366 cmd_array[i].skb = dev_alloc_skb(MWIFIEX_SIZE_OF_CMD_BUFFER); 371 cmd_array[i].skb = dev_alloc_skb(MWIFIEX_SIZE_OF_CMD_BUFFER);
367 if (!cmd_array[i].skb) { 372 if (!cmd_array[i].skb) {
368 dev_err(adapter->dev, 373 mwifiex_dbg(adapter, ERROR,
369 "unable to allocate command buffer\n"); 374 "unable to allocate command buffer\n");
370 return -ENOMEM; 375 return -ENOMEM;
371 } 376 }
372 } 377 }
@@ -390,7 +395,8 @@ int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter)
390 395
391 /* Need to check if cmd pool is allocated or not */ 396 /* Need to check if cmd pool is allocated or not */
392 if (!adapter->cmd_pool) { 397 if (!adapter->cmd_pool) {
393 dev_dbg(adapter->dev, "info: FREE_CMD_BUF: cmd_pool is null\n"); 398 mwifiex_dbg(adapter, FATAL,
399 "info: FREE_CMD_BUF: cmd_pool is null\n");
394 return 0; 400 return 0;
395 } 401 }
396 402
@@ -399,7 +405,8 @@ int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter)
399 /* Release shared memory buffers */ 405 /* Release shared memory buffers */
400 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) { 406 for (i = 0; i < MWIFIEX_NUM_OF_CMD_BUFFER; i++) {
401 if (cmd_array[i].skb) { 407 if (cmd_array[i].skb) {
402 dev_dbg(adapter->dev, "cmd: free cmd buffer %d\n", i); 408 mwifiex_dbg(adapter, CMD,
409 "cmd: free cmd buffer %d\n", i);
403 dev_kfree_skb_any(cmd_array[i].skb); 410 dev_kfree_skb_any(cmd_array[i].skb);
404 } 411 }
405 if (!cmd_array[i].resp_skb) 412 if (!cmd_array[i].resp_skb)
@@ -413,7 +420,8 @@ int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter)
413 } 420 }
414 /* Release struct cmd_ctrl_node */ 421 /* Release struct cmd_ctrl_node */
415 if (adapter->cmd_pool) { 422 if (adapter->cmd_pool) {
416 dev_dbg(adapter->dev, "cmd: free cmd pool\n"); 423 mwifiex_dbg(adapter, CMD,
424 "cmd: free cmd pool\n");
417 kfree(adapter->cmd_pool); 425 kfree(adapter->cmd_pool);
418 adapter->cmd_pool = NULL; 426 adapter->cmd_pool = NULL;
419 } 427 }
@@ -463,7 +471,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter)
463 rx_info->bss_type = priv->bss_type; 471 rx_info->bss_type = priv->bss_type;
464 } 472 }
465 473
466 dev_dbg(adapter->dev, "EVENT: cause: %#x\n", eventcause); 474 mwifiex_dbg(adapter, EVENT, "EVENT: cause: %#x\n", eventcause);
467 mwifiex_dbg_dump(adapter, EVT_D, "Event Buf:", skb->data, skb->len); 475 mwifiex_dbg_dump(adapter, EVT_D, "Event Buf:", skb->data, skb->len);
468 476
469 if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) 477 if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP)
@@ -503,28 +511,33 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
503 } 511 }
504 512
505 if (adapter->is_suspended) { 513 if (adapter->is_suspended) {
506 dev_err(adapter->dev, "PREP_CMD: device in suspended state\n"); 514 mwifiex_dbg(adapter, ERROR,
515 "PREP_CMD: device in suspended state\n");
507 return -1; 516 return -1;
508 } 517 }
509 518
510 if (adapter->hs_enabling && cmd_no != HostCmd_CMD_802_11_HS_CFG_ENH) { 519 if (adapter->hs_enabling && cmd_no != HostCmd_CMD_802_11_HS_CFG_ENH) {
511 dev_err(adapter->dev, "PREP_CMD: host entering sleep state\n"); 520 mwifiex_dbg(adapter, ERROR,
521 "PREP_CMD: host entering sleep state\n");
512 return -1; 522 return -1;
513 } 523 }
514 524
515 if (adapter->surprise_removed) { 525 if (adapter->surprise_removed) {
516 dev_err(adapter->dev, "PREP_CMD: card is removed\n"); 526 mwifiex_dbg(adapter, ERROR,
527 "PREP_CMD: card is removed\n");
517 return -1; 528 return -1;
518 } 529 }
519 530
520 if (adapter->is_cmd_timedout) { 531 if (adapter->is_cmd_timedout) {
521 dev_err(adapter->dev, "PREP_CMD: FW is in bad state\n"); 532 mwifiex_dbg(adapter, ERROR,
533 "PREP_CMD: FW is in bad state\n");
522 return -1; 534 return -1;
523 } 535 }
524 536
525 if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET) { 537 if (adapter->hw_status == MWIFIEX_HW_STATUS_RESET) {
526 if (cmd_no != HostCmd_CMD_FUNC_INIT) { 538 if (cmd_no != HostCmd_CMD_FUNC_INIT) {
527 dev_err(adapter->dev, "PREP_CMD: FW in reset state\n"); 539 mwifiex_dbg(adapter, ERROR,
540 "PREP_CMD: FW in reset state\n");
528 return -1; 541 return -1;
529 } 542 }
530 } 543 }
@@ -533,7 +546,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
533 cmd_node = mwifiex_get_cmd_node(adapter); 546 cmd_node = mwifiex_get_cmd_node(adapter);
534 547
535 if (!cmd_node) { 548 if (!cmd_node) {
536 dev_err(adapter->dev, "PREP_CMD: no free cmd node\n"); 549 mwifiex_dbg(adapter, ERROR,
550 "PREP_CMD: no free cmd node\n");
537 return -1; 551 return -1;
538 } 552 }
539 553
@@ -541,7 +555,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
541 mwifiex_init_cmd_node(priv, cmd_node, cmd_oid, data_buf, sync); 555 mwifiex_init_cmd_node(priv, cmd_node, cmd_oid, data_buf, sync);
542 556
543 if (!cmd_node->cmd_skb) { 557 if (!cmd_node->cmd_skb) {
544 dev_err(adapter->dev, "PREP_CMD: no free cmd buf\n"); 558 mwifiex_dbg(adapter, ERROR,
559 "PREP_CMD: no free cmd buf\n");
545 return -1; 560 return -1;
546 } 561 }
547 562
@@ -576,7 +591,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
576 591
577 /* Return error, since the command preparation failed */ 592 /* Return error, since the command preparation failed */
578 if (ret) { 593 if (ret) {
579 dev_err(adapter->dev, "PREP_CMD: cmd %#x preparation failed\n", 594 mwifiex_dbg(adapter, ERROR,
595 "PREP_CMD: cmd %#x preparation failed\n",
580 cmd_no); 596 cmd_no);
581 mwifiex_insert_cmd_to_free_q(adapter, cmd_node); 597 mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
582 return -1; 598 return -1;
@@ -631,7 +647,8 @@ void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter,
631 mwifiex_insert_cmd_to_free_q(adapter, cmd_node); 647 mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
632 648
633 atomic_dec(&adapter->cmd_pending); 649 atomic_dec(&adapter->cmd_pending);
634 dev_dbg(adapter->dev, "cmd: FREE_CMD: cmd=%#x, cmd_pending=%d\n", 650 mwifiex_dbg(adapter, CMD,
651 "cmd: FREE_CMD: cmd=%#x, cmd_pending=%d\n",
635 le16_to_cpu(host_cmd->command), 652 le16_to_cpu(host_cmd->command),
636 atomic_read(&adapter->cmd_pending)); 653 atomic_read(&adapter->cmd_pending));
637} 654}
@@ -653,7 +670,7 @@ mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
653 670
654 host_cmd = (struct host_cmd_ds_command *) (cmd_node->cmd_skb->data); 671 host_cmd = (struct host_cmd_ds_command *) (cmd_node->cmd_skb->data);
655 if (!host_cmd) { 672 if (!host_cmd) {
656 dev_err(adapter->dev, "QUEUE_CMD: host_cmd is NULL\n"); 673 mwifiex_dbg(adapter, ERROR, "QUEUE_CMD: host_cmd is NULL\n");
657 return; 674 return;
658 } 675 }
659 676
@@ -678,7 +695,8 @@ mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
678 spin_unlock_irqrestore(&adapter->cmd_pending_q_lock, flags); 695 spin_unlock_irqrestore(&adapter->cmd_pending_q_lock, flags);
679 696
680 atomic_inc(&adapter->cmd_pending); 697 atomic_inc(&adapter->cmd_pending);
681 dev_dbg(adapter->dev, "cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n", 698 mwifiex_dbg(adapter, CMD,
699 "cmd: QUEUE_CMD: cmd=%#x, cmd_pending=%d\n",
682 command, atomic_read(&adapter->cmd_pending)); 700 command, atomic_read(&adapter->cmd_pending));
683} 701}
684 702
@@ -704,7 +722,8 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter)
704 722
705 /* Check if already in processing */ 723 /* Check if already in processing */
706 if (adapter->curr_cmd) { 724 if (adapter->curr_cmd) {
707 dev_err(adapter->dev, "EXEC_NEXT_CMD: cmd in processing\n"); 725 mwifiex_dbg(adapter, FATAL,
726 "EXEC_NEXT_CMD: cmd in processing\n");
708 return -1; 727 return -1;
709 } 728 }
710 729
@@ -726,8 +745,9 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter)
726 priv = cmd_node->priv; 745 priv = cmd_node->priv;
727 746
728 if (adapter->ps_state != PS_STATE_AWAKE) { 747 if (adapter->ps_state != PS_STATE_AWAKE) {
729 dev_err(adapter->dev, "%s: cannot send cmd in sleep state," 748 mwifiex_dbg(adapter, ERROR,
730 " this should not happen\n", __func__); 749 "%s: cannot send cmd in sleep state,\t"
750 "this should not happen\n", __func__);
731 spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags); 751 spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
732 return ret; 752 return ret;
733 } 753 }
@@ -777,8 +797,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
777 797
778 if (!adapter->curr_cmd || !adapter->curr_cmd->resp_skb) { 798 if (!adapter->curr_cmd || !adapter->curr_cmd->resp_skb) {
779 resp = (struct host_cmd_ds_command *) adapter->upld_buf; 799 resp = (struct host_cmd_ds_command *) adapter->upld_buf;
780 dev_err(adapter->dev, "CMD_RESP: NULL curr_cmd, %#x\n", 800 mwifiex_dbg(adapter, ERROR,
781 le16_to_cpu(resp->command)); 801 "CMD_RESP: NULL curr_cmd, %#x\n",
802 le16_to_cpu(resp->command));
782 return -1; 803 return -1;
783 } 804 }
784 805
@@ -786,8 +807,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
786 807
787 resp = (struct host_cmd_ds_command *) adapter->curr_cmd->resp_skb->data; 808 resp = (struct host_cmd_ds_command *) adapter->curr_cmd->resp_skb->data;
788 if (adapter->curr_cmd->cmd_flag & CMD_F_CANCELED) { 809 if (adapter->curr_cmd->cmd_flag & CMD_F_CANCELED) {
789 dev_err(adapter->dev, "CMD_RESP: %#x been canceled\n", 810 mwifiex_dbg(adapter, ERROR,
790 le16_to_cpu(resp->command)); 811 "CMD_RESP: %#x been canceled\n",
812 le16_to_cpu(resp->command));
791 mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); 813 mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd);
792 spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags); 814 spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags);
793 adapter->curr_cmd = NULL; 815 adapter->curr_cmd = NULL;
@@ -799,7 +821,8 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
799 /* Copy original response back to response buffer */ 821 /* Copy original response back to response buffer */
800 struct mwifiex_ds_misc_cmd *hostcmd; 822 struct mwifiex_ds_misc_cmd *hostcmd;
801 uint16_t size = le16_to_cpu(resp->size); 823 uint16_t size = le16_to_cpu(resp->size);
802 dev_dbg(adapter->dev, "info: host cmd resp size = %d\n", size); 824 mwifiex_dbg(adapter, INFO,
825 "info: host cmd resp size = %d\n", size);
803 size = min_t(u16, size, MWIFIEX_SIZE_OF_CMD_BUFFER); 826 size = min_t(u16, size, MWIFIEX_SIZE_OF_CMD_BUFFER);
804 if (adapter->curr_cmd->data_buf) { 827 if (adapter->curr_cmd->data_buf) {
805 hostcmd = adapter->curr_cmd->data_buf; 828 hostcmd = adapter->curr_cmd->data_buf;
@@ -827,15 +850,15 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
827 adapter->dbg.last_cmd_resp_id[adapter->dbg.last_cmd_resp_index] = 850 adapter->dbg.last_cmd_resp_id[adapter->dbg.last_cmd_resp_index] =
828 orig_cmdresp_no; 851 orig_cmdresp_no;
829 852
830 dev_dbg(adapter->dev, 853 mwifiex_dbg(adapter, CMD,
831 "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n", 854 "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n",
832 orig_cmdresp_no, cmdresp_result, 855 orig_cmdresp_no, cmdresp_result,
833 le16_to_cpu(resp->size), le16_to_cpu(resp->seq_num)); 856 le16_to_cpu(resp->size), le16_to_cpu(resp->seq_num));
834 mwifiex_dbg_dump(adapter, CMD_D, "CMD_RESP buffer:", resp, 857 mwifiex_dbg_dump(adapter, CMD_D, "CMD_RESP buffer:", resp,
835 le16_to_cpu(resp->size)); 858 le16_to_cpu(resp->size));
836 859
837 if (!(orig_cmdresp_no & HostCmd_RET_BIT)) { 860 if (!(orig_cmdresp_no & HostCmd_RET_BIT)) {
838 dev_err(adapter->dev, "CMD_RESP: invalid cmd resp\n"); 861 mwifiex_dbg(adapter, ERROR, "CMD_RESP: invalid cmd resp\n");
839 if (adapter->curr_cmd->wait_q_enabled) 862 if (adapter->curr_cmd->wait_q_enabled)
840 adapter->cmd_wait_q.status = -1; 863 adapter->cmd_wait_q.status = -1;
841 864
@@ -859,8 +882,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
859 /* Check init command response */ 882 /* Check init command response */
860 if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) { 883 if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
861 if (ret) { 884 if (ret) {
862 dev_err(adapter->dev, "%s: cmd %#x failed during " 885 mwifiex_dbg(adapter, ERROR,
863 "initialization\n", __func__, cmdresp_no); 886 "%s: cmd %#x failed during\t"
887 "initialization\n", __func__, cmdresp_no);
864 mwifiex_init_fw_complete(adapter); 888 mwifiex_init_fw_complete(adapter);
865 return -1; 889 return -1;
866 } else if (adapter->last_init_cmd == cmdresp_no) 890 } else if (adapter->last_init_cmd == cmdresp_no)
@@ -895,7 +919,8 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
895 919
896 adapter->is_cmd_timedout = 1; 920 adapter->is_cmd_timedout = 1;
897 if (!adapter->curr_cmd) { 921 if (!adapter->curr_cmd) {
898 dev_dbg(adapter->dev, "cmd: empty curr_cmd\n"); 922 mwifiex_dbg(adapter, ERROR,
923 "cmd: empty curr_cmd\n");
899 return; 924 return;
900 } 925 }
901 cmd_node = adapter->curr_cmd; 926 cmd_node = adapter->curr_cmd;
@@ -904,47 +929,60 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
904 adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index]; 929 adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index];
905 adapter->dbg.timeout_cmd_act = 930 adapter->dbg.timeout_cmd_act =
906 adapter->dbg.last_cmd_act[adapter->dbg.last_cmd_index]; 931 adapter->dbg.last_cmd_act[adapter->dbg.last_cmd_index];
907 dev_err(adapter->dev, 932 mwifiex_dbg(adapter, MSG,
908 "%s: Timeout cmd id = %#x, act = %#x\n", __func__, 933 "%s: Timeout cmd id = %#x, act = %#x\n", __func__,
909 adapter->dbg.timeout_cmd_id, 934 adapter->dbg.timeout_cmd_id,
910 adapter->dbg.timeout_cmd_act); 935 adapter->dbg.timeout_cmd_act);
911 936
912 dev_err(adapter->dev, "num_data_h2c_failure = %d\n", 937 mwifiex_dbg(adapter, MSG,
913 adapter->dbg.num_tx_host_to_card_failure); 938 "num_data_h2c_failure = %d\n",
914 dev_err(adapter->dev, "num_cmd_h2c_failure = %d\n", 939 adapter->dbg.num_tx_host_to_card_failure);
915 adapter->dbg.num_cmd_host_to_card_failure); 940 mwifiex_dbg(adapter, MSG,
916 941 "num_cmd_h2c_failure = %d\n",
917 dev_err(adapter->dev, "is_cmd_timedout = %d\n", 942 adapter->dbg.num_cmd_host_to_card_failure);
918 adapter->is_cmd_timedout); 943
919 dev_err(adapter->dev, "num_tx_timeout = %d\n", 944 mwifiex_dbg(adapter, MSG,
920 adapter->dbg.num_tx_timeout); 945 "is_cmd_timedout = %d\n",
921 946 adapter->is_cmd_timedout);
922 dev_err(adapter->dev, "last_cmd_index = %d\n", 947 mwifiex_dbg(adapter, MSG,
923 adapter->dbg.last_cmd_index); 948 "num_tx_timeout = %d\n",
924 dev_err(adapter->dev, "last_cmd_id: %*ph\n", 949 adapter->dbg.num_tx_timeout);
925 (int)sizeof(adapter->dbg.last_cmd_id), 950
926 adapter->dbg.last_cmd_id); 951 mwifiex_dbg(adapter, MSG,
927 dev_err(adapter->dev, "last_cmd_act: %*ph\n", 952 "last_cmd_index = %d\n",
928 (int)sizeof(adapter->dbg.last_cmd_act), 953 adapter->dbg.last_cmd_index);
929 adapter->dbg.last_cmd_act); 954 mwifiex_dbg(adapter, MSG,
930 955 "last_cmd_id: %*ph\n",
931 dev_err(adapter->dev, "last_cmd_resp_index = %d\n", 956 (int)sizeof(adapter->dbg.last_cmd_id),
932 adapter->dbg.last_cmd_resp_index); 957 adapter->dbg.last_cmd_id);
933 dev_err(adapter->dev, "last_cmd_resp_id: %*ph\n", 958 mwifiex_dbg(adapter, MSG,
934 (int)sizeof(adapter->dbg.last_cmd_resp_id), 959 "last_cmd_act: %*ph\n",
935 adapter->dbg.last_cmd_resp_id); 960 (int)sizeof(adapter->dbg.last_cmd_act),
936 961 adapter->dbg.last_cmd_act);
937 dev_err(adapter->dev, "last_event_index = %d\n", 962
938 adapter->dbg.last_event_index); 963 mwifiex_dbg(adapter, MSG,
939 dev_err(adapter->dev, "last_event: %*ph\n", 964 "last_cmd_resp_index = %d\n",
940 (int)sizeof(adapter->dbg.last_event), 965 adapter->dbg.last_cmd_resp_index);
941 adapter->dbg.last_event); 966 mwifiex_dbg(adapter, MSG,
942 967 "last_cmd_resp_id: %*ph\n",
943 dev_err(adapter->dev, "data_sent=%d cmd_sent=%d\n", 968 (int)sizeof(adapter->dbg.last_cmd_resp_id),
944 adapter->data_sent, adapter->cmd_sent); 969 adapter->dbg.last_cmd_resp_id);
945 970
946 dev_err(adapter->dev, "ps_mode=%d ps_state=%d\n", 971 mwifiex_dbg(adapter, MSG,
947 adapter->ps_mode, adapter->ps_state); 972 "last_event_index = %d\n",
973 adapter->dbg.last_event_index);
974 mwifiex_dbg(adapter, MSG,
975 "last_event: %*ph\n",
976 (int)sizeof(adapter->dbg.last_event),
977 adapter->dbg.last_event);
978
979 mwifiex_dbg(adapter, MSG,
980 "data_sent=%d cmd_sent=%d\n",
981 adapter->data_sent, adapter->cmd_sent);
982
983 mwifiex_dbg(adapter, MSG,
984 "ps_mode=%d ps_state=%d\n",
985 adapter->ps_mode, adapter->ps_state);
948 986
949 if (cmd_node->wait_q_enabled) { 987 if (cmd_node->wait_q_enabled) {
950 adapter->cmd_wait_q.status = -ETIMEDOUT; 988 adapter->cmd_wait_q.status = -ETIMEDOUT;
@@ -1022,7 +1060,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
1022 if (!priv) 1060 if (!priv)
1023 continue; 1061 continue;
1024 if (priv->scan_request) { 1062 if (priv->scan_request) {
1025 dev_dbg(adapter->dev, "info: aborting scan\n"); 1063 mwifiex_dbg(adapter, WARN, "info: aborting scan\n");
1026 cfg80211_scan_done(priv->scan_request, 1); 1064 cfg80211_scan_done(priv->scan_request, 1);
1027 priv->scan_request = NULL; 1065 priv->scan_request = NULL;
1028 } 1066 }
@@ -1082,7 +1120,7 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
1082 if (!priv) 1120 if (!priv)
1083 continue; 1121 continue;
1084 if (priv->scan_request) { 1122 if (priv->scan_request) {
1085 dev_dbg(adapter->dev, "info: aborting scan\n"); 1123 mwifiex_dbg(adapter, WARN, "info: aborting scan\n");
1086 cfg80211_scan_done(priv->scan_request, 1); 1124 cfg80211_scan_done(priv->scan_request, 1);
1087 priv->scan_request = NULL; 1125 priv->scan_request = NULL;
1088 } 1126 }
@@ -1107,11 +1145,11 @@ mwifiex_check_ps_cond(struct mwifiex_adapter *adapter)
1107 !adapter->curr_cmd && !IS_CARD_RX_RCVD(adapter)) 1145 !adapter->curr_cmd && !IS_CARD_RX_RCVD(adapter))
1108 mwifiex_dnld_sleep_confirm_cmd(adapter); 1146 mwifiex_dnld_sleep_confirm_cmd(adapter);
1109 else 1147 else
1110 dev_dbg(adapter->dev, 1148 mwifiex_dbg(adapter, CMD,
1111 "cmd: Delay Sleep Confirm (%s%s%s)\n", 1149 "cmd: Delay Sleep Confirm (%s%s%s)\n",
1112 (adapter->cmd_sent) ? "D" : "", 1150 (adapter->cmd_sent) ? "D" : "",
1113 (adapter->curr_cmd) ? "C" : "", 1151 (adapter->curr_cmd) ? "C" : "",
1114 (IS_CARD_RX_RCVD(adapter)) ? "R" : ""); 1152 (IS_CARD_RX_RCVD(adapter)) ? "R" : "");
1115} 1153}
1116 1154
1117/* 1155/*
@@ -1127,15 +1165,18 @@ mwifiex_hs_activated_event(struct mwifiex_private *priv, u8 activated)
1127 priv->adapter->hs_activated = true; 1165 priv->adapter->hs_activated = true;
1128 mwifiex_update_rxreor_flags(priv->adapter, 1166 mwifiex_update_rxreor_flags(priv->adapter,
1129 RXREOR_FORCE_NO_DROP); 1167 RXREOR_FORCE_NO_DROP);
1130 dev_dbg(priv->adapter->dev, "event: hs_activated\n"); 1168 mwifiex_dbg(priv->adapter, EVENT,
1169 "event: hs_activated\n");
1131 priv->adapter->hs_activate_wait_q_woken = true; 1170 priv->adapter->hs_activate_wait_q_woken = true;
1132 wake_up_interruptible( 1171 wake_up_interruptible(
1133 &priv->adapter->hs_activate_wait_q); 1172 &priv->adapter->hs_activate_wait_q);
1134 } else { 1173 } else {
1135 dev_dbg(priv->adapter->dev, "event: HS not configured\n"); 1174 mwifiex_dbg(priv->adapter, EVENT,
1175 "event: HS not configured\n");
1136 } 1176 }
1137 } else { 1177 } else {
1138 dev_dbg(priv->adapter->dev, "event: hs_deactivated\n"); 1178 mwifiex_dbg(priv->adapter, EVENT,
1179 "event: hs_deactivated\n");
1139 priv->adapter->hs_activated = false; 1180 priv->adapter->hs_activated = false;
1140 } 1181 }
1141} 1182}
@@ -1163,11 +1204,12 @@ int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv,
1163 mwifiex_hs_activated_event(priv, true); 1204 mwifiex_hs_activated_event(priv, true);
1164 return 0; 1205 return 0;
1165 } else { 1206 } else {
1166 dev_dbg(adapter->dev, "cmd: CMD_RESP: HS_CFG cmd reply" 1207 mwifiex_dbg(adapter, CMD,
1167 " result=%#x, conditions=0x%x gpio=0x%x gap=0x%x\n", 1208 "cmd: CMD_RESP: HS_CFG cmd reply\t"
1168 resp->result, conditions, 1209 " result=%#x, conditions=0x%x gpio=0x%x gap=0x%x\n",
1169 phs_cfg->params.hs_config.gpio, 1210 resp->result, conditions,
1170 phs_cfg->params.hs_config.gap); 1211 phs_cfg->params.hs_config.gpio,
1212 phs_cfg->params.hs_config.gap);
1171 } 1213 }
1172 if (conditions != HS_CFG_CANCEL) { 1214 if (conditions != HS_CFG_CANCEL) {
1173 adapter->is_hs_configured = true; 1215 adapter->is_hs_configured = true;
@@ -1189,8 +1231,10 @@ int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv,
1189void 1231void
1190mwifiex_process_hs_config(struct mwifiex_adapter *adapter) 1232mwifiex_process_hs_config(struct mwifiex_adapter *adapter)
1191{ 1233{
1192 dev_dbg(adapter->dev, "info: %s: auto cancelling host sleep" 1234 mwifiex_dbg(adapter, INFO,
1193 " since there is interrupt from the firmware\n", __func__); 1235 "info: %s: auto cancelling host sleep\t"
1236 "since there is interrupt from the firmware\n",
1237 __func__);
1194 1238
1195 adapter->if_ops.wakeup(adapter); 1239 adapter->if_ops.wakeup(adapter);
1196 adapter->hs_activated = false; 1240 adapter->hs_activated = false;
@@ -1219,13 +1263,14 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
1219 uint16_t seq_num = le16_to_cpu(cmd->seq_num); 1263 uint16_t seq_num = le16_to_cpu(cmd->seq_num);
1220 1264
1221 if (!upld_len) { 1265 if (!upld_len) {
1222 dev_err(adapter->dev, "%s: cmd size is 0\n", __func__); 1266 mwifiex_dbg(adapter, ERROR,
1267 "%s: cmd size is 0\n", __func__);
1223 return; 1268 return;
1224 } 1269 }
1225 1270
1226 dev_dbg(adapter->dev, 1271 mwifiex_dbg(adapter, CMD,
1227 "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n", 1272 "cmd: CMD_RESP: 0x%x, result %d, len %d, seqno 0x%x\n",
1228 command, result, le16_to_cpu(cmd->size), seq_num); 1273 command, result, le16_to_cpu(cmd->size), seq_num);
1229 1274
1230 /* Get BSS number and corresponding priv */ 1275 /* Get BSS number and corresponding priv */
1231 priv = mwifiex_get_priv_by_id(adapter, HostCmd_GET_BSS_NO(seq_num), 1276 priv = mwifiex_get_priv_by_id(adapter, HostCmd_GET_BSS_NO(seq_num),
@@ -1239,15 +1284,16 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
1239 command &= HostCmd_CMD_ID_MASK; 1284 command &= HostCmd_CMD_ID_MASK;
1240 1285
1241 if (command != HostCmd_CMD_802_11_PS_MODE_ENH) { 1286 if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
1242 dev_err(adapter->dev, 1287 mwifiex_dbg(adapter, ERROR,
1243 "%s: rcvd unexpected resp for cmd %#x, result = %x\n", 1288 "%s: rcvd unexpected resp for cmd %#x, result = %x\n",
1244 __func__, command, result); 1289 __func__, command, result);
1245 return; 1290 return;
1246 } 1291 }
1247 1292
1248 if (result) { 1293 if (result) {
1249 dev_err(adapter->dev, "%s: sleep confirm cmd failed\n", 1294 mwifiex_dbg(adapter, ERROR,
1250 __func__); 1295 "%s: sleep confirm cmd failed\n",
1296 __func__);
1251 adapter->pm_wakeup_card_req = false; 1297 adapter->pm_wakeup_card_req = false;
1252 adapter->ps_state = PS_STATE_AWAKE; 1298 adapter->ps_state = PS_STATE_AWAKE;
1253 return; 1299 return;
@@ -1312,7 +1358,8 @@ int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
1312 sizeof(struct mwifiex_ie_types_header)); 1358 sizeof(struct mwifiex_ie_types_header));
1313 cmd_size += sizeof(*ps_tlv); 1359 cmd_size += sizeof(*ps_tlv);
1314 tlv += sizeof(*ps_tlv); 1360 tlv += sizeof(*ps_tlv);
1315 dev_dbg(adapter->dev, "cmd: PS Command: Enter PS\n"); 1361 mwifiex_dbg(priv->adapter, CMD,
1362 "cmd: PS Command: Enter PS\n");
1316 ps_mode->null_pkt_interval = 1363 ps_mode->null_pkt_interval =
1317 cpu_to_le16(adapter->null_pkt_interval); 1364 cpu_to_le16(adapter->null_pkt_interval);
1318 ps_mode->multiple_dtims = 1365 ps_mode->multiple_dtims =
@@ -1342,8 +1389,8 @@ int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
1342 tlv += sizeof(*auto_ds_tlv); 1389 tlv += sizeof(*auto_ds_tlv);
1343 if (auto_ds) 1390 if (auto_ds)
1344 idletime = auto_ds->idle_time; 1391 idletime = auto_ds->idle_time;
1345 dev_dbg(priv->adapter->dev, 1392 mwifiex_dbg(priv->adapter, CMD,
1346 "cmd: PS Command: Enter Auto Deep Sleep\n"); 1393 "cmd: PS Command: Enter Auto Deep Sleep\n");
1347 auto_ds_tlv->deep_sleep_timeout = cpu_to_le16(idletime); 1394 auto_ds_tlv->deep_sleep_timeout = cpu_to_le16(idletime);
1348 } 1395 }
1349 cmd->size = cpu_to_le16(cmd_size); 1396 cmd->size = cpu_to_le16(cmd_size);
@@ -1370,27 +1417,31 @@ int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
1370 uint16_t auto_ps_bitmap = 1417 uint16_t auto_ps_bitmap =
1371 le16_to_cpu(ps_mode->params.ps_bitmap); 1418 le16_to_cpu(ps_mode->params.ps_bitmap);
1372 1419
1373 dev_dbg(adapter->dev, 1420 mwifiex_dbg(adapter, INFO,
1374 "info: %s: PS_MODE cmd reply result=%#x action=%#X\n", 1421 "info: %s: PS_MODE cmd reply result=%#x action=%#X\n",
1375 __func__, resp->result, action); 1422 __func__, resp->result, action);
1376 if (action == EN_AUTO_PS) { 1423 if (action == EN_AUTO_PS) {
1377 if (auto_ps_bitmap & BITMAP_AUTO_DS) { 1424 if (auto_ps_bitmap & BITMAP_AUTO_DS) {
1378 dev_dbg(adapter->dev, "cmd: Enabled auto deep sleep\n"); 1425 mwifiex_dbg(adapter, CMD,
1426 "cmd: Enabled auto deep sleep\n");
1379 priv->adapter->is_deep_sleep = true; 1427 priv->adapter->is_deep_sleep = true;
1380 } 1428 }
1381 if (auto_ps_bitmap & BITMAP_STA_PS) { 1429 if (auto_ps_bitmap & BITMAP_STA_PS) {
1382 dev_dbg(adapter->dev, "cmd: Enabled STA power save\n"); 1430 mwifiex_dbg(adapter, CMD,
1431 "cmd: Enabled STA power save\n");
1383 if (adapter->sleep_period.period) 1432 if (adapter->sleep_period.period)
1384 dev_dbg(adapter->dev, 1433 mwifiex_dbg(adapter, CMD,
1385 "cmd: set to uapsd/pps mode\n"); 1434 "cmd: set to uapsd/pps mode\n");
1386 } 1435 }
1387 } else if (action == DIS_AUTO_PS) { 1436 } else if (action == DIS_AUTO_PS) {
1388 if (ps_bitmap & BITMAP_AUTO_DS) { 1437 if (ps_bitmap & BITMAP_AUTO_DS) {
1389 priv->adapter->is_deep_sleep = false; 1438 priv->adapter->is_deep_sleep = false;
1390 dev_dbg(adapter->dev, "cmd: Disabled auto deep sleep\n"); 1439 mwifiex_dbg(adapter, CMD,
1440 "cmd: Disabled auto deep sleep\n");
1391 } 1441 }
1392 if (ps_bitmap & BITMAP_STA_PS) { 1442 if (ps_bitmap & BITMAP_STA_PS) {
1393 dev_dbg(adapter->dev, "cmd: Disabled STA power save\n"); 1443 mwifiex_dbg(adapter, CMD,
1444 "cmd: Disabled STA power save\n");
1394 if (adapter->sleep_period.period) { 1445 if (adapter->sleep_period.period) {
1395 adapter->delay_null_pkt = false; 1446 adapter->delay_null_pkt = false;
1396 adapter->tx_lock_flag = false; 1447 adapter->tx_lock_flag = false;
@@ -1403,7 +1454,8 @@ int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
1403 else 1454 else
1404 adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM; 1455 adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM;
1405 1456
1406 dev_dbg(adapter->dev, "cmd: ps_bitmap=%#x\n", ps_bitmap); 1457 mwifiex_dbg(adapter, CMD,
1458 "cmd: ps_bitmap=%#x\n", ps_bitmap);
1407 1459
1408 if (pm_cfg) { 1460 if (pm_cfg) {
1409 /* This section is for get power save mode */ 1461 /* This section is for get power save mode */
@@ -1540,29 +1592,29 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
1540 api_rev->major_ver; 1592 api_rev->major_ver;
1541 adapter->key_api_minor_ver = 1593 adapter->key_api_minor_ver =
1542 api_rev->minor_ver; 1594 api_rev->minor_ver;
1543 dev_dbg(adapter->dev, 1595 mwifiex_dbg(adapter, INFO,
1544 "key_api v%d.%d\n", 1596 "key_api v%d.%d\n",
1545 adapter->key_api_major_ver, 1597 adapter->key_api_major_ver,
1546 adapter->key_api_minor_ver); 1598 adapter->key_api_minor_ver);
1547 break; 1599 break;
1548 case FW_API_VER_ID: 1600 case FW_API_VER_ID:
1549 adapter->fw_api_ver = 1601 adapter->fw_api_ver =
1550 api_rev->major_ver; 1602 api_rev->major_ver;
1551 dev_dbg(adapter->dev, 1603 mwifiex_dbg(adapter, INFO,
1552 "Firmware api version %d\n", 1604 "Firmware api version %d\n",
1553 adapter->fw_api_ver); 1605 adapter->fw_api_ver);
1554 break; 1606 break;
1555 default: 1607 default:
1556 dev_warn(adapter->dev, 1608 mwifiex_dbg(adapter, FATAL,
1557 "Unknown api_id: %d\n", 1609 "Unknown api_id: %d\n",
1558 api_id); 1610 api_id);
1559 break; 1611 break;
1560 } 1612 }
1561 break; 1613 break;
1562 default: 1614 default:
1563 dev_warn(adapter->dev, 1615 mwifiex_dbg(adapter, FATAL,
1564 "Unknown GET_HW_SPEC TLV type: %#x\n", 1616 "Unknown GET_HW_SPEC TLV type: %#x\n",
1565 le16_to_cpu(tlv->type)); 1617 le16_to_cpu(tlv->type));
1566 break; 1618 break;
1567 } 1619 }
1568 parsed_len += le16_to_cpu(tlv->len) + 1620 parsed_len += le16_to_cpu(tlv->len) +
@@ -1572,14 +1624,16 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
1572 } 1624 }
1573 } 1625 }
1574 1626
1575 dev_dbg(adapter->dev, "info: GET_HW_SPEC: fw_release_number- %#x\n", 1627 mwifiex_dbg(adapter, INFO,
1576 adapter->fw_release_number); 1628 "info: GET_HW_SPEC: fw_release_number- %#x\n",
1577 dev_dbg(adapter->dev, "info: GET_HW_SPEC: permanent addr: %pM\n", 1629 adapter->fw_release_number);
1578 hw_spec->permanent_addr); 1630 mwifiex_dbg(adapter, INFO,
1579 dev_dbg(adapter->dev, 1631 "info: GET_HW_SPEC: permanent addr: %pM\n",
1580 "info: GET_HW_SPEC: hw_if_version=%#x version=%#x\n", 1632 hw_spec->permanent_addr);
1581 le16_to_cpu(hw_spec->hw_if_version), 1633 mwifiex_dbg(adapter, INFO,
1582 le16_to_cpu(hw_spec->version)); 1634 "info: GET_HW_SPEC: hw_if_version=%#x version=%#x\n",
1635 le16_to_cpu(hw_spec->hw_if_version),
1636 le16_to_cpu(hw_spec->version));
1583 1637
1584 ether_addr_copy(priv->adapter->perm_addr, hw_spec->permanent_addr); 1638 ether_addr_copy(priv->adapter->perm_addr, hw_spec->permanent_addr);
1585 adapter->region_code = le16_to_cpu(hw_spec->region_code); 1639 adapter->region_code = le16_to_cpu(hw_spec->region_code);
@@ -1592,8 +1646,8 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
1592 /* If it's unidentified region code, use the default (USA) */ 1646 /* If it's unidentified region code, use the default (USA) */
1593 if (i >= MWIFIEX_MAX_REGION_CODE) { 1647 if (i >= MWIFIEX_MAX_REGION_CODE) {
1594 adapter->region_code = 0x10; 1648 adapter->region_code = 0x10;
1595 dev_dbg(adapter->dev, 1649 mwifiex_dbg(adapter, WARN,
1596 "cmd: unknown region code, use default (USA)\n"); 1650 "cmd: unknown region code, use default (USA)\n");
1597 } 1651 }
1598 1652
1599 adapter->hw_dot_11n_dev_cap = le32_to_cpu(hw_spec->dot_11n_dev_cap); 1653 adapter->hw_dot_11n_dev_cap = le32_to_cpu(hw_spec->dot_11n_dev_cap);