#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/crc32.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#define CH9200_VID …
#define CH9200_PID_E092 …
#define CTRL_TIMEOUT_MS …
#define CONTROL_TIMEOUT_MS …
#define REQUEST_READ …
#define REQUEST_WRITE …
#define MAC_REG_CTRL …
#define MAC_REG_STATUS …
#define MAC_REG_INTERRUPT_MASK …
#define MAC_REG_PHY_COMMAND …
#define MAC_REG_PHY_DATA …
#define MAC_REG_STATION_L …
#define MAC_REG_STATION_M …
#define MAC_REG_STATION_H …
#define MAC_REG_HASH_L …
#define MAC_REG_HASH_M1 …
#define MAC_REG_HASH_M2 …
#define MAC_REG_HASH_H …
#define MAC_REG_THRESHOLD …
#define MAC_REG_FIFO_DEPTH …
#define MAC_REG_PAUSE …
#define MAC_REG_FLOW_CONTROL …
#define LOOPBACK …
#define BASE100X …
#define MBPS_10 …
#define DUPLEX_MODE …
#define PAUSE_FRAME …
#define PROMISCUOUS …
#define MULTICAST …
#define BROADCAST …
#define HASH …
#define APPEND_PAD …
#define APPEND_CRC …
#define TRANSMITTER_ACTION …
#define RECEIVER_ACTION …
#define DMA_ACTION …
#define ALIGNMENT …
#define FIFO_OVER_RUN …
#define FIFO_UNDER_RUN …
#define RX_ERROR …
#define RX_COMPLETE …
#define TX_ERROR …
#define TX_COMPLETE …
#define ETH_TXBD …
#define ETN_TX_FIFO_DEPTH …
#define ETH_RXBD …
#define ETH_RX_FIFO_DEPTH …
static int control_read(struct usbnet *dev,
unsigned char request, unsigned short value,
unsigned short index, void *data, unsigned short size,
int timeout)
{ … }
static int control_write(struct usbnet *dev, unsigned char request,
unsigned short value, unsigned short index,
void *data, unsigned short size, int timeout)
{ … }
static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc)
{ … }
static void ch9200_mdio_write(struct net_device *netdev,
int phy_id, int loc, int val)
{ … }
static int ch9200_link_reset(struct usbnet *dev)
{ … }
static void ch9200_status(struct usbnet *dev, struct urb *urb)
{ … }
static struct sk_buff *ch9200_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
gfp_t flags)
{ … }
static int ch9200_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{ … }
static int get_mac_address(struct usbnet *dev, unsigned char *data)
{ … }
static int ch9200_bind(struct usbnet *dev, struct usb_interface *intf)
{ … }
static const struct driver_info ch9200_info = …;
static const struct usb_device_id ch9200_products[] = …;
MODULE_DEVICE_TABLE(usb, ch9200_products);
static struct usb_driver ch9200_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;