What wireless driver am I using?

Im trying to find the most suitable driver for my network USB device in Ubuntu 11.10. First, where can I check the driver that ubuntu is using to control this device? It appears as interface wireless (wlan1) in Network Tools, but apart from the MAC address and some statistics about data transmission, there's no info about the driver.

I'd already installed aircrack-ng, which provides several options to scan networks. Running airmon-ng start wlan1in terminal I get the following:

Interface   Chipset     Driver

eth1        Unknown         wl

wlan1       Unknown     rt2800usb - [phy2]
                                    (monitor mode enabled on mon0)

The wireless adapter is TP-LINK model TL-WN7200ND, and the wireless panel reads it as a RaLink adapter. Seems that rt2800usb is the driver for the adapter, but is there anything more powerful for this device??


Solution 1:

You can get a lot of cool information by poking around /sys. /sys/class has entries for every class of device your linux install is equipped to handle. The driver info is found at this path:

$ ls /sys/class/net/wlan0/device/driver/module/drivers
pci:ath5k@

My wifi card, named wlan0, is using the ath5k driver. Here's the driver info for one of my ethernet cards:

$ ls /sys/class/net/eth1/device/driver/module/drivers
pci:forcedeth@

As an aside, Ubuntu (like most linux distros) includes device drivers as kernel modules. The kernel is the big piece of software that runs your computer hardware. Ubuntu loads modules for your hardware based on what it senses you have. You can get a list of loaded modules by running this command: lsmod. Here's a snippet of my lsmod output:

bluetooth             130968  0 
ath5k                 127724  0 
ath                    11990  1 ath5k
eeepc_laptop           12412  0 
sparse_keymap           2660  1 eeepc_laptop
mac80211              196283  1 ath5k
pci_hotplug            22072  1 eeepc_laptop
cfg80211              142540  3 ath5k,ath,mac80211
rfkill                 12470  3 bluetooth,eeepc_laptop,cfg80211
crc16                   1091  2 bluetooth,ext4

The left column is a list of loaded modules, the right-most column shows what modules they in turn use. As you can see, these all use or are related to the ath5k module.