aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2008-06-30 05:23:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-02 15:48:32 -0400
commit5225640bbe397fea3f38031c53641aaaf11115a8 (patch)
tree5034139fb100910b83b8205768d01a8e34b2dcb1 /drivers/net/wireless/iwlwifi/iwl-rx.c
parent914233d68f07d5d9c22630cd5a84fdfd98f39da2 (diff)
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.c11
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)
557void iwl_rx_statistics(struct iwl_priv *priv, 557void iwl_rx_statistics(struct iwl_priv *priv,
558 struct iwl_rx_mem_buffer *rxb) 558 struct iwl_rx_mem_buffer *rxb)
559{ 559{
560 int change;
560 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; 561 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
561 562
562 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n", 563 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n",
563 (int)sizeof(priv->statistics), pkt->len); 564 (int)sizeof(priv->statistics), pkt->len);
564 565
566 change = ((priv->statistics.general.temperature !=
567 pkt->u.stats.general.temperature) ||
568 ((priv->statistics.flag &
569 STATISTICS_REPLY_FLG_FAT_MODE_MSK) !=
570 (pkt->u.stats.flag & STATISTICS_REPLY_FLG_FAT_MODE_MSK)));
571
565 memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics)); 572 memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
566 573
567 set_bit(STATUS_STATISTICS, &priv->status); 574 set_bit(STATUS_STATISTICS, &priv->status);
@@ -581,8 +588,8 @@ void iwl_rx_statistics(struct iwl_priv *priv,
581 588
582 iwl_leds_background(priv); 589 iwl_leds_background(priv);
583 590
584 if (priv->cfg->ops->lib->temperature) 591 if (priv->cfg->ops->lib->temperature && change)
585 priv->cfg->ops->lib->temperature(priv, &pkt->u.stats); 592 priv->cfg->ops->lib->temperature(priv);
586} 593}
587EXPORT_SYMBOL(iwl_rx_statistics); 594EXPORT_SYMBOL(iwl_rx_statistics);
588 595