A patch to enable ITS-G5 channels on ath9k and the Rock Pi 4.
Inspired by a post on Harrison's Sandbox
ath9k patch derived from content of this thread
Note: I had to reorder the channel list in net/wireless/db.txt to get the 5G-ITS frequencies to showup when the reg db is queried
Rock Pi 4 NGFF M.2 M Key to PCIE x4 adapter PCIE to mini PCIE adapter Ath9280 mini PC WIFI card
Based on instructions on the radxa wiki
Install the toolchain
$ wget https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
$ sudo tar xvf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz -C /opt/
Get the kernel source
$ git clone -b release-4.4-rockpi4 https://github.com/radxa/kernel.git
$ cd kernel
Copy in and apply the patch
$ path -p1 < rockchip_linux_ath9k_11p.patch
Configure and build the Kernel
$ export ARCH=arm64
$ export CROSS_COMPILE=/opt/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ make rockchip_linux_ath9k_11p_defconfig
$ make -j8
Build .deb packages
$ export build_id="999"
$ export lv="-$build_id-rockchip"
$ export kv=$(make kernelversion)
$ export debv="$kv$lv"
$ make bindeb-pkg -j8 LOCALVERSION=$lv KDEB_PKGVERSION=$debv
Copy linux-image-4.4.154-999-rockchip-_all.deb and linux-firmware-image-4.4.154-999-rockchip-_all.deb to your ROCK Pi 4 and install them
# dpkg -i linux-image-4.4.154-999-rockchip-*_all.deb linux-firmware-image-4.4.154-999-rockchip-*_all.deb
Reboot
# iw reg get
# iw dev wlp1s0 set type ocb
# ifconfig wlp1s0 up
# iw dev wlp1s0 ocb join 5900 10MHz