Linux Network Device Driver Programming

by wyi12 on 2008-08-15 01:02:13

This only discusses the general writing approach for network device drivers. The relevant code related to hardware is omitted due to differences in hardware specifications. If there are any errors or areas that need supplementation, everyone's feedback is welcome.

1. Loading and Unloading of Driver Modules

If the network device (including wireless) complies with the PCI specification, the first step is to register the PCI device with the kernel (`pci_register_driver`). Then, the detection function pointed to by the `probe` function pointer in the `pci_driver` data structure initializes the PCI device and simultaneously registers and initializes the network device.

If the network...