diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-13 04:04:35 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-04-16 16:54:29 -0400 |
commit | e7cb49550eb25f2e551d7d7f3bb71560df83680c (patch) | |
tree | 3d5f8aa11b4eda97cf72f71e74851c4a34868c01 | |
parent | ee102603c04d84d3079e3d593d88d5254085efa0 (diff) |
iwlwifi: make scan antenna forcing more generic
Some future hardware will also require some antenna
overrides so make the current logic more generic;
right now it is semantically based on a workaround
for off-channel reception but the reasons for the
new antenna overrides will be different.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 2861819e56e3..136c29067489 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2261,8 +2261,13 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2261 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 2261 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
2262 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 2262 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
2263 | .temperature_kelvin = true, | 2263 | .temperature_kelvin = true, |
2264 | .off_channel_workaround = true, | ||
2265 | .max_event_log_size = 512, | 2264 | .max_event_log_size = 512, |
2265 | |||
2266 | /* | ||
2267 | * Force use of chains B and C for scan RX on 5 GHz band | ||
2268 | * because the device has off-channel reception on chain A. | ||
2269 | */ | ||
2270 | .scan_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, | ||
2266 | }; | 2271 | }; |
2267 | 2272 | ||
2268 | /* Module firmware */ | 2273 | /* Module firmware */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index ccf335775ec3..4bd0aecc7713 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -1405,13 +1405,6 @@ void iwlagn_request_scan(struct iwl_priv *priv) | |||
1405 | * detect transmissions. | 1405 | * detect transmissions. |
1406 | */ | 1406 | */ |
1407 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; | 1407 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; |
1408 | |||
1409 | /* Force use of chains B and C (0x6) for scan Rx | ||
1410 | * Avoid A (0x1) for the device has off-channel reception | ||
1411 | * on A-band. | ||
1412 | */ | ||
1413 | if (priv->cfg->off_channel_workaround) | ||
1414 | rx_ant = ANT_BC; | ||
1415 | break; | 1408 | break; |
1416 | default: | 1409 | default: |
1417 | IWL_WARN(priv, "Invalid scan band count\n"); | 1410 | IWL_WARN(priv, "Invalid scan band count\n"); |
@@ -1420,6 +1413,9 @@ void iwlagn_request_scan(struct iwl_priv *priv) | |||
1420 | 1413 | ||
1421 | band = priv->scan_band; | 1414 | band = priv->scan_band; |
1422 | 1415 | ||
1416 | if (priv->cfg->scan_antennas[band]) | ||
1417 | rx_ant = priv->cfg->scan_antennas[band]; | ||
1418 | |||
1423 | priv->scan_tx_ant[band] = | 1419 | priv->scan_tx_ant[band] = |
1424 | iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band]); | 1420 | iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band]); |
1425 | rate_flags |= iwl_ant_idx_to_flags(priv->scan_tx_ant[band]); | 1421 | rate_flags |= iwl_ant_idx_to_flags(priv->scan_tx_ant[band]); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index e267a218e3e0..a0cc11ecbe93 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -318,8 +318,8 @@ struct iwl_cfg { | |||
318 | /* timer period for monitor the driver queues */ | 318 | /* timer period for monitor the driver queues */ |
319 | u32 monitor_recover_period; | 319 | u32 monitor_recover_period; |
320 | bool temperature_kelvin; | 320 | bool temperature_kelvin; |
321 | bool off_channel_workaround; | ||
322 | u32 max_event_log_size; | 321 | u32 max_event_log_size; |
322 | u8 scan_antennas[IEEE80211_NUM_BANDS]; | ||
323 | }; | 323 | }; |
324 | 324 | ||
325 | /*************************** | 325 | /*************************** |