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:
- Change code for ath10k driver
- git add drivers/net/wireless/ath/ath10k/*.c
- git add drivers/net/wireless/ath/ath10k/*.h
- git commit -m ‘ath10k: your modify describe’
- 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
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:
1 |
$ rmmod ath10k_pci && rmmod ath10k_core && modprobe ath10k_pci && wifi down radio0 && wifi up radio0 |
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
Leave a Reply