Search Linux Wireless

[PATCH] fix iwl3945 tx power setting in iwl3945_init_drv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Robin Dong <sanbai@xxxxxxxxxx>

When I build and run the kernel-2.6.39-rc2 on my laptop, my intel-3945-a/b/g wireless
card will not work and the dmesg is:

[   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).
[   58.598276] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   58.598279] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[   94.064147] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   94.064152] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[   94.064529] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[   94.064533] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[  133.892160] sky2 0000:02:00.0: eth1: disabling interface
[  473.313935] sky2 0000:02:00.0: eth1: enabling interface
[  473.314238] ADDRCONF(NETDEV_UP): eth1: link is not ready
[  473.383740] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[  473.383748] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[  473.384146] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[  473.384153] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[  473.455655] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[  473.455663] iwl3945 0000:03:00.0: Error setting Tx power (-22).
[  473.456128] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14.
[  473.456134] iwl3945 0000:03:00.0: Error setting Tx power (-22).

It is weird the iwl3945 set txpower 15 above limit 14.
So I checked iwl4965 and iwl3945 driver and found out it will set 
tx_power_next to 0 in "iwl4965_init_drv" but to 15 in "iwl3945_init_drv"
I change tx_power_next=0 in "iwl3945_init_drv", and my wireless card works.

Signed-off-by: Robin Dong <sanbai@xxxxxxxxxx>
---
 drivers/net/wireless/iwlegacy/iwl-3945-hw.h  |    2 +-
 drivers/net/wireless/iwlegacy/iwl3945-base.c |    4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h index 779d3cb..21438ee 100644
--- a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
+++ b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h
@@ -74,7 +74,7 @@
 /* RSSI to dBm */
 #define IWL39_RSSI_OFFSET	95
 
-#define IWL_DEFAULT_TX_POWER	0x0F
+#define IWL3945_TX_POWER_TARGET_POWER_MIN	(0)
 
 /*
  * EEPROM related constants, enums, and structures.
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index 28eb3d8..91ed03b 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -3826,8 +3826,8 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
 		IWL_DELAY_NEXT_FORCE_FW_RELOAD;
 
 
-	priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER;
-	priv->tx_power_next = IWL_DEFAULT_TX_POWER;
+	priv->tx_power_user_lmt = IWL3945_TX_POWER_TARGET_POWER_MIN;
+	priv->tx_power_next = IWL3945_TX_POWER_TARGET_POWER_MIN;
 
 	if (eeprom->version < EEPROM_3945_EEPROM_VERSION) {
 		IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n",
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux