aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.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/iwl3945-base.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/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d0d1b7f4c396..ecbe036ecb63 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -455,9 +455,6 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
455 tx->timeout.pm_frame_timeout = cpu_to_le16(2); 455 tx->timeout.pm_frame_timeout = cpu_to_le16(2);
456 } else { 456 } else {
457 tx->timeout.pm_frame_timeout = 0; 457 tx->timeout.pm_frame_timeout = 0;
458#ifdef CONFIG_IWLWIFI_LEDS
459 priv->rxtxpackets += le16_to_cpu(cmd->cmd.tx.len);
460#endif
461 } 458 }
462 459
463 tx->driver_txop = 0; 460 tx->driver_txop = 0;
@@ -2483,7 +2480,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2483 2480
2484 iwl3945_reg_txpower_periodic(priv); 2481 iwl3945_reg_txpower_periodic(priv);
2485 2482
2486 iwl3945_led_register(priv); 2483 iwl_leds_init(priv);
2487 2484
2488 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 2485 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
2489 set_bit(STATUS_READY, &priv->status); 2486 set_bit(STATUS_READY, &priv->status);
@@ -2521,7 +2518,6 @@ static void __iwl3945_down(struct iwl_priv *priv)
2521 if (!exit_pending) 2518 if (!exit_pending)
2522 set_bit(STATUS_EXIT_PENDING, &priv->status); 2519 set_bit(STATUS_EXIT_PENDING, &priv->status);
2523 2520
2524 iwl3945_led_unregister(priv);
2525 iwl_clear_stations_table(priv); 2521 iwl_clear_stations_table(priv);
2526 2522
2527 /* Unblock any waiting calls */ 2523 /* Unblock any waiting calls */
@@ -3156,6 +3152,8 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
3156 * no need to poll the killswitch state anymore */ 3152 * no need to poll the killswitch state anymore */
3157 cancel_delayed_work(&priv->rfkill_poll); 3153 cancel_delayed_work(&priv->rfkill_poll);
3158 3154
3155 iwl_led_start(priv);
3156
3159 priv->is_open = 1; 3157 priv->is_open = 1;
3160 IWL_DEBUG_MAC80211(priv, "leave\n"); 3158 IWL_DEBUG_MAC80211(priv, "leave\n");
3161 return 0; 3159 return 0;