net: dsa: hellcreek: Replace bogus comment
authorKurt Kanzenbach <kurt@linutronix.de>
Tue, 1 Aug 2023 13:16:47 +0000 (15:16 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Aug 2023 19:10:35 +0000 (12:10 -0700)
Replace bogus comment about matching the latched timestamp to one of the
received frames. That comment is probably copied from mv88e6xxx and true for
these switches. However, the hellcreek switch is configured to insert the
timestamp directly into the PTP packets.

While here, remove the other comments regarding the list splicing and locking as
well, because it doesn't add any value.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20230801131647.84697-1-kurt@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c

index ffd06cf8c44f0bc588e822ff61b52c17b8e9240a..bd7aacc71a63f4924a66230f024d753d4ce4bdfe 100644 (file)
@@ -298,17 +298,10 @@ static void hellcreek_get_rxts(struct hellcreek *hellcreek,
        struct sk_buff_head received;
        unsigned long flags;
 
-       /* The latched timestamp belongs to one of the received frames. */
+       /* Construct Rx timestamps for all received PTP packets. */
        __skb_queue_head_init(&received);
-
-       /* Lock & disable interrupts */
        spin_lock_irqsave(&rxq->lock, flags);
-
-       /* Add the reception queue "rxq" to the "received" queue an reintialize
-        * "rxq".  From now on, we deal with "received" not with "rxq"
-        */
        skb_queue_splice_tail_init(rxq, &received);
-
        spin_unlock_irqrestore(&rxq->lock, flags);
 
        for (; skb; skb = __skb_dequeue(&received)) {