aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.h
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/iwl-3945.h
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/iwl-3945.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 931c465f9e5e..e0655b988f44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -44,6 +44,7 @@ extern struct pci_device_id iwl3945_hw_card_ids[];
44#include "iwl-prph.h" 44#include "iwl-prph.h"
45#include "iwl-3945-hw.h" 45#include "iwl-3945-hw.h"
46#include "iwl-3945-debug.h" 46#include "iwl-3945-debug.h"
47#include "iwl-3945-led.h"
47 48
48/* Change firmware file name, using "-" and incrementing number, 49/* Change firmware file name, using "-" and incrementing number,
49 * *only* when uCode interface or architecture changes so that it 50 * *only* when uCode interface or architecture changes so that it
@@ -777,13 +778,15 @@ struct iwl3945_priv {
777 struct iwl3945_init_alive_resp card_alive_init; 778 struct iwl3945_init_alive_resp card_alive_init;
778 struct iwl3945_alive_resp card_alive; 779 struct iwl3945_alive_resp card_alive;
779 780
780#ifdef LED 781#ifdef CONFIG_IWL4965_LEDS
781 /* LED related variables */ 782 struct iwl3945_led led[IWL_LED_TRG_MAX];
782 struct iwl3945_activity_blink activity; 783 unsigned long last_blink_time;
783 unsigned long led_packets; 784 u8 last_blink_rate;
784 int led_state; 785 u8 allow_blinking;
786 unsigned int rxtxpackets;
785#endif 787#endif
786 788
789
787 u16 active_rate; 790 u16 active_rate;
788 u16 active_rate_basic; 791 u16 active_rate_basic;
789 792