aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.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/iwl-3945.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/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index e116ed77c5a..eb30819cddc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -358,6 +358,8 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl3945_rx_mem_b
358 358
359 memcpy(&priv->statistics, pkt->u.raw, sizeof(priv->statistics)); 359 memcpy(&priv->statistics, pkt->u.raw, sizeof(priv->statistics));
360 360
361 iwl3945_led_background(priv);
362
361 priv->last_statistics_time = jiffies; 363 priv->last_statistics_time = jiffies;
362} 364}
363 365
@@ -640,6 +642,10 @@ static void iwl3945_handle_data_packet(struct iwl3945_priv *priv, int is_data,
640 if (priv->add_radiotap) 642 if (priv->add_radiotap)
641 iwl3945_add_radiotap(priv, rxb->skb, rx_hdr, stats); 643 iwl3945_add_radiotap(priv, rxb->skb, rx_hdr, stats);
642 644
645#ifdef CONFIG_IWL3945_LEDS
646 if (is_data)
647 priv->rxtxpackets += len;
648#endif
643 ieee80211_rx_irqsafe(priv->hw, rxb->skb, stats); 649 ieee80211_rx_irqsafe(priv->hw, rxb->skb, stats);
644 rxb->skb = NULL; 650 rxb->skb = NULL;
645} 651}