diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 8464397f7816..d7beeff2642c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -520,7 +520,7 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
520 | { | 520 | { |
521 | /* First cache any information we need before we overwrite | 521 | /* First cache any information we need before we overwrite |
522 | * the information provided in the skb from the hardware */ | 522 | * the information provided in the skb from the hardware */ |
523 | s8 signal = stats->ssi; | 523 | s8 signal = stats->signal; |
524 | s8 noise = 0; | 524 | s8 noise = 0; |
525 | int rate = stats->rate_idx; | 525 | int rate = stats->rate_idx; |
526 | u64 tsf = stats->mactime; | 526 | u64 tsf = stats->mactime; |
@@ -693,7 +693,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
693 | } | 693 | } |
694 | 694 | ||
695 | /* Convert 3945's rssi indicator to dBm */ | 695 | /* Convert 3945's rssi indicator to dBm */ |
696 | rx_status.ssi = rx_stats->rssi - IWL_RSSI_OFFSET; | 696 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; |
697 | 697 | ||
698 | /* Set default noise value to -127 */ | 698 | /* Set default noise value to -127 */ |
699 | if (priv->last_rx_noise == 0) | 699 | if (priv->last_rx_noise == 0) |
@@ -712,21 +712,21 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
712 | * Calculate rx_status.signal (quality indicator in %) based on SNR. */ | 712 | * Calculate rx_status.signal (quality indicator in %) based on SNR. */ |
713 | if (rx_stats_noise_diff) { | 713 | if (rx_stats_noise_diff) { |
714 | snr = rx_stats_sig_avg / rx_stats_noise_diff; | 714 | snr = rx_stats_sig_avg / rx_stats_noise_diff; |
715 | rx_status.noise = rx_status.ssi - | 715 | rx_status.noise = rx_status.signal - |
716 | iwl3945_calc_db_from_ratio(snr); | 716 | iwl3945_calc_db_from_ratio(snr); |
717 | rx_status.signal = iwl3945_calc_sig_qual(rx_status.ssi, | 717 | rx_status.qual = iwl3945_calc_sig_qual(rx_status.signal, |
718 | rx_status.noise); | 718 | rx_status.noise); |
719 | 719 | ||
720 | /* If noise info not available, calculate signal quality indicator (%) | 720 | /* If noise info not available, calculate signal quality indicator (%) |
721 | * using just the dBm signal level. */ | 721 | * using just the dBm signal level. */ |
722 | } else { | 722 | } else { |
723 | rx_status.noise = priv->last_rx_noise; | 723 | rx_status.noise = priv->last_rx_noise; |
724 | rx_status.signal = iwl3945_calc_sig_qual(rx_status.ssi, 0); | 724 | rx_status.qual = iwl3945_calc_sig_qual(rx_status.signal, 0); |
725 | } | 725 | } |
726 | 726 | ||
727 | 727 | ||
728 | IWL_DEBUG_STATS("Rssi %d noise %d qual %d sig_avg %d noise_diff %d\n", | 728 | IWL_DEBUG_STATS("Rssi %d noise %d qual %d sig_avg %d noise_diff %d\n", |
729 | rx_status.ssi, rx_status.noise, rx_status.signal, | 729 | rx_status.signal, rx_status.noise, rx_status.qual, |
730 | rx_stats_sig_avg, rx_stats_noise_diff); | 730 | rx_stats_sig_avg, rx_stats_noise_diff); |
731 | 731 | ||
732 | header = (struct ieee80211_hdr *)IWL_RX_DATA(pkt); | 732 | header = (struct ieee80211_hdr *)IWL_RX_DATA(pkt); |
@@ -736,8 +736,8 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
736 | IWL_DEBUG_STATS_LIMIT("[%c] %d RSSI:%d Signal:%u, Noise:%u, Rate:%u\n", | 736 | IWL_DEBUG_STATS_LIMIT("[%c] %d RSSI:%d Signal:%u, Noise:%u, Rate:%u\n", |
737 | network_packet ? '*' : ' ', | 737 | network_packet ? '*' : ' ', |
738 | le16_to_cpu(rx_hdr->channel), | 738 | le16_to_cpu(rx_hdr->channel), |
739 | rx_status.ssi, rx_status.ssi, | 739 | rx_status.signal, rx_status.signal, |
740 | rx_status.ssi, rx_status.rate_idx); | 740 | rx_status.noise, rx_status.rate_idx); |
741 | 741 | ||
742 | #ifdef CONFIG_IWL3945_DEBUG | 742 | #ifdef CONFIG_IWL3945_DEBUG |
743 | if (iwl3945_debug_level & (IWL_DL_RX)) | 743 | if (iwl3945_debug_level & (IWL_DL_RX)) |
@@ -748,7 +748,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
748 | if (network_packet) { | 748 | if (network_packet) { |
749 | priv->last_beacon_time = le32_to_cpu(rx_end->beacon_timestamp); | 749 | priv->last_beacon_time = le32_to_cpu(rx_end->beacon_timestamp); |
750 | priv->last_tsf = le64_to_cpu(rx_end->timestamp); | 750 | priv->last_tsf = le64_to_cpu(rx_end->timestamp); |
751 | priv->last_rx_rssi = rx_status.ssi; | 751 | priv->last_rx_rssi = rx_status.signal; |
752 | priv->last_rx_noise = rx_status.noise; | 752 | priv->last_rx_noise = rx_status.noise; |
753 | } | 753 | } |
754 | 754 | ||