Update the ath9k wireless driver

The steps below can be followed to update the ath9k to the latest backports driver. The example is given for version 3.18.1, but the steps can be repeated for any version.

After updating the ath9k driver, please make sure everything still works as desired. For example, v3.17.1 is known to cause issues when using click modular router to inject packets.

sudo -s
wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.18.1/backports-3.18.1-1.tar.xz
tar -xJf backports-3.18.1-1.tar.xz
cd backports-3.18.1-1/
cd drivers/net/wireless/ath/
#the steps below will make sure the ath9k driver uses the correct regulatory restrictions for your country
wget --no-check-certificate https://dev.openwrt.org/export/32952/trunk/package/mac80211/patches/403-ath_regd_optional.patch
patch -Np5 -i 403-ath_regd_optional.patch
echo "#define ATH_USER_REGD 1" | cat - regd.c > /tmp/out && mv /tmp/out regd.c
cd -
make defconfig-ath9k
make install

After reboot, check if your new driver is correctly installed by issuing the command below, which should result in showing you the correct backports version on the first output line.

modinfo ath9k