]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: Fix hanlding of maximum magnitude index
authorNick Kossifidis <mickflemm@gmail.com>
Wed, 29 Apr 2015 23:51:13 +0000 (23:51 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 9 May 2015 13:46:10 +0000 (16:46 +0300)
commitaf56f65b89c7c11f838202c4950d1b19d859c6db
treeec8eada5cefc408aeb484109cd5a3653f6c44b6a
parent353c74f963c93ba699db1cf399e6f33cf48a560c
ath9k: Fix hanlding of maximum magnitude index

Maximum magnitude index is a 5bit signed integer,
convert to an 8bit signed integer and then "shift" it so that it can be used
as an array index. Note that the current implementation adds +1 to the index
value (so it can't be used as an array index) and it's only valid for HT20
channels.

Note that the maximum magnitude index is not being used by
the userspace tools that parse FFT samples (they just use
maximum magnitude) so this doesn't break userspace compatibility.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/common-spectral.c
drivers/net/wireless/ath/ath9k/common-spectral.h