diff options
author | Zhu Yi <yi.zhu@intel.com> | 2008-06-30 17:23:31 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-02 15:48:32 -0400 |
commit | 5225640bbe397fea3f38031c53641aaaf11115a8 (patch) | |
tree | 5034139fb100910b83b8205768d01a8e34b2dcb1 /drivers/net/wireless/iwlwifi/iwl-rx.c | |
parent | 914233d68f07d5d9c22630cd5a84fdfd98f39da2 (diff) | |
download | blackbird-op-linux-5225640bbe397fea3f38031c53641aaaf11115a8.tar.gz blackbird-op-linux-5225640bbe397fea3f38031c53641aaaf11115a8.zip |
iwlwifi: fix iwl4965 temperature callback calibration issue
The patch fixes the temperature calibration issue introduced by the
patch "iwlwifi: move RX stats to core, and move temperature to handler".
It also remove the second parameter "stats" since it is already copied
to priv->statistics.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 0c734fd529ac..3e8500ecf598 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c @@ -557,11 +557,18 @@ static void iwl_rx_calc_noise(struct iwl_priv *priv) void iwl_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) { + int change; struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n", (int)sizeof(priv->statistics), pkt->len); + change = ((priv->statistics.general.temperature != + pkt->u.stats.general.temperature) || + ((priv->statistics.flag & + STATISTICS_REPLY_FLG_FAT_MODE_MSK) != + (pkt->u.stats.flag & STATISTICS_REPLY_FLG_FAT_MODE_MSK))); + memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics)); set_bit(STATUS_STATISTICS, &priv->status); @@ -581,8 +588,8 @@ void iwl_rx_statistics(struct iwl_priv *priv, iwl_leds_background(priv); - if (priv->cfg->ops->lib->temperature) - priv->cfg->ops->lib->temperature(priv, &pkt->u.stats); + if (priv->cfg->ops->lib->temperature && change) + priv->cfg->ops->lib->temperature(priv); } EXPORT_SYMBOL(iwl_rx_statistics); |