#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/usb.h>
#include <linux/uaccess.h>
#define DRIVER_VERSION …
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#define IDR …
#define MAR …
#define CR …
#define TCR …
#define RCR …
#define TSR …
#define RSR …
#define CON0 …
#define CON1 …
#define MSR …
#define PHYADD …
#define PHYDAT …
#define PHYCNT …
#define GPPC …
#define BMCR …
#define BMSR …
#define ANAR …
#define ANLP …
#define AER …
#define CSCR …
#define CSCR_LINK_STATUS …
#define IDR_EEPROM …
#define PHY_READ …
#define PHY_WRITE …
#define PHY_GO …
#define MII_TIMEOUT …
#define INTBUFSIZE …
#define RTL8150_REQT_READ …
#define RTL8150_REQT_WRITE …
#define RTL8150_REQ_GET_REGS …
#define RTL8150_REQ_SET_REGS …
#define TSR_ECOL …
#define TSR_LCOL …
#define TSR_LOSS_CRS …
#define TSR_JBR …
#define TSR_ERRORS …
#define RSR_CRC …
#define RSR_FAE …
#define RSR_ERRORS …
#define MSR_DUPLEX …
#define MSR_SPEED …
#define MSR_LINK …
#define INT_TSR …
#define INT_RSR …
#define INT_MSR …
#define INT_WAKSR …
#define INT_TXOK_CNT …
#define INT_RXLOST_CNT …
#define INT_CRERR_CNT …
#define INT_COL_CNT …
#define RTL8150_MTU …
#define RTL8150_TX_TIMEOUT …
#define RX_SKB_POOL_SIZE …
#define RTL8150_HW_CRC …
#define RX_REG_SET …
#define RTL8150_UNPLUG …
#define RX_URB_FAIL …
#define VENDOR_ID_REALTEK …
#define VENDOR_ID_MELCO …
#define VENDOR_ID_MICRONET …
#define VENDOR_ID_LONGSHINE …
#define VENDOR_ID_OQO …
#define VENDOR_ID_ZYXEL …
#define PRODUCT_ID_RTL8150 …
#define PRODUCT_ID_LUAKTX …
#define PRODUCT_ID_LCS8138TX …
#define PRODUCT_ID_SP128AR …
#define PRODUCT_ID_PRESTIGE …
#undef EEPROM_WRITE
static const struct usb_device_id rtl8150_table[] = …;
MODULE_DEVICE_TABLE(usb, rtl8150_table);
struct rtl8150 { … };
rtl8150_t;
struct async_req { … };
static const char driver_name [] = …;
static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
{ … }
static int set_registers(rtl8150_t * dev, u16 indx, u16 size, const void *data)
{ … }
static void async_set_reg_cb(struct urb *urb)
{ … }
static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, u16 reg)
{ … }
static int read_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 * reg)
{ … }
static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
{ … }
static void set_ethernet_addr(rtl8150_t *dev)
{ … }
static int rtl8150_set_mac_address(struct net_device *netdev, void *p)
{ … }
static int rtl8150_reset(rtl8150_t * dev)
{ … }
static int alloc_all_urbs(rtl8150_t * dev)
{ … }
static void free_all_urbs(rtl8150_t * dev)
{ … }
static void unlink_all_urbs(rtl8150_t * dev)
{ … }
static inline struct sk_buff *pull_skb(rtl8150_t *dev)
{ … }
static void read_bulk_callback(struct urb *urb)
{ … }
static void write_bulk_callback(struct urb *urb)
{ … }
static void intr_callback(struct urb *urb)
{ … }
static int rtl8150_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int rtl8150_resume(struct usb_interface *intf)
{ … }
static void fill_skb_pool(rtl8150_t *dev)
{ … }
static void free_skb_pool(rtl8150_t *dev)
{ … }
static void rx_fixup(struct tasklet_struct *t)
{ … }
static int enable_net_traffic(rtl8150_t * dev)
{ … }
static void disable_net_traffic(rtl8150_t * dev)
{ … }
static void rtl8150_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{ … }
static void rtl8150_set_multicast(struct net_device *netdev)
{ … }
static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static void set_carrier(struct net_device *netdev)
{ … }
static int rtl8150_open(struct net_device *netdev)
{ … }
static int rtl8150_close(struct net_device *netdev)
{ … }
static void rtl8150_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *info)
{ … }
static int rtl8150_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *ecmd)
{ … }
static const struct ethtool_ops ops = …;
static int rtl8150_siocdevprivate(struct net_device *netdev, struct ifreq *rq,
void __user *udata, int cmd)
{ … }
static const struct net_device_ops rtl8150_netdev_ops = …;
static int rtl8150_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void rtl8150_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver rtl8150_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;