diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index 75b901b3eb1e..84939763d178 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -235,13 +235,13 @@ static int iwlagn_calc_rssi(struct iwl_priv *priv, | |||
235 | /* data from PHY/DSP regarding signal strength, etc., | 235 | /* data from PHY/DSP regarding signal strength, etc., |
236 | * contents are always there, not configurable by host | 236 | * contents are always there, not configurable by host |
237 | */ | 237 | */ |
238 | struct iwl5000_non_cfg_phy *ncphy = | 238 | struct iwlagn_non_cfg_phy *ncphy = |
239 | (struct iwl5000_non_cfg_phy *)rx_resp->non_cfg_phy_buf; | 239 | (struct iwlagn_non_cfg_phy *)rx_resp->non_cfg_phy_buf; |
240 | u32 val, rssi_a, rssi_b, rssi_c, max_rssi; | 240 | u32 val, rssi_a, rssi_b, rssi_c, max_rssi; |
241 | u8 agc; | 241 | u8 agc; |
242 | 242 | ||
243 | val = le32_to_cpu(ncphy->non_cfg_phy[IWL50_RX_RES_AGC_IDX]); | 243 | val = le32_to_cpu(ncphy->non_cfg_phy[IWLAGN_RX_RES_AGC_IDX]); |
244 | agc = (val & IWL50_OFDM_AGC_MSK) >> IWL50_OFDM_AGC_BIT_POS; | 244 | agc = (val & IWLAGN_OFDM_AGC_MSK) >> IWLAGN_OFDM_AGC_BIT_POS; |
245 | 245 | ||
246 | /* Find max rssi among 3 possible receivers. | 246 | /* Find max rssi among 3 possible receivers. |
247 | * These values are measured by the digital signal processor (DSP). | 247 | * These values are measured by the digital signal processor (DSP). |
@@ -249,11 +249,14 @@ static int iwlagn_calc_rssi(struct iwl_priv *priv, | |||
249 | * if the radio's automatic gain control (AGC) is working right. | 249 | * if the radio's automatic gain control (AGC) is working right. |
250 | * AGC value (see below) will provide the "interesting" info. | 250 | * AGC value (see below) will provide the "interesting" info. |
251 | */ | 251 | */ |
252 | val = le32_to_cpu(ncphy->non_cfg_phy[IWL50_RX_RES_RSSI_AB_IDX]); | 252 | val = le32_to_cpu(ncphy->non_cfg_phy[IWLAGN_RX_RES_RSSI_AB_IDX]); |
253 | rssi_a = (val & IWL50_OFDM_RSSI_A_MSK) >> IWL50_OFDM_RSSI_A_BIT_POS; | 253 | rssi_a = (val & IWLAGN_OFDM_RSSI_INBAND_A_BITMSK) >> |
254 | rssi_b = (val & IWL50_OFDM_RSSI_B_MSK) >> IWL50_OFDM_RSSI_B_BIT_POS; | 254 | IWLAGN_OFDM_RSSI_A_BIT_POS; |
255 | val = le32_to_cpu(ncphy->non_cfg_phy[IWL50_RX_RES_RSSI_C_IDX]); | 255 | rssi_b = (val & IWLAGN_OFDM_RSSI_INBAND_B_BITMSK) >> |
256 | rssi_c = (val & IWL50_OFDM_RSSI_C_MSK) >> IWL50_OFDM_RSSI_C_BIT_POS; | 256 | IWLAGN_OFDM_RSSI_B_BIT_POS; |
257 | val = le32_to_cpu(ncphy->non_cfg_phy[IWLAGN_RX_RES_RSSI_C_IDX]); | ||
258 | rssi_c = (val & IWLAGN_OFDM_RSSI_INBAND_C_BITMSK) >> | ||
259 | IWLAGN_OFDM_RSSI_C_BIT_POS; | ||
257 | 260 | ||
258 | max_rssi = max_t(u32, rssi_a, rssi_b); | 261 | max_rssi = max_t(u32, rssi_a, rssi_b); |
259 | max_rssi = max_t(u32, max_rssi, rssi_c); | 262 | max_rssi = max_t(u32, max_rssi, rssi_c); |