Skip to content

Commit e2a61a7

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
6pack: drop sixpack::mtu
It holds a constant (AX25_MTU + 73), so use that constant in place of the single use directly. And remove the stale comment. Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Andreas Koensgen <[email protected]> Cc: David S. Miller <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Jeremy Kerr <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4c576b3 commit e2a61a7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/hamradio/6pack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ struct sixpack {
100100
unsigned int rx_count_cooked;
101101
spinlock_t rxlock;
102102

103-
int mtu; /* Our mtu (to spot changes!) */
104103
int buffsize; /* Max buffers sizes */
105104

106105
unsigned long flags; /* Flag values/ mode etc */
@@ -166,7 +165,7 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
166165
unsigned char *msg, *p = icp;
167166
int actual, count;
168167

169-
if (len > sp->mtu) { /* sp->mtu = AX25_MTU = max. PACLEN = 256 */
168+
if (len > AX25_MTU + 73) {
170169
msg = "oversized transmit packet!";
171170
goto out_drop;
172171
}
@@ -585,7 +584,6 @@ static int sixpack_open(struct tty_struct *tty)
585584

586585
sp->xbuff = xbuff;
587586

588-
sp->mtu = AX25_MTU + 73;
589587
sp->buffsize = len;
590588
sp->rcount = 0;
591589
sp->rx_count = 0;

0 commit comments

Comments
 (0)