qcacmn: Replace linux print APIs with qdf print APIs

Replace linux print APIs with equivalent level qdf print APIs.

Change-Id: If0a4a5326de87c9f023e8f4de996a4734ed6cda2
CRs-Fixed: 2530137
This commit is contained in:
Himanshu Batra
2019-09-18 15:50:19 +05:30
committed by nshrivas
parent 659379aeff
commit 7ee0677954
7 changed files with 60 additions and 56 deletions

View File

@@ -1527,7 +1527,7 @@ static void hal_reo_status_get_header_generic(uint32_t *d, int b, void *h1)
UNIFORM_REO_STATUS_HEADER_STATUS_HEADER)];
break;
default:
pr_err("ERROR: Unknown tlv\n");
qdf_nofl_err("ERROR: Unknown tlv");
break;
}
h->cmd_num =
@@ -1570,7 +1570,7 @@ static void hal_reo_status_get_header_generic(uint32_t *d, int b, void *h1)
UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_GENERIC)];
break;
default:
pr_err("ERROR: Unknown tlv\n");
qdf_nofl_err("ERROR: Unknown tlv");
break;
}
h->tstamp =

View File

@@ -1636,13 +1636,13 @@ ssize_t hif_input_desc_trace_buf_index(struct hif_softc *scn,
ce_hist = &scn->hif_ce_desc_hist;
if (!size) {
pr_err("%s: Invalid input buffer.\n", __func__);
qdf_nofl_err("%s: Invalid input buffer.", __func__);
return -EINVAL;
}
if (sscanf(buf, "%u %u", (unsigned int *)&ce_hist->hist_id,
(unsigned int *)&ce_hist->hist_index) != 2) {
pr_err("%s: Invalid input value.\n", __func__);
qdf_nofl_err("%s: Invalid input value.", __func__);
return -EINVAL;
}
if ((ce_hist->hist_id >= CE_COUNT_MAX) ||
@@ -1681,13 +1681,14 @@ ssize_t hif_ce_en_desc_hist(struct hif_softc *scn, const char *buf, size_t size)
ce_hist = &scn->hif_ce_desc_hist;
if (!size) {
pr_err("%s: Invalid input buffer.\n", __func__);
qdf_nofl_err("%s: Invalid input buffer.", __func__);
return -EINVAL;
}
if (sscanf(buf, "%u %u", (unsigned int *)&ce_id,
(unsigned int *)&cfg) != 2) {
pr_err("%s: Invalid input: Enter CE Id<sp><1/0>.\n", __func__);
qdf_nofl_err("%s: Invalid input: Enter CE Id<sp><1/0>.",
__func__);
return -EINVAL;
}
if (ce_id >= CE_COUNT_MAX) {

View File

@@ -720,7 +720,7 @@ void hif_usb_ramdump_handler(struct hif_opaque_softc *scn)
reg = (uint32_t *) (data + 4);
start_addr = *reg++;
if (sc->fw_ram_dumping == 0) {
pr_err("Firmware stack dump:");
qdf_nofl_err("Firmware stack dump:");
sc->fw_ram_dumping = 1;
fw_stack_addr = start_addr;
}
@@ -729,13 +729,13 @@ void hif_usb_ramdump_handler(struct hif_opaque_softc *scn)
for (i = 0; i < (len - 8); i += 16) {
if ((*reg == FW_REG_END_PATTERN) && (i == len - 12)) {
sc->fw_ram_dumping = 0;
pr_err("Stack start address = %#08x\n",
fw_stack_addr);
qdf_nofl_err("Stack start address = %#08x",
fw_stack_addr);
break;
}
hex_dump_to_buffer(reg, remaining, 16, 4, str_buf,
sizeof(str_buf), false);
pr_err("%#08x: %s\n", start_addr + i, str_buf);
qdf_nofl_err("%#08x: %s", start_addr + i, str_buf);
remaining -= 16;
reg += 4;
}

View File

@@ -482,8 +482,9 @@ static int pkt_stats_fill_headers(struct sk_buff *skb)
cds_pkt_size);
if (unlikely(skb_headroom(skb) < cds_pkt_size)) {
pr_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data, sizeof(msg_header));
qdf_nofl_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data,
sizeof(msg_header));
return -EIO;
}
@@ -491,8 +492,9 @@ static int pkt_stats_fill_headers(struct sk_buff *skb)
&cds_pktlog, cds_pkt_size);
if (unlikely(skb_headroom(skb) < sizeof(int))) {
pr_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data, sizeof(int));
qdf_nofl_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data,
sizeof(int));
return -EIO;
}
@@ -513,8 +515,9 @@ static int pkt_stats_fill_headers(struct sk_buff *skb)
msg_header.wmsg.length = cpu_to_be16(skb->len);
if (unlikely(skb_headroom(skb) < sizeof(msg_header))) {
pr_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data, sizeof(msg_header));
qdf_nofl_err("VPKT [%d]: Insufficient headroom, head[%pK], data[%pK], req[%zu]",
__LINE__, skb->head, skb->data,
sizeof(msg_header));
return -EIO;
}
@@ -564,8 +567,8 @@ static int pktlog_send_per_pkt_stats_to_user(void)
skb_new = dev_alloc_skb(MAX_SKBMSG_LENGTH);
if (!skb_new) {
if (!rate_limit) {
pr_err("%s: dev_alloc_skb() failed for msg size[%d] drop count = %u\n",
__func__, MAX_SKBMSG_LENGTH,
qdf_nofl_err("%s: dev_alloc_skb() failed for msg size[%d] drop count = %u",
__func__, MAX_SKBMSG_LENGTH,
gwlan_logging.drop_count);
}
rate_limit = 1;
@@ -582,14 +585,15 @@ static int pktlog_send_per_pkt_stats_to_user(void)
ret = pkt_stats_fill_headers(pstats_msg->skb);
if (ret < 0) {
pr_err("%s failed to fill headers %d\n", __func__, ret);
qdf_nofl_err("%s failed to fill headers %d",
__func__, ret);
free_old_skb = true;
goto err;
}
ret = nl_srv_bcast_diag(pstats_msg->skb);
if (ret < 0) {
pr_info("%s: Send Failed %d drop_count = %u\n",
__func__, ret,
qdf_nofl_info("%s: Send Failed %d drop_count = %u",
__func__, ret,
++gwlan_logging.pkt_stat_drop_cnt);
} else {
ret = 0;
@@ -640,10 +644,9 @@ static int send_filled_buffers_to_user(void)
skb = dev_alloc_skb(MAX_LOGMSG_LENGTH);
if (!skb) {
if (!rate_limit) {
pr_err
("%s: dev_alloc_skb() failed for msg size[%d] drop count = %u\n",
__func__, MAX_LOGMSG_LENGTH,
gwlan_logging.drop_count);
qdf_nofl_err("%s: dev_alloc_skb() failed for msg size[%d] drop count = %u",
__func__, MAX_LOGMSG_LENGTH,
gwlan_logging.drop_count);
}
rate_limit = 1;
ret = -ENOMEM;
@@ -669,10 +672,10 @@ static int send_filled_buffers_to_user(void)
list_add_tail(&plog_msg->node,
&gwlan_logging.free_list);
spin_unlock_irqrestore(&gwlan_logging.spin_lock, flags);
pr_err("%s: drop_count = %u\n", __func__,
++gwlan_logging.drop_count);
pr_err("%s: nlmsg_put() failed for msg size[%d]\n",
__func__, tot_msg_len);
qdf_nofl_err("%s: drop_count = %u", __func__,
++gwlan_logging.drop_count);
qdf_nofl_err("%s: nlmsg_put() failed for msg size[%d]",
__func__, tot_msg_len);
dev_kfree_skb(skb);
skb = NULL;
ret = -EINVAL;
@@ -691,8 +694,8 @@ static int send_filled_buffers_to_user(void)
ret = nl_srv_bcast_host_logs(skb);
/* print every 64th drop count */
if (ret < 0 && (!(gwlan_logging.drop_count % 0x40))) {
pr_err("%s: Send Failed %d drop_count = %u\n",
__func__, ret, ++gwlan_logging.drop_count);
qdf_nofl_err("%s: Send Failed %d drop_count = %u",
__func__, ret, ++gwlan_logging.drop_count);
}
}
@@ -800,9 +803,8 @@ static int wlan_logging_thread(void *Arg)
|| gwlan_logging.exit));
if (ret_wait_status == -ERESTARTSYS) {
pr_err
("%s: wait_event_interruptible returned -ERESTARTSYS",
__func__);
qdf_nofl_err("%s: wait_event_interruptible returned -ERESTARTSYS",
__func__);
break;
}
@@ -935,8 +937,8 @@ int wlan_logging_sock_init_svc(void)
gwlan_logging.buffer_length = MAX_LOGMSG_LENGTH;
if (allocate_log_msg_buffer() != QDF_STATUS_SUCCESS) {
pr_err("%s: Could not allocate memory for log_msg\n",
__func__);
qdf_nofl_err("%s: Could not allocate memory for log_msg",
__func__);
return -ENOMEM;
}
@@ -957,8 +959,8 @@ int wlan_logging_sock_init_svc(void)
pkt_stats_size = sizeof(struct pkt_stats_msg);
gpkt_stats_buffers = vmalloc(MAX_PKTSTATS_BUFF * pkt_stats_size);
if (!gpkt_stats_buffers) {
pr_err("%s: Could not allocate memory for Pkt stats\n",
__func__);
qdf_nofl_err("%s: Could not allocate memory for Pkt stats",
__func__);
goto err1;
}
qdf_mem_zero(gpkt_stats_buffers,
@@ -974,7 +976,8 @@ int wlan_logging_sock_init_svc(void)
for (i = 0; i < MAX_PKTSTATS_BUFF; i++) {
gpkt_stats_buffers[i].skb = dev_alloc_skb(MAX_PKTSTATS_LENGTH);
if (!gpkt_stats_buffers[i].skb) {
pr_err("%s: Memory alloc failed for skb", __func__);
qdf_nofl_err("%s: Memory alloc failed for skb",
__func__);
/* free previously allocated skb and return */
for (j = 0; j < i ; j++)
dev_kfree_skb(gpkt_stats_buffers[j].skb);
@@ -1001,8 +1004,8 @@ int wlan_logging_sock_init_svc(void)
gwlan_logging.thread = kthread_create(wlan_logging_thread, NULL,
"wlan_logging_thread");
if (IS_ERR(gwlan_logging.thread)) {
pr_err("%s: Could not Create LogMsg Thread Controller",
__func__);
qdf_nofl_err("%s: Could not Create LogMsg Thread Controller",
__func__);
goto err3;
}
wake_up_process(gwlan_logging.thread);
@@ -1133,8 +1136,8 @@ void wlan_flush_host_logs_for_fatal(void)
unsigned long flags;
if (gwlan_logging.flush_timer_period == 0)
pr_info("%s:flush all host logs Setting HOST_LOG_POST_MASK\n",
__func__);
qdf_nofl_info("%s:flush all host logs Setting HOST_LOG_POST_MAS",
__func__);
spin_lock_irqsave(&gwlan_logging.spin_lock, flags);
wlan_queue_logmsg_for_app();
spin_unlock_irqrestore(&gwlan_logging.spin_lock, flags);
@@ -1181,8 +1184,8 @@ static int wlan_get_pkt_stats_free_node(void)
if (
cds_is_multicast_logging() &&
(!(gwlan_logging.pkt_stat_drop_cnt % 0x40))) {
pr_err("%s: drop_count = %u\n",
__func__, gwlan_logging.pkt_stat_drop_cnt);
qdf_nofl_err("%s: drop_count = %u",
__func__, gwlan_logging.pkt_stat_drop_cnt);
}
list_del_init(gwlan_logging.pkt_stat_filled_list.next);
ret = 1;
@@ -1217,7 +1220,7 @@ void wlan_pkt_stats_to_logger_thread(void *pl_hdr, void *pkt_dump, void *data)
pktlog_hdr = (struct ath_pktlog_hdr *)pl_hdr;
if (!pktlog_hdr) {
pr_err("%s : Invalid pkt_stats_header\n", __func__);
qdf_nofl_err("%s : Invalid pkt_stats_header", __func__);
return;
}
@@ -1327,7 +1330,7 @@ static void send_packetdump(ol_txrx_soc_handle soc,
struct packet_dump pd_hdr = {0};
if (!netbuf) {
pr_err("%s: Invalid netbuf.\n", __func__);
qdf_nofl_err("%s: Invalid netbuf.", __func__);
return;
}

View File

@@ -539,13 +539,13 @@ static int __pktlog_open(struct inode *i, struct file *f)
PKTLOG_MOD_INC_USE_COUNT;
pl_info = PDE_DATA(f->f_path.dentry->d_inode);
if (!pl_info) {
pr_err("%s: pl_info NULL", __func__);
qdf_nofl_err("%s: pl_info NULL", __func__);
return -EINVAL;
}
if (pl_info->curr_pkt_state != PKTLOG_OPR_NOT_IN_PROGRESS) {
pr_info("%s: plinfo state (%d) != PKTLOG_OPR_NOT_IN_PROGRESS",
__func__, pl_info->curr_pkt_state);
qdf_nofl_info("%s: plinfo state (%d) != PKTLOG_OPR_NOT_IN_PROGRESS",
__func__, pl_info->curr_pkt_state);
return -EBUSY;
}
@@ -642,8 +642,8 @@ static int __pktlog_release(struct inode *i, struct file *f)
cds_is_packet_log_enabled(), 0, 1);
if (ret != 0)
pr_warn("%s: pktlog cannot be enabled. ret value %d\n",
__func__, ret);
qdf_nofl_warn("%s: pktlog cannot be enabled. ret value %d",
__func__, ret);
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
return ret;

View File

@@ -414,7 +414,7 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
}
if (!pl_dev) {
pr_err("Invalid pktlog handle in %s\n", __func__);
qdf_nofl_err("Invalid pktlog handle in %s", __func__);
qdf_assert(pl_dev);
return A_ERROR;
}
@@ -525,7 +525,7 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
}
if (!pl_dev) {
pr_err("Invalid pktlog handle in %s\n", __func__);
qdf_nofl_err("Invalid pktlog handle in %s", __func__);
qdf_assert(pl_dev);
return A_ERROR;
}

View File

@@ -10228,8 +10228,8 @@ static uint16_t wmi_tag_fw_hang_cmd(wmi_unified_t wmi_handle)
uint16_t tag = 0;
if (qdf_atomic_read(&wmi_handle->is_target_suspended)) {
pr_err("%s: Target is already suspended, Ignore FW Hang Command",
__func__);
qdf_nofl_err("%s: Target is already suspended, Ignore FW Hang Command",
__func__);
return tag;
}