Patch "net: 6pack: Fix tx timeout and slot time" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: 6pack: Fix tx timeout and slot time

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-6pack-fix-tx-timeout-and-slot-time.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f09f33bd8e209fe89c45d057d10cb472e806e895
Author: Guenter Roeck <linux@xxxxxxxxxxxx>
Date:   Wed Sep 8 20:57:43 2021 -0700

    net: 6pack: Fix tx timeout and slot time
    
    [ Upstream commit 3c0d2a46c0141913dc6fd126c57d0615677d946e ]
    
    tx timeout and slot time are currently specified in units of HZ.  On
    Alpha, HZ is defined as 1024.  When building alpha:allmodconfig, this
    results in the following error message.
    
      drivers/net/hamradio/6pack.c: In function 'sixpack_open':
      drivers/net/hamradio/6pack.c:71:41: error:
            unsigned conversion from 'int' to 'unsigned char'
            changes value from '256' to '0'
    
    In the 6PACK protocol, tx timeout is specified in units of 10 ms and
    transmitted over the wire:
    
        https://www.linux-ax25.org/wiki/6PACK
    
    Defining a value dependent on HZ doesn't really make sense, and
    presumably comes from the (very historical) situation where HZ was
    originally 100.
    
    Note that the SIXP_SLOTTIME use explicitly is about 10ms granularity:
    
            mod_timer(&sp->tx_t, jiffies + ((when + 1) * HZ) / 100);
    
    and the SIXP_TXDELAY walue is sent as a byte over the wire.
    
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 8fe8887d506a..6192244b304a 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -68,9 +68,9 @@
 #define SIXP_DAMA_OFF		0
 
 /* default level 2 parameters */
-#define SIXP_TXDELAY			(HZ/4)	/* in 1 s */
+#define SIXP_TXDELAY			25	/* 250 ms */
 #define SIXP_PERSIST			50	/* in 256ths */
-#define SIXP_SLOTTIME			(HZ/10)	/* in 1 s */
+#define SIXP_SLOTTIME			10	/* 100 ms */
 #define SIXP_INIT_RESYNC_TIMEOUT	(3*HZ/2) /* in 1 s */
 #define SIXP_RESYNC_TIMEOUT		5*HZ	/* in 1 s */
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux