diff options
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 94e42be16daa..f07bd590f8f9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -599,11 +599,11 @@ static const struct file_operations pktgen_fops = { | |||
599 | 599 | ||
600 | static int pktgen_if_show(struct seq_file *seq, void *v) | 600 | static int pktgen_if_show(struct seq_file *seq, void *v) |
601 | { | 601 | { |
602 | int i; | ||
603 | struct pktgen_dev *pkt_dev = seq->private; | 602 | struct pktgen_dev *pkt_dev = seq->private; |
604 | __u64 sa; | 603 | __u64 sa; |
605 | __u64 stopped; | 604 | __u64 stopped; |
606 | __u64 now = getCurUs(); | 605 | __u64 now = getCurUs(); |
606 | DECLARE_MAC_BUF(mac); | ||
607 | 607 | ||
608 | seq_printf(seq, | 608 | seq_printf(seq, |
609 | "Params: count %llu min_pkt_size: %u max_pkt_size: %u\n", | 609 | "Params: count %llu min_pkt_size: %u max_pkt_size: %u\n", |
@@ -648,19 +648,12 @@ static int pktgen_if_show(struct seq_file *seq, void *v) | |||
648 | 648 | ||
649 | seq_puts(seq, " src_mac: "); | 649 | seq_puts(seq, " src_mac: "); |
650 | 650 | ||
651 | if (is_zero_ether_addr(pkt_dev->src_mac)) | 651 | seq_printf(seq, "%s ", |
652 | for (i = 0; i < 6; i++) | 652 | print_mac(mac, is_zero_ether_addr(pkt_dev->src_mac) ? |
653 | seq_printf(seq, "%02X%s", pkt_dev->odev->dev_addr[i], | 653 | pkt_dev->odev->dev_addr : pkt_dev->src_mac)); |
654 | i == 5 ? " " : ":"); | ||
655 | else | ||
656 | for (i = 0; i < 6; i++) | ||
657 | seq_printf(seq, "%02X%s", pkt_dev->src_mac[i], | ||
658 | i == 5 ? " " : ":"); | ||
659 | 654 | ||
660 | seq_printf(seq, "dst_mac: "); | 655 | seq_printf(seq, "dst_mac: "); |
661 | for (i = 0; i < 6; i++) | 656 | seq_printf(seq, "%s\n", print_mac(mac, pkt_dev->dst_mac)); |
662 | seq_printf(seq, "%02X%s", pkt_dev->dst_mac[i], | ||
663 | i == 5 ? "\n" : ":"); | ||
664 | 657 | ||
665 | seq_printf(seq, | 658 | seq_printf(seq, |
666 | " udp_src_min: %d udp_src_max: %d udp_dst_min: %d udp_dst_max: %d\n", | 659 | " udp_src_min: %d udp_src_max: %d udp_dst_min: %d udp_dst_max: %d\n", |