aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-07 18:41:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:50 -0400
commit3ad3b92a5517c043ef30e4b95c4c39a35bbc36be (patch)
treeb0dbc0ef7fb0787088f2a9e20e954a025774e1ed /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent3a780d25428a0a391a8ba6c888cf4e89ac3fdbb1 (diff)
iwlwifi: refactor some thermal throttle code
Some of the thermal throttle data structures and code are really very intermingled with the sleep (power) control code. They really do belong together in a way since the thermal throttle code uses powersaving to achieve its goal, but it's making it hard to work on the powersave code. Split this up to make that easier. I've also changed the antenna defines to an enum and used the same enum for RX and TX. 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 0c3ed23ed775..21331552ff2c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -1401,7 +1401,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1401 if (!iwl_ht_enabled(priv)) 1401 if (!iwl_ht_enabled(priv))
1402 /* stay in Legacy */ 1402 /* stay in Legacy */
1403 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; 1403 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1;
1404 else if (iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE && 1404 else if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE &&
1405 tbl->action > IWL_LEGACY_SWITCH_SISO) 1405 tbl->action > IWL_LEGACY_SWITCH_SISO)
1406 tbl->action = IWL_LEGACY_SWITCH_SISO; 1406 tbl->action = IWL_LEGACY_SWITCH_SISO;
1407 for (; ;) { 1407 for (; ;) {
@@ -1535,7 +1535,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1535 u8 update_search_tbl_counter = 0; 1535 u8 update_search_tbl_counter = 0;
1536 int ret; 1536 int ret;
1537 1537
1538 if (iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE && 1538 if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE &&
1539 tbl->action > IWL_SISO_SWITCH_ANTENNA2) { 1539 tbl->action > IWL_SISO_SWITCH_ANTENNA2) {
1540 /* stay in SISO */ 1540 /* stay in SISO */
1541 tbl->action = IWL_SISO_SWITCH_ANTENNA1; 1541 tbl->action = IWL_SISO_SWITCH_ANTENNA1;
@@ -1674,7 +1674,7 @@ static int rs_move_mimo2_to_other(struct iwl_priv *priv,
1674 u8 update_search_tbl_counter = 0; 1674 u8 update_search_tbl_counter = 0;
1675 int ret; 1675 int ret;
1676 1676
1677 if ((iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE) && 1677 if ((iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE) &&
1678 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || 1678 (tbl->action < IWL_MIMO2_SWITCH_SISO_A ||
1679 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { 1679 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) {
1680 /* switch in SISO */ 1680 /* switch in SISO */
@@ -1816,7 +1816,7 @@ static int rs_move_mimo3_to_other(struct iwl_priv *priv,
1816 int ret; 1816 int ret;
1817 u8 update_search_tbl_counter = 0; 1817 u8 update_search_tbl_counter = 0;
1818 1818
1819 if ((iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE) && 1819 if ((iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE) &&
1820 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || 1820 (tbl->action < IWL_MIMO3_SWITCH_SISO_A ||
1821 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { 1821 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) {
1822 /* switch in SISO */ 1822 /* switch in SISO */
@@ -2202,7 +2202,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2202 2202
2203 /* If we are searching for better modulation mode, check success. */ 2203 /* If we are searching for better modulation mode, check success. */
2204 if (lq_sta->search_better_tbl && 2204 if (lq_sta->search_better_tbl &&
2205 (iwl_tx_ant_restriction(priv) == IWL_TX_MULTI)) { 2205 (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI)) {
2206 /* If good success, continue using the "search" mode; 2206 /* If good success, continue using the "search" mode;
2207 * no need to send new link quality command, since we're 2207 * no need to send new link quality command, since we're
2208 * continuing to use the setup that we've been trying. */ 2208 * continuing to use the setup that we've been trying. */
@@ -2332,7 +2332,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2332 scale_action = 0; 2332 scale_action = 0;
2333 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) 2333 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type))
2334 scale_action = -1; 2334 scale_action = -1;
2335 if (iwl_tx_ant_restriction(priv) != IWL_TX_MULTI && 2335 if (iwl_tx_ant_restriction(priv) != IWL_ANT_OK_MULTI &&
2336 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) 2336 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type)))
2337 scale_action = -1; 2337 scale_action = -1;
2338 switch (scale_action) { 2338 switch (scale_action) {
@@ -2368,7 +2368,7 @@ lq_update:
2368 rate = rs_update_rate_tbl(priv, lq_sta, 2368 rate = rs_update_rate_tbl(priv, lq_sta,
2369 tbl, index, is_green); 2369 tbl, index, is_green);
2370 2370
2371 if (iwl_tx_ant_restriction(priv) == IWL_TX_MULTI) { 2371 if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) {
2372 /* Should we stay with this modulation mode, 2372 /* Should we stay with this modulation mode,
2373 * or search for a new one? */ 2373 * or search for a new one? */
2374 rs_stay_in_table(lq_sta); 2374 rs_stay_in_table(lq_sta);