drivers/net/usb/int51x1.c
Source file repositories/reference/linux-study-clean/drivers/net/usb/int51x1.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/usb/int51x1.c- Extension
.c- Size
- 3988 bytes
- Lines
- 157
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/ctype.hlinux/netdevice.hlinux/etherdevice.hlinux/ethtool.hlinux/slab.hlinux/mii.hlinux/usb.hlinux/usb/usbnet.h
Detected Declarations
function Copyrightfunction int51x1_bind
Annotated Snippet
static const struct net_device_ops int51x1_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_get_stats64 = dev_get_tstats64,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_rx_mode = usbnet_set_rx_mode,
};
static int int51x1_bind(struct usbnet *dev, struct usb_interface *intf)
{
int status = usbnet_get_ethernet_addr(dev, 3);
if (status)
return status;
dev->net->hard_header_len += INT51X1_HEADER_SIZE;
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
dev->net->netdev_ops = &int51x1_netdev_ops;
return usbnet_get_endpoints(dev, intf);
}
static const struct driver_info int51x1_info = {
.description = "Intellon usb powerline adapter",
.bind = int51x1_bind,
.rx_fixup = int51x1_rx_fixup,
.tx_fixup = int51x1_tx_fixup,
.set_rx_mode = usbnet_cdc_update_filter,
.in = 1,
.out = 2,
.flags = FLAG_ETHER,
};
static const struct usb_device_id products[] = {
{
USB_DEVICE(INT51X1_VENDOR_ID, INT51X1_PRODUCT_ID),
.driver_info = (unsigned long) &int51x1_info,
},
{},
};
MODULE_DEVICE_TABLE(usb, products);
static struct usb_driver int51x1_driver = {
.name = "int51x1",
.id_table = products,
.probe = usbnet_probe,
.disconnect = usbnet_disconnect,
.suspend = usbnet_suspend,
.resume = usbnet_resume,
.disable_hub_initiated_lpm = 1,
};
module_usb_driver(int51x1_driver);
MODULE_AUTHOR("Peter Holik");
MODULE_DESCRIPTION("Intellon usb powerline adapter");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/ctype.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/ethtool.h`, `linux/slab.h`, `linux/mii.h`, `linux/usb.h`.
- Detected declarations: `function Copyright`, `function int51x1_bind`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.