summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-07 15:41:48 -0700
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 0c3ed23ed77..21331552ff2 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,
if (!iwl_ht_enabled(priv))
/* stay in Legacy */
tbl->action = IWL_LEGACY_SWITCH_ANTENNA1;
- else if (iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE &&
+ else if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE &&
tbl->action > IWL_LEGACY_SWITCH_SISO)
tbl->action = IWL_LEGACY_SWITCH_SISO;
for (; ;) {
@@ -1535,7 +1535,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
u8 update_search_tbl_counter = 0;
int ret;
- if (iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE &&
+ if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE &&
tbl->action > IWL_SISO_SWITCH_ANTENNA2) {
/* stay in SISO */
tbl->action = IWL_SISO_SWITCH_ANTENNA1;
@@ -1674,7 +1674,7 @@ static int rs_move_mimo2_to_other(struct iwl_priv *priv,
u8 update_search_tbl_counter = 0;
int ret;
- if ((iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE) &&
+ if ((iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE) &&
(tbl->action < IWL_MIMO2_SWITCH_SISO_A ||
tbl->action > IWL_MIMO2_SWITCH_SISO_C)) {
/* switch in SISO */
@@ -1816,7 +1816,7 @@ static int rs_move_mimo3_to_other(struct iwl_priv *priv,
int ret;
u8 update_search_tbl_counter = 0;
- if ((iwl_tx_ant_restriction(priv) == IWL_TX_SINGLE) &&
+ if ((iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE) &&
(tbl->action < IWL_MIMO3_SWITCH_SISO_A ||
tbl->action > IWL_MIMO3_SWITCH_SISO_C)) {
/* switch in SISO */
@@ -2202,7 +2202,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
/* If we are searching for better modulation mode, check success. */
if (lq_sta->search_better_tbl &&
- (iwl_tx_ant_restriction(priv) == IWL_TX_MULTI)) {
+ (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI)) {
/* If good success, continue using the "search" mode;
* no need to send new link quality command, since we're
* continuing to use the setup that we've been trying. */
@@ -2332,7 +2332,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
scale_action = 0;
if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type))
scale_action = -1;
- if (iwl_tx_ant_restriction(priv) != IWL_TX_MULTI &&
+ if (iwl_tx_ant_restriction(priv) != IWL_ANT_OK_MULTI &&
(is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type)))
scale_action = -1;
switch (scale_action) {
@@ -2368,7 +2368,7 @@ lq_update:
rate = rs_update_rate_tbl(priv, lq_sta,
tbl, index, is_green);
- if (iwl_tx_ant_restriction(priv) == IWL_TX_MULTI) {
+ if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) {
/* Should we stay with this modulation mode,
* or search for a new one? */
rs_stay_in_table(lq_sta);