#include <linux/module.h>
#include <linux/kmod.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/bitrev.h>
#include <linux/crc16.h>
#include <linux/crc32.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#include <linux/of_net.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/mdio.h>
#include <linux/phy.h>
#include <net/selftests.h>
#include "smsc95xx.h"
#define SMSC_CHIPNAME …
#define SMSC_DRIVER_VERSION …
#define HS_USB_PKT_SIZE …
#define FS_USB_PKT_SIZE …
#define DEFAULT_HS_BURST_CAP_SIZE …
#define DEFAULT_FS_BURST_CAP_SIZE …
#define DEFAULT_BULK_IN_DELAY …
#define MAX_SINGLE_PACKET_SIZE …
#define LAN95XX_EEPROM_MAGIC …
#define EEPROM_MAC_OFFSET …
#define DEFAULT_TX_CSUM_ENABLE …
#define DEFAULT_RX_CSUM_ENABLE …
#define SMSC95XX_INTERNAL_PHY_ID …
#define SMSC95XX_TX_OVERHEAD …
#define SMSC95XX_TX_OVERHEAD_CSUM …
#define SUPPORTED_WAKE …
#define FEATURE_8_WAKEUP_FILTERS …
#define FEATURE_PHY_NLP_CROSSOVER …
#define FEATURE_REMOTE_WAKEUP …
#define SUSPEND_SUSPEND0 …
#define SUSPEND_SUSPEND1 …
#define SUSPEND_SUSPEND2 …
#define SUSPEND_SUSPEND3 …
#define SUSPEND_ALLMODES …
#define SMSC95XX_NR_IRQS …
#define PHY_HWIRQ …
struct smsc95xx_priv { … };
static bool turbo_mode = …;
module_param(turbo_mode, bool, 0644);
MODULE_PARM_DESC(…) …;
static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
u32 *data)
{ … }
static int __must_check smsc95xx_write_reg(struct usbnet *dev, u32 index,
u32 data)
{ … }
static int __must_check smsc95xx_phy_wait_not_busy(struct usbnet *dev)
{ … }
static u32 mii_address_cmd(int phy_id, int idx, u16 op)
{ … }
static int smsc95xx_mdio_read(struct usbnet *dev, int phy_id, int idx)
{ … }
static void smsc95xx_mdio_write(struct usbnet *dev, int phy_id, int idx,
int regval)
{ … }
static int smsc95xx_mdiobus_reset(struct mii_bus *bus)
{ … }
static int smsc95xx_mdiobus_read(struct mii_bus *bus, int phy_id, int idx)
{ … }
static int smsc95xx_mdiobus_write(struct mii_bus *bus, int phy_id, int idx,
u16 regval)
{ … }
static int __must_check smsc95xx_wait_eeprom(struct usbnet *dev)
{ … }
static int __must_check smsc95xx_eeprom_confirm_not_busy(struct usbnet *dev)
{ … }
static int smsc95xx_read_eeprom(struct usbnet *dev, u32 offset, u32 length,
u8 *data)
{ … }
static int smsc95xx_write_eeprom(struct usbnet *dev, u32 offset, u32 length,
u8 *data)
{ … }
static int __must_check smsc95xx_write_reg_async(struct usbnet *dev, u16 index,
u32 data)
{ … }
static unsigned int smsc95xx_hash(char addr[ETH_ALEN])
{ … }
static void smsc95xx_set_multicast(struct net_device *netdev)
{ … }
static int smsc95xx_phy_update_flowcontrol(struct usbnet *dev)
{ … }
static void smsc95xx_mac_update_fullduplex(struct usbnet *dev)
{ … }
static void smsc95xx_status(struct usbnet *dev, struct urb *urb)
{ … }
static int smsc95xx_set_features(struct net_device *netdev,
netdev_features_t features)
{ … }
static int smsc95xx_ethtool_get_eeprom_len(struct net_device *net)
{ … }
static int smsc95xx_ethtool_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *ee, u8 *data)
{ … }
static int smsc95xx_ethtool_set_eeprom(struct net_device *netdev,
struct ethtool_eeprom *ee, u8 *data)
{ … }
static int smsc95xx_ethtool_getregslen(struct net_device *netdev)
{ … }
static void
smsc95xx_ethtool_getregs(struct net_device *netdev, struct ethtool_regs *regs,
void *buf)
{ … }
static void smsc95xx_ethtool_get_wol(struct net_device *net,
struct ethtool_wolinfo *wolinfo)
{ … }
static int smsc95xx_ethtool_set_wol(struct net_device *net,
struct ethtool_wolinfo *wolinfo)
{ … }
static u32 smsc95xx_get_link(struct net_device *net)
{ … }
static void smsc95xx_ethtool_get_strings(struct net_device *netdev, u32 sset,
u8 *data)
{ … }
static int smsc95xx_ethtool_get_sset_count(struct net_device *ndev, int sset)
{ … }
static const struct ethtool_ops smsc95xx_ethtool_ops = …;
static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
{ … }
static void smsc95xx_init_mac_address(struct usbnet *dev)
{ … }
static int smsc95xx_set_mac_address(struct usbnet *dev)
{ … }
static int smsc95xx_start_tx_path(struct usbnet *dev)
{ … }
static int smsc95xx_start_rx_path(struct usbnet *dev)
{ … }
static int smsc95xx_reset(struct usbnet *dev)
{ … }
static const struct net_device_ops smsc95xx_netdev_ops = …;
static void smsc95xx_handle_link_change(struct net_device *net)
{ … }
static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
{ … }
static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)
{ … }
static int smsc95xx_start_phy(struct usbnet *dev)
{ … }
static int smsc95xx_stop(struct usbnet *dev)
{ … }
static u32 smsc_crc(const u8 *buffer, size_t len, int filter)
{ … }
static int smsc95xx_link_ok(struct usbnet *dev)
{ … }
static int smsc95xx_enter_suspend0(struct usbnet *dev)
{ … }
static int smsc95xx_enter_suspend1(struct usbnet *dev)
{ … }
static int smsc95xx_enter_suspend2(struct usbnet *dev)
{ … }
static int smsc95xx_enter_suspend3(struct usbnet *dev)
{ … }
static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up)
{ … }
static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int smsc95xx_resume(struct usb_interface *intf)
{ … }
static int smsc95xx_reset_resume(struct usb_interface *intf)
{ … }
static void smsc95xx_rx_csum_offload(struct sk_buff *skb)
{ … }
static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{ … }
static u32 smsc95xx_calc_csum_preamble(struct sk_buff *skb)
{ … }
static bool smsc95xx_can_tx_checksum(struct sk_buff *skb)
{ … }
static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
struct sk_buff *skb, gfp_t flags)
{ … }
static int smsc95xx_manage_power(struct usbnet *dev, int on)
{ … }
static const struct driver_info smsc95xx_info = …;
static const struct usb_device_id products[] = …;
MODULE_DEVICE_TABLE(usb, products);
static struct usb_driver smsc95xx_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;