Skip to main content
FDIC Logo FDIC-Insured - Backed by the full faith and credit of the U.S. Government
FDIC Logo FDIC-Insured - Backed by the full faith and credit of the U.S. Government

Jp1081b Usb Lan Driver 21 Online

netif_start_queue(netdev); return 0;

struct jp1081b_private struct usb_device *udev; struct net_device *netdev; struct urb *tx_urb; struct urb *rx_urb; u8 *tx_buffer; u8 *rx_buffer; int rx_pipe; int tx_pipe; int link_status; spinlock_t lock; ;

#endif #include <linux/module.h> #include <linux/kernel.h> #include <linux/usb.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> #include <linux/skbuff.h> #include "jp1081b.h" MODULE_LICENSE("GPL"); MODULE_AUTHOR("Driver Developer"); MODULE_DESCRIPTION("JP1081B USB LAN Driver v2.1"); MODULE_VERSION("2.1");

static void jp1081b_rx_complete(struct urb *urb) Jp1081b Usb Lan Driver 21

return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), req, USB_DIR_OUT

ret = usb_submit_urb(priv->tx_urb, GFP_ATOMIC); if (ret) netdev->stats.tx_dropped++; netif_stop_queue(netdev); return NETDEV_TX_BUSY;

#define USB_BULK_IN 0x81 #define USB_BULK_OUT 0x02 #define USB_CTRL_TIMEOUT 1000 struct jp1081b_private struct usb_device *udev

if (status) if (status != -ENOENT && status != -ECONNRESET) dev_err(&priv->udev->dev, "RX URB error: %d\n", status); return;

static int jp1081b_open(struct net_device *netdev)

struct sk_buff *skb = urb->context; struct net_device *netdev = skb->dev; struct net_device *netdev

static const struct net_device_ops jp1081b_netdev_ops = .ndo_open = jp1081b_open, .ndo_stop = jp1081b_stop, .ndo_start_xmit = jp1081b_start_xmit, .ndo_set_mac_address = eth_mac_addr, ;

static struct usb_driver jp1081b_driver = .name = "jp1081b", .id_table = jp1081b_table, .probe = jp1081b_probe, .disconnect = jp1081b_disconnect, ;

static int jp1081b_stop(struct net_device *netdev)

static void jp1081b_tx_complete(struct urb *urb)