]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ath5k: Fix range scaling when setting rate power table
authorNick Kossifidis <mickflemm@gmail.com>
Sun, 5 Aug 2012 19:35:34 +0000 (22:35 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Aug 2012 19:26:55 +0000 (15:26 -0400)
commit755051993bfcdf07acd84a7ffd08d463b85bfd69
treebb8a60d17d317516b8f266947ac9494c9c0ad1ee
parentd12c5c53ce4c8c65c694d1103673182ef5afdc65
ath5k: Fix range scaling when setting rate power table

rates[i] is unsigned but txp_offset can be negative for newer parts
with PDADC table. We cover the case when rates[i] + txp_offset > 63
but we must also cover the case when its < 0 or else rates[i] will overflow.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/phy.c