iwlwifi: separate led function from statistic notification
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 23 Oct 2009 20:42:22 +0000 (13:42 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Oct 2009 20:49:59 +0000 (16:49 -0400)
Detach led background task from statistic notification routine. if led
blinking is required; the blink rate is based on the traffic condition.
It do not relate to statistics notification. In addition to that, there is
not a requirement for statistics notification has to occur all the time.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-rx.c

index 7142aa5dbdb550b3665e14cb910ec15682d87b64..269b9889e39e5bde5f98294f2800ca9f23ef88f7 100644 (file)
@@ -359,8 +359,6 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv,
                     le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
 
        memcpy(&priv->statistics_39, pkt->u.raw, sizeof(priv->statistics_39));
-
-       iwl_leds_background(priv);
 }
 
 /******************************************************************************
index 64d918787e885302338e61ffd9ee5f0527a17e74..a34acb7e44c32ba479a9487c61f6fb6b71f5d3a3 100644 (file)
@@ -1019,6 +1019,7 @@ 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);
        }
 
@@ -1220,6 +1221,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
                                    CSR_INT_PERIODIC_ENA);
 
                priv->isr_stats.rx++;
+               iwl_leds_background(priv);
        }
 
        if (inta & CSR_INT_BIT_FH_TX) {
index 0a407f79de01dd66e9a29e26514d80fa19e38aea..cfc31ae4712bf381c05d1a0860d1f6c5fd90c351 100644 (file)
@@ -627,9 +627,6 @@ void iwl_rx_statistics(struct iwl_priv *priv,
                iwl_rx_calc_noise(priv);
                queue_work(priv->workqueue, &priv->run_time_calib_work);
        }
-
-       iwl_leds_background(priv);
-
        if (priv->cfg->ops->lib->temp_ops.temperature && change)
                priv->cfg->ops->lib->temp_ops.temperature(priv);
 }