aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/bpqether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/bpqether.c')
-rw-r--r--drivers/net/hamradio/bpqether.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index df09210f7351..c05bc37df356 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -64,7 +64,7 @@
64#include <net/ax25.h> 64#include <net/ax25.h>
65#include <linux/inet.h> 65#include <linux/inet.h>
66#include <linux/netdevice.h> 66#include <linux/netdevice.h>
67#include <linux/if_ether.h> 67#include <linux/etherdevice.h>
68#include <linux/if_arp.h> 68#include <linux/if_arp.h>
69#include <linux/skbuff.h> 69#include <linux/skbuff.h>
70#include <net/sock.h> 70#include <net/sock.h>
@@ -95,7 +95,6 @@ static char bpq_eth_addr[6];
95 95
96static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 96static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
97static int bpq_device_event(struct notifier_block *, unsigned long, void *); 97static int bpq_device_event(struct notifier_block *, unsigned long, void *);
98static const char *bpq_print_ethaddr(const unsigned char *);
99 98
100static struct packet_type bpq_packet_type = { 99static struct packet_type bpq_packet_type = {
101 .type = __constant_htons(ETH_P_BPQ), 100 .type = __constant_htons(ETH_P_BPQ),
@@ -383,16 +382,6 @@ static int bpq_close(struct net_device *dev)
383/* 382/*
384 * Proc filesystem 383 * Proc filesystem
385 */ 384 */
386static const char * bpq_print_ethaddr(const unsigned char *e)
387{
388 static char buf[18];
389
390 sprintf(buf, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
391 e[0], e[1], e[2], e[3], e[4], e[5]);
392
393 return buf;
394}
395
396static void *bpq_seq_start(struct seq_file *seq, loff_t *pos) 385static void *bpq_seq_start(struct seq_file *seq, loff_t *pos)
397{ 386{
398 int i = 1; 387 int i = 1;
@@ -438,14 +427,16 @@ static int bpq_seq_show(struct seq_file *seq, void *v)
438 "dev ether destination accept from\n"); 427 "dev ether destination accept from\n");
439 else { 428 else {
440 const struct bpqdev *bpqdev = v; 429 const struct bpqdev *bpqdev = v;
430 DECLARE_MAC_BUF(mac);
441 431
442 seq_printf(seq, "%-5s %-10s %s ", 432 seq_printf(seq, "%-5s %-10s %s ",
443 bpqdev->axdev->name, bpqdev->ethdev->name, 433 bpqdev->axdev->name, bpqdev->ethdev->name,
444 bpq_print_ethaddr(bpqdev->dest_addr)); 434 print_mac(mac, bpqdev->dest_addr));
445 435
446 seq_printf(seq, "%s\n", 436 if (is_multicast_ether_addr(bpqdev->acpt_addr))
447 (bpqdev->acpt_addr[0] & 0x01) ? "*" 437 seq_printf(seq, "*\n");
448 : bpq_print_ethaddr(bpqdev->acpt_addr)); 438 else
439 seq_printf(seq, "%s\n", print_mac(mac, bpqdev->acpt_addr));
449 440
450 } 441 }
451 return 0; 442 return 0;