Develop process in Linux ath10k driver with LEDE

ath repo: https://bitbucket.org/mlouielu/ath

LEDE repo: https://github.com/lede-project/source, commit: 99be4170cb27e

ath repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.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: https://gist.github.com/mlouielu/cdd43d13e316c270b00d1a8c238c4834

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

192.168.1.1

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

Then it will apply then change you provide.

EDIT:

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

如果你覺得這篇文章不錯,歡迎打賞 IOTA:RFHEIVXVIZWJFXTZORZZRCMHZF9PSGFUFWAAKXTFNZE9JQUY9HFQREJYYSPSXDRLECKXCAQQDOMSMYJYDKPCKWXBKD

Leave a reply:

Your email address will not be published.