aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-10-02 16:44:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:45 -0400
commite932a609e9759cc75db0c234f465a5fd6e20d362 (patch)
treefb4f7d072aa527204f7db4fd11b155e3b12e0b74 /drivers/net/wireless/iwlwifi/iwl-3945.c
parentbe1a71a128ed91372d4ad8d54d8fd972a1a356eb (diff)
iwlwifi: LED cleanup
The iwlwifi drivers have LED blinking requirements that mac80211 cannot fulfill due to the use of just a single LED instead of different ones for TX, RX, radio etc. Instead, the single LED blinks according to transfers and is solid on the rest of the time. As such, having LED class devices registered that mac80211 triggers are connected to is pointless as we don't use the triggers anyway. Remove all the useless code and add hooks into the driver itself. At the same time, make the LED code abstracted so the core code that determines blink rate etc. can be shared between 3945 and agn in iwlcore. At the same time, the fact that we removed the use of the mac80211 LED triggers means we can also remove the IWLWIFI_LEDS Kconfig symbol since the LED support is now self-contained. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 33e40c21eb7..f0ce5c45ca0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -46,7 +46,8 @@
46#include "iwl-eeprom.h" 46#include "iwl-eeprom.h"
47#include "iwl-helpers.h" 47#include "iwl-helpers.h"
48#include "iwl-core.h" 48#include "iwl-core.h"
49#include "iwl-agn-rs.h" 49#include "iwl-led.h"
50#include "iwl-3945-led.h"
50 51
51#define IWL_DECLARE_RATE_INFO(r, ip, in, rp, rn, pp, np) \ 52#define IWL_DECLARE_RATE_INFO(r, ip, in, rp, rn, pp, np) \
52 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ 53 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
@@ -359,7 +360,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv,
359 360
360 memcpy(&priv->statistics_39, pkt->u.raw, sizeof(priv->statistics_39)); 361 memcpy(&priv->statistics_39, pkt->u.raw, sizeof(priv->statistics_39));
361 362
362 iwl3945_led_background(priv); 363 iwl_leds_background(priv);
363 364
364 priv->last_statistics_time = jiffies; 365 priv->last_statistics_time = jiffies;
365} 366}
@@ -572,10 +573,6 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,
572 (struct ieee80211_hdr *)rxb->skb->data, 573 (struct ieee80211_hdr *)rxb->skb->data,
573 le32_to_cpu(rx_end->status), stats); 574 le32_to_cpu(rx_end->status), stats);
574 575
575#ifdef CONFIG_IWLWIFI_LEDS
576 if (ieee80211_is_data(hdr->frame_control))
577 priv->rxtxpackets += len;
578#endif
579 iwl_update_stats(priv, false, hdr->frame_control, len); 576 iwl_update_stats(priv, false, hdr->frame_control, len);
580 577
581 memcpy(IEEE80211_SKB_RXCB(rxb->skb), stats, sizeof(*stats)); 578 memcpy(IEEE80211_SKB_RXCB(rxb->skb), stats, sizeof(*stats));
@@ -2880,6 +2877,7 @@ static struct iwl_ops iwl3945_ops = {
2880 .lib = &iwl3945_lib, 2877 .lib = &iwl3945_lib,
2881 .hcmd = &iwl3945_hcmd, 2878 .hcmd = &iwl3945_hcmd,
2882 .utils = &iwl3945_hcmd_utils, 2879 .utils = &iwl3945_hcmd_utils,
2880 .led = &iwl3945_led_ops,
2883}; 2881};
2884 2882
2885static struct iwl_cfg iwl3945_bg_cfg = { 2883static struct iwl_cfg iwl3945_bg_cfg = {