I recently bought TP-LINK TL-WN722n wi-fi usb dongle with atheros ar9271 chipset which is not currently supported by BackTrack. The drivers came up with the last compat-wireless realease (driver's name is ath9k_htc). So I downloaded compat-wireless-2010-03-28 but I'm having trouble installing them in BackTrack 4 final.

Here is the driver's page

What I did is:

1. Downloaded the firmware (ar9271.fw) and copied it in /lib/firmware/
2. Extracted compat-wireless and run "make" from its directory

Code:
root@bt:~/compat-wireless-2010-03-28# make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'

  WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
           is missing; modules will have no dependencies and modversions.

		(...)

  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/gpio.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/init.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/main.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/recv.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/xmit.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/virtual.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/rc.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/pci.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.o
/root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.c: In function ‘ath9k_cmn_rx_skb_preprocess’:
/root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/common.c:215: warning: ‘noise’ is deprecated (declared at /root/compat-wireless-2010-03-

28/include/net/mac80211.h:564)
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_hst.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/hif_usb.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/wmi.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_txrx.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_main.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_beacon.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/htc_drv_init.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/hw.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_def.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_4k.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/eeprom_9287.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/calib.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ani.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/phy.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/btcoex.o
  CC [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/mac.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.o

		(...)

Building modules, stage 2.

  CC      /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.mod.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.ko
  CC      /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.mod.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
  CC      /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.mod.o
  LD [M]  /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
There seems to be an error in common.o af ath9k, but ath9k_htc seems OK.
Next I install the drivers

3. sudo make install

Code:
root@bt:~/compat-wireless-2010-03-28# sudo make install

		(...)

make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.30.9'

  WARNING: Symbol version dump /usr/src/linux-source-2.6.30.9/Module.symvers
           is missing; modules will have no dependencies and modversions.

  Building modules, stage 2.
  MODPOST 86 modules
make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
make -C /lib/modules/2.6.30.9/build M=/root/compat-wireless-2010-03-28 "INSTALL_MOD_DIR=updates"  \
                modules_install

		(...)

  INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k.ko
  INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_common.ko
  INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
  INSTALL /root/compat-wireless-2010-03-28/drivers/net/wireless/ath/ath9k/ath9k_hw.ko

		(...)

make[1]: Leaving directory `/usr/src/linux-source-2.6.30.9'
Updating Ubuntu's initramfs for 2.6.31-wl under /boot/ ...
Cannot find /lib/modules/2.6.31-wl
Will now run update-grub to ensure grub will find the new initramfs ...
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found: /boot/grub/splash.xpm.gz
Found kernel: /boot/vmlinuz-2.6.30.9
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done


Note: madwifi detected, we're going to disable it. If you would like to enable it later you can run:
    sudo athenable madwifi

Running athenable ath5k...
Disabling ath_pci ...   [OK]    Module disabled:
/lib/modules/2.6.30.9/net/ath_pci.ko
depmod will prefer updates/ over kernel/ -- OK!

Currently detected wireless subsystem modules:

		(...)

/lib/modules/2.6.30.9/updates/net/wireless/lib80211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/adm8211.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ar9170/ar9170usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/at76c50x-usb.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
/lib/modules/2.6.30.9/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
4. Unload currently running drivers.

Code:
root@bt:~/compat-wireless-2010-03-28# sudo make unload
5. Try to load the ath9k_htc module using modprobe

Code:
root@bt:~/compat-wireless-2010-03-28# modprobe ath9k_htc
nothing happens

Code:
root@bt:~/compat-wireless-2010-03-28# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.
6. Try to load them using the inbuild load command

Code:
root@bt:~/compat-wireless-2010-03-28# sudo make load
Stoping bluetooth service..
Stopping bluetooth: bluetoothd.
* bluetooth is not running.
Unloading ath9k...
Unloading ath...
FATAL: Module ath is in use.
Unloading mac80211...
FATAL: Module mac80211 is in use.
Unloading cfg80211...
FATAL: Module cfg80211 is in use.
Unloading rfcomm...

		(...)

Module ath_pci not detected -- this is fine
ath5k loaded successfully
ath9k loaded successfully
Module bcm43xx not detected -- this is fine
Disabling wl ...        [OK]    Module disabled:
/lib/modules/2.6.30.9/kernel/net/wireless/wl.ko
FATAL: Error inserting b43 (/lib/modules/2.6.30.9/updates/drivers/net/wireless/b43/b43.ko): Unknown symbol in module, or unknown parameter (see dmesg)
b43 loaded successfully
b43legacy loaded successfully
Starting bluetooth service..
Starting bluetooth: bluetoothd.
bluetooth is running.
At this point there are two wireless adapters (I have an in-built one on the laptop) but they seem to be duplicated and they are not working at all - could not find any networks

Code:
root@bt:~/compat-wireless-2010-03-28# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
          Tx-Power=0 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

wlan1     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated
          Tx-Power=0 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

hwsim0    no wireless extensions.

pan0      no wireless extensions.
I don't have any idea what's wrong - please help - since I'm a linux newbie it could be somthing very obvious. I heard about kernel .conf file, installing kernel headers etc. but I have no idea what to do next. Thanx in advance...