diff options
author | Shan Wei <davidshan@tencent.com> | 2012-11-28 10:54:31 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-28 08:48:39 -0800 |
commit | 0df1a84e0ec875d1bc12ac6aca325cb3543a7ad6 (patch) | |
tree | b9205b4a40449c1beadf04a4bc35eef06ee173f1 /drivers/staging/gdm72xx | |
parent | 7f5d6d9d2def045cdf8d25f836b72ce46629814c (diff) | |
download | op-kernel-dev-0df1a84e0ec875d1bc12ac6aca325cb3543a7ad6.zip op-kernel-dev-0df1a84e0ec875d1bc12ac6aca325cb3543a7ad6.tar.gz |
staging: gdm72xx: use %pI4 format to print IPv4 address and remove last usage of NIP6
commit cf4ca4874fc45 removed the definition of NIPQUAD and NIPQUAD_FMT,
and NIP6 also is out of date.
commit 2874762b31d8d replace deprecated NIPQUAD marco to C code, but we can use %pI4 to
print IPv4 address more simply. And remove constant condition judge.
Because DEBUG_SDU is not defined in gdm_wimax.h, no error message when compiling.
Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx')
-rw-r--r-- | drivers/staging/gdm72xx/gdm_wimax.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c index c302769..41efbee 100644 --- a/drivers/staging/gdm72xx/gdm_wimax.c +++ b/drivers/staging/gdm72xx/gdm_wimax.c @@ -168,24 +168,13 @@ static void dump_eth_packet(const char *title, u8 *data, int len) get_ip_protocol_name(ip_protocol), get_port_name(port)); - #if 1 if (!(data[0] == 0xff && data[1] == 0xff)) { if (protocol == ETH_P_IP) { - printk(KERN_DEBUG " src=%u.%u.%u.%u\n", - ((unsigned char *)&(ih->saddr))[0], - ((unsigned char *)&(ih->saddr))[1], - ((unsigned char *)&(ih->saddr))[2], - ((unsigned char *)&(ih->saddr))[3]); + printk(KERN_DEBUG " src=%pI4\n", &ih->saddr); } else if (protocol == ETH_P_IPV6) { - #ifdef NIP6 - printk(KERN_DEBUG " src=%x:%x:%x:%x:%x:%x:%x:%x\n", - NIP6(ih->saddr)); - #else printk(KERN_DEBUG " src=%pI6\n", &ih->saddr); - #endif } } - #endif #if (DUMP_PACKET & DUMP_SDU_ALL) printk_hex(data, len); |