aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-07-31 11:52:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-24 16:32:01 -0400
commitb1a78858c4579d678444c007617292ccf6f7a315 (patch)
tree2b9189cd3c7cff3c90c29892f3211f14521ae933
parent948f5a2f08cb782adf3c5bb92abc6dbec2b4275f (diff)
iwlagn: adjust starting action for rate scale
During rate scale, reset starting action after making action adjustment to avoid the possibility of break out of loop too early. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 7c4deee4c527..4d5738dfc7eb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -1265,7 +1265,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1265 struct iwl_rate_scale_data *window = &(tbl->win[index]); 1265 struct iwl_rate_scale_data *window = &(tbl->win[index]);
1266 u32 sz = (sizeof(struct iwl_scale_tbl_info) - 1266 u32 sz = (sizeof(struct iwl_scale_tbl_info) -
1267 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); 1267 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT));
1268 u8 start_action = tbl->action; 1268 u8 start_action;
1269 u8 valid_tx_ant = priv->hw_params.valid_tx_ant; 1269 u8 valid_tx_ant = priv->hw_params.valid_tx_ant;
1270 u8 tx_chains_num = priv->hw_params.tx_chains_num; 1270 u8 tx_chains_num = priv->hw_params.tx_chains_num;
1271 int ret = 0; 1271 int ret = 0;
@@ -1277,6 +1277,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1277 else if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE && 1277 else if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_SINGLE &&
1278 tbl->action > IWL_LEGACY_SWITCH_SISO) 1278 tbl->action > IWL_LEGACY_SWITCH_SISO)
1279 tbl->action = IWL_LEGACY_SWITCH_SISO; 1279 tbl->action = IWL_LEGACY_SWITCH_SISO;
1280 start_action = tbl->action;
1280 for (; ;) { 1281 for (; ;) {
1281 lq_sta->action_counter++; 1282 lq_sta->action_counter++;
1282 switch (tbl->action) { 1283 switch (tbl->action) {
@@ -1403,7 +1404,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1403 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; 1404 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
1404 u32 sz = (sizeof(struct iwl_scale_tbl_info) - 1405 u32 sz = (sizeof(struct iwl_scale_tbl_info) -
1405 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); 1406 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT));
1406 u8 start_action = tbl->action; 1407 u8 start_action;
1407 u8 valid_tx_ant = priv->hw_params.valid_tx_ant; 1408 u8 valid_tx_ant = priv->hw_params.valid_tx_ant;
1408 u8 tx_chains_num = priv->hw_params.tx_chains_num; 1409 u8 tx_chains_num = priv->hw_params.tx_chains_num;
1409 u8 update_search_tbl_counter = 0; 1410 u8 update_search_tbl_counter = 0;
@@ -1414,6 +1415,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1414 /* stay in SISO */ 1415 /* stay in SISO */
1415 tbl->action = IWL_SISO_SWITCH_ANTENNA1; 1416 tbl->action = IWL_SISO_SWITCH_ANTENNA1;
1416 } 1417 }
1418 start_action = tbl->action;
1417 for (;;) { 1419 for (;;) {
1418 lq_sta->action_counter++; 1420 lq_sta->action_counter++;
1419 switch (tbl->action) { 1421 switch (tbl->action) {
@@ -1541,7 +1543,7 @@ static int rs_move_mimo2_to_other(struct iwl_priv *priv,
1541 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; 1543 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
1542 u32 sz = (sizeof(struct iwl_scale_tbl_info) - 1544 u32 sz = (sizeof(struct iwl_scale_tbl_info) -
1543 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); 1545 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT));
1544 u8 start_action = tbl->action; 1546 u8 start_action;
1545 u8 valid_tx_ant = priv->hw_params.valid_tx_ant; 1547 u8 valid_tx_ant = priv->hw_params.valid_tx_ant;
1546 u8 tx_chains_num = priv->hw_params.tx_chains_num; 1548 u8 tx_chains_num = priv->hw_params.tx_chains_num;
1547 u8 update_search_tbl_counter = 0; 1549 u8 update_search_tbl_counter = 0;
@@ -1553,6 +1555,7 @@ static int rs_move_mimo2_to_other(struct iwl_priv *priv,
1553 /* switch in SISO */ 1555 /* switch in SISO */
1554 tbl->action = IWL_MIMO2_SWITCH_SISO_A; 1556 tbl->action = IWL_MIMO2_SWITCH_SISO_A;
1555 } 1557 }
1558 start_action = tbl->action;
1556 for (;;) { 1559 for (;;) {
1557 lq_sta->action_counter++; 1560 lq_sta->action_counter++;
1558 switch (tbl->action) { 1561 switch (tbl->action) {
@@ -1682,7 +1685,7 @@ static int rs_move_mimo3_to_other(struct iwl_priv *priv,
1682 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; 1685 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
1683 u32 sz = (sizeof(struct iwl_scale_tbl_info) - 1686 u32 sz = (sizeof(struct iwl_scale_tbl_info) -
1684 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); 1687 (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT));
1685 u8 start_action = tbl->action; 1688 u8 start_action;
1686 u8 valid_tx_ant = priv->hw_params.valid_tx_ant; 1689 u8 valid_tx_ant = priv->hw_params.valid_tx_ant;
1687 u8 tx_chains_num = priv->hw_params.tx_chains_num; 1690 u8 tx_chains_num = priv->hw_params.tx_chains_num;
1688 int ret; 1691 int ret;
@@ -1694,6 +1697,7 @@ static int rs_move_mimo3_to_other(struct iwl_priv *priv,
1694 /* switch in SISO */ 1697 /* switch in SISO */
1695 tbl->action = IWL_MIMO3_SWITCH_SISO_A; 1698 tbl->action = IWL_MIMO3_SWITCH_SISO_A;
1696 } 1699 }
1700 start_action = tbl->action;
1697 for (;;) { 1701 for (;;) {
1698 lq_sta->action_counter++; 1702 lq_sta->action_counter++;
1699 switch (tbl->action) { 1703 switch (tbl->action) {