Ubuntu 12.04 – Updating Wifi Drivers

That’s what we’re going to do; add the device ID to the driver files and compile a new version. Please be sure you have a wired ethernet connection and do:

sudo apt-get install linux-headers-generic build-essential

Now go here and download compat-wireless-2.6.tar.bz2 to your desktop. http://linuxwireless.org/

 

When you have the file on your desktop, right-click it and select Extract Here. Open the folder it extracts and drill down to drivers/net/wireless/ath/ath9k. Open the file pci.c with any text editor such as gedit. Add your device ID as follows:

static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {

{ PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI */

{ PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */

{ PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */

{ PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */

{ PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */

{ PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */

{ PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */

{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */

{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */

{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E AR9300 */

{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */

{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */

{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */

{ PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E */

{ 0 }

};

Caution! Spacing, punctuation, etc. are crucial. Proofread twice before saving and closing gedit. All the text before and after the line I’ve highlighted remains unchanged.

 In the file drivers/net/wireless/ath/ath9k/hw.c, change around line 680 as I’ve highlighted:

case AR9300_DEVID_AR9485_PCIE:

case AR9300_DEVID_AR9330:

case AR9300_DEVID_AR9340:

case AR9300_DEVID_AR9580:

case AR9300_DEVID_AR9462:

case AR9485_DEVID_AR1111:

break;

default:

if (common->bus_ops->ath_bus_type == ATH_USB)

break;

Also modify drivers/net/wireless/ath/ath9k/hw.h around line 51 as highlighted:

#define AR9300_DEVID_AR9340 0x0031

#define AR9300_DEVID_AR9485_PCIE 0x0032

#define AR9300_DEVID_AR9580 0x0033

#define AR9300_DEVID_AR9462 0x0034

#define AR9300_DEVID_AR9330 0x0035

#define AR9485_DEVID_AR1111 0x0037

 

#define AR5416_AR9100_DEVID 0x000b

 

#define AR_SUBVENDOR_ID_NOG 0x0e11

#define AR_SUBVENDOR_ID_NEW_A 0x7065

#define AR5416_MAGIC 0x19641014

Now we recompile:

cd Desktop/compat-wireless-2012-05-10

sudo su

./scripts/driver-select restore

./scripts/driver-select ath9k

make clean

make

make install

exit

Reboot

Bad Behavior has blocked 162 access attempts in the last 7 days.