Skip to content

Commit

Permalink
iwlwifi: control led while update tx/rx bytes counts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Nov 23, 2009
1 parent 74ba67e commit d5f4cf7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*****************************************************
Expand Down

0 comments on commit d5f4cf7

Please sign in to comment.