aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-09-25 17:24:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:36 -0400
commit2b396a120922062a0ffd2648be3ed7e72ff83620 (patch)
treea8278f7989790a439eaacdd691a1c003232f1d8d
parent9bddbab36d736c181678e07515aaa63045bdcea7 (diff)
iwlwifi: default to using all chains
When instructing the microcode to use just a single chain when we have power saving enabled, we should also tell the AP that we are doing SM powersave. However, using a single chain doesn't actually have any power saving advantage while idle -- measurements show that the power consumption is no different when using one vs. two or three chains. Therefore, always instruct the microcode to use all chains. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 5ff0f66f8aa1..e97b104ba1d5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -948,8 +948,13 @@ EXPORT_SYMBOL(iwl_set_rxon_ht);
948#define IWL_NUM_IDLE_CHAINS_DUAL 2 948#define IWL_NUM_IDLE_CHAINS_DUAL 2
949#define IWL_NUM_IDLE_CHAINS_SINGLE 1 949#define IWL_NUM_IDLE_CHAINS_SINGLE 1
950 950
951/* Determine how many receiver/antenna chains to use. 951/*
952 * More provides better reception via diversity. Fewer saves power. 952 * Determine how many receiver/antenna chains to use.
953 *
954 * More provides better reception via diversity. Fewer saves power
955 * at the expense of throughput, but only when not in powersave to
956 * start with.
957 *
953 * MIMO (dual stream) requires at least 2, but works better with 3. 958 * MIMO (dual stream) requires at least 2, but works better with 3.
954 * This does not determine *which* chains to use, just how many. 959 * This does not determine *which* chains to use, just how many.
955 */ 960 */
@@ -962,19 +967,18 @@ static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
962 return IWL_NUM_RX_CHAINS_MULTIPLE; 967 return IWL_NUM_RX_CHAINS_MULTIPLE;
963} 968}
964 969
970/*
971 * When we are in power saving, there's no difference between
972 * using multiple chains or just a single chain, but due to the
973 * lack of SM PS we lose a lot of throughput if we use just a
974 * single chain.
975 *
976 * Therefore, use the active count here (which will use multiple
977 * chains unless connected to a legacy AP).
978 */
965static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) 979static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
966{ 980{
967 bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); 981 return active_cnt;
968
969 /* # Rx chains when idling and maybe trying to save power */
970
971 /*
972 * XXX: this is incorrect!!
973 * we always indicate to the AP that
974 * our SM PS mode is "disabled"
975 */
976
977 return is_cam ? active_cnt : IWL_NUM_IDLE_CHAINS_SINGLE;
978} 982}
979 983
980/* up to 4 chains */ 984/* up to 4 chains */