iwlwifi: control led while update tx/rx bytes counts
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 20 Nov 2009 20:04:54 +0000 (12:04 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 23 Nov 2009 22:05:30 +0000 (17:05 -0500)
LED blinking rate is based on tx/rx traffic, the most reasonable place
to do it is after update the traffic byte counts

This fixes the recent LED blinking breakage on 3945 introduced by "iwlwifi:
separate led function from statistic notification"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h

index a4e8db35a559638bdafadc283c373f97737e9930..c41ec5e258b18dd329727fd96997441b7c0d49bd 100644 (file)
@@ -1078,7 +1078,6 @@ static void iwl_irq_tasklet_legacy(struct iwl_priv *priv)
        if (inta & (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX)) {
                iwl_rx_handle(priv);
                priv->isr_stats.rx++;
-               iwl_leds_background(priv);
                handled |= (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX);
        }
 
@@ -1287,7 +1286,6 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
                                    CSR_INT_PERIODIC_ENA);
 
                priv->isr_stats.rx++;
-               iwl_leds_background(priv);
        }
 
        /* This "Tx" DMA channel is used only for loading uCode */
index c25cab5d0451f5bd943a7e652d409c1ab9547906..7ac6b369890af27595e80a6c8b13df204162a45e 100644 (file)
@@ -3187,6 +3187,7 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
                stats->data_cnt++;
                stats->data_bytes += len;
        }
+       iwl_leds_background(priv);
 }
 EXPORT_SYMBOL(iwl_update_stats);
 #endif
index 584a376b96c5f16d1de13ed6734236f7ae7f1319..f271663c1d2ff02cf9415bf08a59614175505ac3 100644 (file)
@@ -390,6 +390,7 @@ static inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx,
                /* data */
                stats->data_bytes += len;
        }
+       iwl_leds_background(priv);
 }
 #endif
 /*****************************************************