提交 3620af0e 编写于 作者: J Joe Perches 提交者: David S. Miller

qlcnic: Fix dump_skb output

Use normal facilities to avoid printing each byte
on a separate line.

Now emits at KERN_DEBUG instead of KERN_INFO.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3f255dcc
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <net/ip.h> #include <net/ip.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <net/checksum.h> #include <net/checksum.h>
#include <linux/printk.h>
#include "qlcnic.h" #include "qlcnic.h"
...@@ -1465,14 +1466,14 @@ void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter, ...@@ -1465,14 +1466,14 @@ void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter,
static void dump_skb(struct sk_buff *skb, struct qlcnic_adapter *adapter) static void dump_skb(struct sk_buff *skb, struct qlcnic_adapter *adapter)
{ {
int i; if (adapter->ahw->msg_enable & NETIF_MSG_DRV) {
unsigned char *data = skb->data; char prefix[30];
pr_info(KERN_INFO "\n"); scnprintf(prefix, sizeof(prefix), "%s: %s: ",
for (i = 0; i < skb->len; i++) { dev_name(&adapter->pdev->dev), __func__);
QLCDB(adapter, DRV, "%02x ", data[i]);
if ((i & 0x0f) == 8) print_hex_dump_debug(prefix, DUMP_PREFIX_NONE, 16, 1,
pr_info(KERN_INFO "\n"); skb->data, skb->len, true);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册