OSDN Git Service

monitor: Fix printing of physical packet from simulation
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 24 Aug 2013 03:33:57 +0000 (20:33 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 24 Aug 2013 03:33:57 +0000 (20:33 -0700)
monitor/packet.c

index aedbff0..255cc57 100644 (file)
@@ -2293,16 +2293,15 @@ void packet_monitor(struct timeval *tv, uint16_t index, uint16_t opcode,
 void packet_simulator(struct timeval *tv, uint16_t frequency,
                                        const void *data, uint16_t size)
 {
-       char label[20];
-       char extra[20];
+       char str[10];
 
        if (tv && time_offset == ((time_t) -1))
                time_offset = tv->tv_sec;
 
-       sprintf(label, "Physical packet: %u MHz", frequency);
-       sprintf(extra, "(Channel %u)", (frequency - 2402) / 2);
+       sprintf(str, "%u MHz", frequency);
 
-       print_packet(tv, 0, '*', COLOR_PHY_PACKET, label, NULL, extra);
+       print_packet(tv, 0, '*', COLOR_PHY_PACKET,
+                                       "Physical packet:", NULL, str);
 
        ll_packet(frequency, data, size);
 }