diff options
author | Shanyu Zhao <shanyu.zhao@intel.com> | 2009-11-06 17:52:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-11 15:23:41 -0500 |
commit | f1e3d7d428616c04ef71bee3c2b6f274b8947755 (patch) | |
tree | f3d166eaac93cc826a7b3d9f82f57ac09a061e40 /drivers/net | |
parent | a643565efcdafdc37638aa5131ced91b2d3ddcb2 (diff) |
iwlwifi: use only one chain for scan in PS
When doing scan in power saving mode, choose only 1 valid RX chain instead of
turning all chains on.
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 1eb0d0bf1fe4..48bc2636a8ef 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -581,6 +581,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
581 | u8 rate; | 581 | u8 rate; |
582 | bool is_active = false; | 582 | bool is_active = false; |
583 | int chan_mod; | 583 | int chan_mod; |
584 | u8 active_chains; | ||
584 | 585 | ||
585 | conf = ieee80211_get_hw_conf(priv->hw); | 586 | conf = ieee80211_get_hw_conf(priv->hw); |
586 | 587 | ||
@@ -734,9 +735,22 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
734 | rate_flags |= iwl_ant_idx_to_flags(priv->scan_tx_ant[band]); | 735 | rate_flags |= iwl_ant_idx_to_flags(priv->scan_tx_ant[band]); |
735 | scan->tx_cmd.rate_n_flags = iwl_hw_set_rate_n_flags(rate, rate_flags); | 736 | scan->tx_cmd.rate_n_flags = iwl_hw_set_rate_n_flags(rate, rate_flags); |
736 | 737 | ||
738 | /* In power save mode use one chain, otherwise use all chains */ | ||
739 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { | ||
740 | /* rx_ant has been set to all valid chains previously */ | ||
741 | active_chains = rx_ant & | ||
742 | ((u8)(priv->chain_noise_data.active_chains)); | ||
743 | if (!active_chains) | ||
744 | active_chains = rx_ant; | ||
745 | |||
746 | IWL_DEBUG_SCAN(priv, "chain_noise_data.active_chains: %u\n", | ||
747 | priv->chain_noise_data.active_chains); | ||
748 | |||
749 | rx_ant = first_antenna(active_chains); | ||
750 | } | ||
737 | /* MIMO is not used here, but value is required */ | 751 | /* MIMO is not used here, but value is required */ |
738 | rx_chain |= ANT_ABC << RXON_RX_CHAIN_VALID_POS; | 752 | rx_chain |= ANT_ABC << RXON_RX_CHAIN_VALID_POS; |
739 | rx_chain |= ANT_ABC << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS; | 753 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS; |
740 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS; | 754 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS; |
741 | rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS; | 755 | rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS; |
742 | scan->rx_chain = cpu_to_le16(rx_chain); | 756 | scan->rx_chain = cpu_to_le16(rx_chain); |