Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103299
b: refs/heads/master
c: 5225640
h: refs/heads/master
i:
  103297: 9ee7bda
  103295: bb342bf
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Jul 2, 2008
1 parent c30fa71 commit 5ee483a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 914233d68f07d5d9c22630cd5a84fdfd98f39da2
refs/heads/master: 5225640bbe397fea3f38031c53641aaaf11115a8
14 changes: 1 addition & 13 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,21 +1879,9 @@ static int iwl4965_is_temp_calib_needed(struct iwl_priv *priv)
return 1;
}

static void iwl4965_temperature_calib(struct iwl_priv *priv,
struct iwl_notif_statistics *stats)
static void iwl4965_temperature_calib(struct iwl_priv *priv)
{
s32 temp;
int change = ((priv->statistics.general.temperature !=
stats->general.temperature) ||
((priv->statistics.flag &
STATISTICS_REPLY_FLG_FAT_MODE_MSK) !=
(stats->flag & STATISTICS_REPLY_FLG_FAT_MODE_MSK)));

/* If the hardware hasn't reported a change in
* temperature then don't bother computing a
* calibrated temperature value */
if (!change)
return;

temp = iwl4965_hw_get_temperature(priv);
if (temp < 0)
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,11 +1422,10 @@ static int iwl5000_send_tx_power(struct iwl_priv *priv)
NULL);
}

static void iwl5000_temperature(struct iwl_priv *priv,
struct iwl_notif_statistics *stats)
static void iwl5000_temperature(struct iwl_priv *priv)
{
/* store temperature from statistics (in Celsius) */
priv->temperature = le32_to_cpu(stats->general.temperature);
priv->temperature = le32_to_cpu(priv->statistics.general.temperature);
}

static struct iwl_hcmd_ops iwl5000_hcmd = {
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ struct iwl_lib_ops {
int (*set_power)(struct iwl_priv *priv, void *cmd);
int (*send_tx_power) (struct iwl_priv *priv);
void (*update_chain_flags)(struct iwl_priv *priv);
void (*temperature) (struct iwl_priv *priv,
struct iwl_notif_statistics *stats);
void (*temperature) (struct iwl_priv *priv);
/* eeprom operations (as defined in iwl-eeprom.h) */
struct iwl_eeprom_ops eeprom_ops;
};
Expand Down
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 5ee483a

Please sign in to comment.