移植usb无线网卡驱动

先介绍常用命令

lsusb 得到芯片信息

[root@RHEL5 ~]# lsusb
Bus 002 Device 003: ID 0cf3:1006 Atheros Communications, Inc.

  idVendor           0x0cf3 Atheros Communications, Inc.
  idProduct          0x1006

模块相关命令

modinfo rt73usb

modprobe

insmod

rmmod

 

一个内核配置例子,其他类似,可以查看选项的help了解关联

Enabling ath9k:

To enable ath9k, you must first enable mac80211:

Networking --->
Wireless --->
< M > Improved wireless configuration API
< M > Generic IEEE 802.11 Networking Stack (mac80211)

You can then enable ath9k in the kernel configuration under

Device Drivers --->
[*] Network device support --->
Wireless LAN --->
< M > Atheros 802.11n wireless cards support

---------------------------------------------------

常见芯片相对应的驱动

牌 nw330  驱动 8187B

[root@RHEL5 wireless]# grep "0bda" -rn .
./rtl818x/rtl8187_dev.c:47:     {USB_DEVICE(0x0bda, 0x8187), .driver_info = DEVICE_RTL8187},
./rtl818x/rtl8187_dev.c:48:     {USB_DEVICE(0x0bda, 0x8189), .driver_info = DEVICE_RTL8187B},
./rtl818x/rtl8187_dev.c:49:     {USB_DEVICE(0x0bda, 0x8197), .driver_info = DEVICE_RTL8187B},
./rtl818x/rtl8187_dev.c:50:     {USB_DEVICE(0x0bda, 0x8198), .driver_info = DEVICE_RTL8187B},

[root@RHEL5 linux-2.6.30.6]# modprobe rtl8187
[root@RHEL5 linux-2.6.30.6]# lsusb
Bus 002 Device 003: ID 0bda:8189 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0002 
Bus 001 Device 001: ID 1d6b:0001

--------------------------------------------------------------

牌:dynamode ,d-link  驱动 rt73usb

dynamode
[root@RHEL5 ~]# lsusb
Bus 002 Device 005: ID 148f:2573 Ralink Technology, Corp.

grep
rt2x00/rt73usb.c:2412: { USB_DEVICE(0x148f, 0x2573),
--------------------------------------------------
d-link
[root@RHEL5 ~]# lsusb
Bus 002 Device 005: ID 07d1:3c03 D-Link System

grep
rt2x00/rt73usb.c:2382: { USB_DEVICE(0x07d1, 0x3c03),

----------------------------------------------------------

牌:tenda   驱动 rt3070
[root@RHEL5 linux-2.6.30.6]# lsusb
Bus 002 Device 004: ID 148f:3070 Ralink Technology, Corp.
Bus 002 Device 001: ID 1d6b:0002 
Bus 001 Device 001: ID 1d6b:0001

---------------------------------------------------

 

ralinktech产品:
rt73和RT3070都有开源驱动
http://www.ralinktech.com.tw/support.php?s=2

 

ar9271没实现,还在开发中,tl-wn322g+ 和 mercury的都是这个芯片
http://linuxwireless.org/en/users/Drivers/ath9k_htc

---------------------------------------------------

 

 

另:

关于如何查看网卡芯片信息,可以参考以下文章

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wireless.html

5 How to identify a card

Let assume you already have a wireless card plugged in your PC, and want to know which one it is and which driver you need. Linux has usually a way to display a card identification, but this depend on the type of card.

If the card is an ISA card, you are usually out of luck.

If the card is a PCI card, you need to use the command "lspci" to display the card identification strings.

If the hardware is a USB dongle, you need to use the command "lsusb" to display the dongle identification strings. In some case, "lsusb" doesn't work (for example if usbfs is not mounted), and you can get the identification strings from the kernel log using "dmesg" (or in /var/log/messages).

If the card is a Cardbus card (32 bits Pcmcia), and if you are using kernel 2.6.X or kernel 2.4.X with the kernel Pcmcia subsystem, you need to use the command "lspci" to display the card identification strings. If the card is a Cardbus card (32 bits Pcmcia), and if you are using an older kernel with the standalone Pcmcia subsystem, you need to use the command "cardctl ident" display the card identification strings. Try both and see what comes out.

If the card is a true Pcmcia card (16 bits), and if you are using kernel 2.6.14 or later, you need to use the command "pccardctl ident" to display the card identification strings. If the card is a true Pcmcia card (16 bits), and if you are using an older kernel, you need to use the command "cardctl ident" display the card identification strings. Note that cardmgr will also write some identification strings in the message logs (/var/log/daemon.log) that may be different from the real card identification strings.

The card identification usually helps to identify the chipset inside the hardware, and in some other cases it does not, because the vendor has changed the identity. Once you have identified the chipset, it is usually straightforward to check if the hardware is supported and which driver to use.

Most Linux drivers knows about some of those card identifications, and will automatically bind to the hardware. It is usually simple to add new identification to a driver.

Jacek Pliszka recommend to get the FCC-ID written at the back of the hardware and to run it through the FCC database. He also recommend to check the Windows driver (both identification and file name) for some clues.

你可能感兴趣的:(移植usb无线网卡驱动)