aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /net/llc
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/llc_proc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index 4865d82896b1..cb34bc0518e8 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -25,10 +25,10 @@
25#include <net/llc_c_st.h> 25#include <net/llc_c_st.h>
26#include <net/llc_conn.h> 26#include <net/llc_conn.h>
27 27
28static void llc_ui_format_mac(struct seq_file *seq, unsigned char *mac) 28static void llc_ui_format_mac(struct seq_file *seq, u8 *addr)
29{ 29{
30 seq_printf(seq, "%02X:%02X:%02X:%02X:%02X:%02X", 30 DECLARE_MAC_BUF(mac);
31 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 31 seq_printf(seq, "%s", print_mac(mac, addr));
32} 32}
33 33
34static struct sock *llc_get_sk_idx(loff_t pos) 34static struct sock *llc_get_sk_idx(loff_t pos)
@@ -128,8 +128,10 @@ static int llc_seq_socket_show(struct seq_file *seq, void *v)
128 128
129 if (llc->dev) 129 if (llc->dev)
130 llc_ui_format_mac(seq, llc->dev->dev_addr); 130 llc_ui_format_mac(seq, llc->dev->dev_addr);
131 else 131 else {
132 seq_printf(seq, "00:00:00:00:00:00"); 132 u8 addr[6] = {0,0,0,0,0,0};
133 llc_ui_format_mac(seq, addr);
134 }
133 seq_printf(seq, "@%02X ", llc->sap->laddr.lsap); 135 seq_printf(seq, "@%02X ", llc->sap->laddr.lsap);
134 llc_ui_format_mac(seq, llc->daddr.mac); 136 llc_ui_format_mac(seq, llc->daddr.mac);
135 seq_printf(seq, "@%02X %8d %8d %2d %3d %4d\n", llc->daddr.lsap, 137 seq_printf(seq, "@%02X %8d %8d %2d %3d %4d\n", llc->daddr.lsap,