Go back –> ath9k_hw documentation
initvals-tool
The initvals-tool is a userspace application used to:
- Get checksums of the initvals for the ath9k driver
- Reformat initval file output
- Synch the initvals from the Atheros HAL to ath9k
Get the initvals-tool code
There's a git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/initvals-tool.git
Checksumming initvals
Say you want to make some silly patch to the initvals and want to ensure you haven't broken the initvals. An easy way to verify the initvals keep their integrity is to compute a checksum of the initval arrays. A checksum will be computed for every array.
By default the checksums for all arrays for all hardware families will be computed. You can however specify the specific hardware family you want checksums for by using the -f flag.
Examples:
# Get the checksums for all arrays for al hardware families ./initvals # Only get checksums for the AR9002 family ./initvals -f ar9002 # Only get checksums for the AR9003 family ./initvals -f ar9003
There are 4 hardware families:
- ar5008
- ar9001
- ar9002
- ar9003
Reformat initval style
Depending on your OS you may or may not need the initvals in a specific format. The format can be changed by using this tool to read the original arrays and output the arrays under a new format.
Examples:
# Generate all the initvals into one large file ./initvals -w # Generate the initvals for the AR9002 family only ./initvals -w -f ar9002 # Generate the initvals for the AR9003 family only ./initvals -w -f ar9003
Synch initvals from the Atheros HAL
If you are an Atheros employee and want to synchronize changes made on the HAL onto ath9k you can use the initvals tool to generate a new initvals header for any specific hardware family. You will just need access to the Atheros .ini files and then compile this program with ATHEROS=1 as follows:
make clean make ATHEROS=1
You can then synch up the ath9k initvals by doing:
# To synch the AR5008 initvals ./initvals -w -f ar5008 > ar5008_initvals.h # To synch the AR9001 initvals ./initvals -w -f ar9001 > ar9001_initvals.h # To synch the AR9002 initvals ./initvals -w -f ar9002 > ar9002_initvals.h # To synch the AR9003 initvals ./initvals -w -f ar9003 > ar9003_initvals.h
You can then just cp the files into drivers/net/wireless/ath/ath9k/ and generate a respective patch for upstream inclusion.