#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <linux/crc16.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/major.h>
#include <linux/init.h>
#include <linux/rtnetlink.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/jiffies.h>
#include <linux/refcount.h>
#include <net/ax25.h>
#define AX_MTU …
#undef END
#define END …
#define ESC …
#define ESC_END …
#define ESC_ESC …
struct mkiss { … };
static const unsigned short crc_flex_table[] = …;
static unsigned short calc_crc_flex(unsigned char *cp, int size)
{ … }
static int check_crc_flex(unsigned char *cp, int size)
{ … }
static int check_crc_16(unsigned char *cp, int size)
{ … }
static int kiss_esc(unsigned char *s, unsigned char *d, int len)
{ … }
static int kiss_esc_crc(unsigned char *s, unsigned char *d, unsigned short crc,
int len)
{ … }
static void ax_bump(struct mkiss *ax)
{ … }
static void kiss_unesc(struct mkiss *ax, unsigned char s)
{ … }
static int ax_set_mac_address(struct net_device *dev, void *addr)
{ … }
static void ax_changedmtu(struct mkiss *ax)
{ … }
static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
{ … }
static netdev_tx_t ax_xmit(struct sk_buff *skb, struct net_device *dev)
{ … }
static int ax_open_dev(struct net_device *dev)
{ … }
static int ax_open(struct net_device *dev)
{ … }
static int ax_close(struct net_device *dev)
{ … }
static const struct net_device_ops ax_netdev_ops = …;
static void ax_setup(struct net_device *dev)
{ … }
static DEFINE_RWLOCK(disc_data_lock);
static struct mkiss *mkiss_get(struct tty_struct *tty)
{ … }
static void mkiss_put(struct mkiss *ax)
{ … }
static int crc_force = …;
static int mkiss_open(struct tty_struct *tty)
{ … }
static void mkiss_close(struct tty_struct *tty)
{ … }
static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg)
{ … }
static void mkiss_receive_buf(struct tty_struct *tty, const u8 *cp,
const u8 *fp, size_t count)
{ … }
static void mkiss_write_wakeup(struct tty_struct *tty)
{ … }
static struct tty_ldisc_ops ax_ldisc = …;
static const char banner[] __initconst = …;
static const char msg_regfail[] __initconst = …;
static int __init mkiss_init_driver(void)
{ … }
static void __exit mkiss_exit_driver(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
module_param(crc_force, int, 0);
MODULE_PARM_DESC(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_LDISC(…);
module_init(…) …;
module_exit(mkiss_exit_driver);