Develop process in Linux ath10k driver with LEDE

ath repo:

LEDE repo:, commit: 99be4170cb27e

ath repo: git://, commit: e72acb704e94


Modify ATH10k

Most of the time ath repo’s ath10k source code will surpass LEDE’s ath10k source code, you will need to know this and change the code when building got conflict.

The step I use is:

  1. Change code for ath10k driver
  2. git add drivers/net/wireless/ath/ath10k/*.c
  3. git add drivers/net/wireless/ath/ath10k/*.h
  4. git commit -m ‘ath10k: your modify describe’
  5. git format-patch -1

If you have more than 1 commit, you will need to use this:

git format-patch -3 --stdout > 999-ath10k.patch

number 3 should be changed as you need.

At the last step, copy patch file to LEDE directory:

cp 999-ath10k.patch ~/lede/package/kernel/mac80211/patches/999-ath10k.patch

When building LEDE, it will apply this patch onto it.

Building LEDE

config reference:

Copy config reference to your LEDE directory and change its name to .config.

Build LEDE by make -j8

After it finish, scp ath10k_pci.ko and ath10k_core.ko to LEDE:

$ scp build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/modules/4.9.73/ath10k_*.ko [email protected]:/lib/modules/4.9.73/

Reinsert module on LEDE

ssh onto LEDE

ssh [email protected]

remove and insert module on LEDE

$ rmmod ath10k_pci && rmmod ath10k_core && modprobe ath10k_pci

Open browser and enter

Go to Network -> Wireless and disable, then enable Generic MAC80211 802.11nac (radio0)

Then it will apply then change you provide.


We can let all these thing in one step:


Debug parameters

Some useful debug parameters can be found at: How to debug ath10k

Get MAC, HTT, DATA, PCI debug message in dmesg:

$ echo 0x00004219 > /sys/module/ath10k_core/parameters/debug_mask

Using ftrace to trace system function:

$ cd /sys/kernel/debug/tracing
$ grep 'ath10\|mac80211' available_filter_functions > set_ftrace_filter
$ cat trace
$ echo > trace

Setting ath10k parameters

$ cd /sys/module/ath10k_core/parameters/

$ echo 5 > /sys/module/ath10k_core/parameters/prio_sta_aid


BTH: 35QooNA82isrmQLmpEnqXpJoxeZmaPubPf



Leave a reply:

Your email address will not be published.

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料