linux/drivers/net/usb/cx82310_eth.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for USB ethernet port of Conexant CX82310-based ADSL routers
 * Copyright (C) 2010 by Ondrej Zary
 * some parts inspired by the cxacru driver
 */

#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/usb/usbnet.h>

enum cx82310_cmd {};

enum cx82310_status {};

#define CMD_PACKET_SIZE
#define CMD_TIMEOUT
#define CMD_REPLY_RETRY

#define CX82310_MTU
#define CMD_EP

struct cx82310_priv {};

/*
 * execute control command
 *  - optionally send some data (command parameters)
 *  - optionally wait for the reply
 *  - optionally read some data from the reply
 */
static int cx82310_cmd(struct usbnet *dev, enum cx82310_cmd cmd, bool reply,
		       u8 *wdata, int wlen, u8 *rdata, int rlen)
{}

static int cx82310_enable_ethernet(struct usbnet *dev)
{}

static void cx82310_reenable_work(struct work_struct *work)
{}

#define partial_len
#define partial_rem
#define partial_data

static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
{}

static void cx82310_unbind(struct usbnet *dev, struct usb_interface *intf)
{}

/*
 * RX is NOT easy - we can receive multiple packets per skb, each having 2-byte
 * packet length at the beginning.
 * The last packet might be incomplete (when it crosses the 4KB URB size),
 * continuing in the next skb (without any headers).
 * If a packet has odd length, there is one extra byte at the end (before next
 * packet or at the end of the URB).
 */
static int cx82310_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{}

/* TX is easy, just add 2 bytes of length at the beginning */
static struct sk_buff *cx82310_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
				       gfp_t flags)
{}


static const struct driver_info	cx82310_info =;

#define USB_DEVICE_CLASS(vend, prod, cl, sc, pr)

static const struct usb_device_id products[] =;
MODULE_DEVICE_TABLE(usb, products);

static struct usb_driver cx82310_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();