]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlegacy: fix tx_power initialization
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 13 Apr 2011 08:56:51 +0000 (10:56 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 13 Apr 2011 19:09:53 +0000 (15:09 -0400)
commit332704a51498a7e29aa92c19dc03f11f80b71bfe
tree27b15e8fda9c070784d820cc98fd5985a475e88e
parent50f6871218802be528961e24487f00c203a5c3c7
iwlegacy: fix tx_power initialization

priv->tx_power_next is not initialized to max supported power,
but instead default value is used, what cause errors like

[   58.597834] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   58.597839] iwl3945 0000:03:00.0: Error setting Tx power (-22).

if maximum tx power read from the eeprom is smaller than default.
In consequence card is unable to initialize properly. Fix the problem
and cleanup tx power initialization.

Reported-and-tested-by: Robin Dong <hao.bigrat@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/iwl-3945-hw.h
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-eeprom.c
drivers/net/wireless/iwlegacy/iwl3945-base.c
drivers/net/wireless/iwlegacy/iwl4965-base.c