]> git.baikalelectronics.ru Git - kernel.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)
commit3d0e877e86db06f79ad0ef2cde83bf23e72f7ecf
treebb8a60d17d317516b8f266947ac9494c9c0ad1ee
parentc7c59e6e0c315a14a332552ef342989d605f4327
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