#ifndef _HDLCDRV_H
#define _HDLCDRV_H
#include <linux/netdevice.h>
#include <linux/if.h>
#include <linux/spinlock.h>
#include <uapi/linux/hdlcdrv.h>
#define HDLCDRV_MAGIC …
#define HDLCDRV_HDLCBUFFER …
#define HDLCDRV_BITBUFFER …
#undef HDLCDRV_LOOPBACK
#define HDLCDRV_DEBUG
#define HDLCDRV_MAXFLEN …
struct hdlcdrv_hdlcbuffer { … };
#ifdef HDLCDRV_DEBUG
struct hdlcdrv_bitbuffer { … };
static inline void hdlcdrv_add_bitbuffer(struct hdlcdrv_bitbuffer *buf,
unsigned int bit)
{ … }
static inline void hdlcdrv_add_bitbuffer_word(struct hdlcdrv_bitbuffer *buf,
unsigned int bits)
{ … }
#endif
struct hdlcdrv_ops { … };
struct hdlcdrv_state { … };
static inline int hdlcdrv_hbuf_full(struct hdlcdrv_hdlcbuffer *hb)
{ … }
static inline int hdlcdrv_hbuf_empty(struct hdlcdrv_hdlcbuffer *hb)
{ … }
static inline unsigned short hdlcdrv_hbuf_get(struct hdlcdrv_hdlcbuffer *hb)
{ … }
static inline void hdlcdrv_hbuf_put(struct hdlcdrv_hdlcbuffer *hb,
unsigned short val)
{ … }
static inline void hdlcdrv_putbits(struct hdlcdrv_state *s, unsigned int bits)
{ … }
static inline unsigned int hdlcdrv_getbits(struct hdlcdrv_state *s)
{ … }
static inline void hdlcdrv_channelbit(struct hdlcdrv_state *s, unsigned int bit)
{ … }
static inline void hdlcdrv_setdcd(struct hdlcdrv_state *s, int dcd)
{ … }
static inline int hdlcdrv_ptt(struct hdlcdrv_state *s)
{ … }
void hdlcdrv_receiver(struct net_device *, struct hdlcdrv_state *);
void hdlcdrv_transmitter(struct net_device *, struct hdlcdrv_state *);
void hdlcdrv_arbitrate(struct net_device *, struct hdlcdrv_state *);
struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
unsigned int privsize, const char *ifname,
unsigned int baseaddr, unsigned int irq,
unsigned int dma);
void hdlcdrv_unregister(struct net_device *dev);
#endif