6pack.c (f81ee8b8b8421dc06d13f197bb53191559cc51da) 6pack.c (357a6a875f1c4772f2102639bf19619780889f31)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * 6pack.c This module implements the 6pack protocol for kernel-based
4 * devices like TTY. It interfaces between a raw TTY and the
5 * kernel's AX.25 protocol layers.
6 *
7 * Authors: Andreas Könsgen <ajk@comnets.uni-bremen.de>
8 * Ralf Baechle DL5RB <ralf@linux-mips.org>

--- 760 unchanged lines hidden (view full) ---

769 /* Register the provided line protocol discipline */
770 status = tty_register_ldisc(&sp_ldisc);
771 if (status)
772 printk(msg_regfail, status);
773
774 return status;
775}
776
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * 6pack.c This module implements the 6pack protocol for kernel-based
4 * devices like TTY. It interfaces between a raw TTY and the
5 * kernel's AX.25 protocol layers.
6 *
7 * Authors: Andreas Könsgen <ajk@comnets.uni-bremen.de>
8 * Ralf Baechle DL5RB <ralf@linux-mips.org>

--- 760 unchanged lines hidden (view full) ---

769 /* Register the provided line protocol discipline */
770 status = tty_register_ldisc(&sp_ldisc);
771 if (status)
772 printk(msg_regfail, status);
773
774 return status;
775}
776
777static const char msg_unregfail[] = KERN_ERR \
778 "6pack: can't unregister line discipline (err = %d)\n";
779
780static void __exit sixpack_exit_driver(void)
781{
777static void __exit sixpack_exit_driver(void)
778{
782 int ret;
783
784 if ((ret = tty_unregister_ldisc(&sp_ldisc)))
785 printk(msg_unregfail, ret);
779 tty_unregister_ldisc(&sp_ldisc);
786}
787
788/* encode an AX.25 packet into 6pack */
789
790static int encode_sixpack(unsigned char *tx_buf, unsigned char *tx_buf_raw,
791 int length, unsigned char tx_delay)
792{
793 int count = 0;

--- 181 unchanged lines hidden ---
780}
781
782/* encode an AX.25 packet into 6pack */
783
784static int encode_sixpack(unsigned char *tx_buf, unsigned char *tx_buf_raw,
785 int length, unsigned char tx_delay)
786{
787 int count = 0;

--- 181 unchanged lines hidden ---