]> 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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 May 2011 16:19:49 +0000 (09:19 -0700)
commit9ec3e481f696880fd11e24ff54da6252d3d1a986
tree4282e1b6511d83fd6bfe940bc701946c39113917
parentf8317705c4db3eaa68c9a9a7dd7dfc321f8057f3
iwlegacy: fix tx_power initialization

commit 332704a51498a7e29aa92c19dc03f11f80b71bfe upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-3945-hw.h
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-eeprom.c
drivers/net/wireless/iwlwifi/iwl3945-base.c