aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2008-03-25 19:33:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-27 16:03:16 -0400
commitab53d8af6772b22d4d68b1bcd74f7a5dba693983 (patch)
tree599c6682d75e15b30af9bf994595e7d5eed5c3ac /drivers/net/wireless/iwlwifi/iwl3945-base.c
parente0e0a67e44ce13e34f553b6ab6377560fa9813f1 (diff)
iwlwifi: Add led support
This patch add LEDS support to 3965 and 4965 drivers. It is based on led trigger and class. For our drivers we needed to avoid two things. 1- We receive led trigger on/off on each Rx\Tx frame. In our driver we can not call led command like that. In this driver once driver receive a start of traffic it call the led command to start blinking then we count all bytes of Tx and Rx frame, after two second we count the blink rate of last two second then id blink rate changed we call the led commands 2- Since we can call led command very often, we make sure we call the led command after we receive the statistics notification so we don't need to wake up the ucode id it is in sleep state. This patch was tested with 4965 and 3945. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Ian Schram<ischram@telenet.be> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 4ba959153cb1..470a9abf12c3 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2481,8 +2481,12 @@ static void iwl3945_build_tx_cmd_basic(struct iwl3945_priv *priv,
2481 cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(3); 2481 cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(3);
2482 else 2482 else
2483 cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(2); 2483 cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(2);
2484 } else 2484 } else {
2485 cmd->cmd.tx.timeout.pm_frame_timeout = 0; 2485 cmd->cmd.tx.timeout.pm_frame_timeout = 0;
2486#ifdef CONFIG_IWL3945_LEDS
2487 priv->rxtxpackets += le16_to_cpu(cmd->cmd.tx.len);
2488#endif
2489 }
2486 2490
2487 cmd->cmd.tx.driver_txop = 0; 2491 cmd->cmd.tx.driver_txop = 0;
2488 cmd->cmd.tx.tx_flags = tx_flags; 2492 cmd->cmd.tx.tx_flags = tx_flags;
@@ -5855,6 +5859,8 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
5855 IWL_DEBUG_INFO("ALIVE processing complete.\n"); 5859 IWL_DEBUG_INFO("ALIVE processing complete.\n");
5856 wake_up_interruptible(&priv->wait_command_queue); 5860 wake_up_interruptible(&priv->wait_command_queue);
5857 5861
5862 iwl3945_led_register(priv);
5863
5858 if (priv->error_recovering) 5864 if (priv->error_recovering)
5859 iwl3945_error_recovery(priv); 5865 iwl3945_error_recovery(priv);
5860 5866
@@ -5879,6 +5885,7 @@ static void __iwl3945_down(struct iwl3945_priv *priv)
5879 if (!exit_pending) 5885 if (!exit_pending)
5880 set_bit(STATUS_EXIT_PENDING, &priv->status); 5886 set_bit(STATUS_EXIT_PENDING, &priv->status);
5881 5887
5888 iwl3945_led_unregister(priv);
5882 iwl3945_clear_stations_table(priv); 5889 iwl3945_clear_stations_table(priv);
5883 5890
5884 /* Unblock any waiting calls */ 5891 /* Unblock any waiting calls */