aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
authorGuy Cohen <guy.cohen@intel.com>2008-04-23 20:15:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:19 -0400
commitf935a6daa07ac78a35d1513fc61c88774b628a4c (patch)
treec9c62623098c3da46ec61b22128919ff5a9e17e8 /drivers/net/wireless/iwlwifi/iwl-4965-rs.c
parent69fdb3090846de1cdc4fcb4f7e74533f5acbfa98 (diff)
iwlwifi: rate sacaling fixes
1. Fixing support for tx in antenna C 2. Enable stay_in_column expiration after 2 seconds Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 469c143297ec..5129d57ed591 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -620,17 +620,21 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
620} 620}
621 621
622/* FIXME:RS: in 4965 we don't use greenfield at all */ 622/* FIXME:RS: in 4965 we don't use greenfield at all */
623static inline u8 rs_use_green(struct iwl_priv *priv, 623/* FIXME:RS: don't use greenfield for now in TX */
624 struct ieee80211_conf *conf) 624/* #ifdef CONFIG_IWL4965_HT */
625#if 0
626static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
625{ 627{
626#ifdef CONFIG_IWL4965_HT
627 return ((conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && 628 return ((conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) &&
628 priv->current_ht_config.is_green_field && 629 priv->current_ht_config.is_green_field &&
629 !priv->current_ht_config.non_GF_STA_present); 630 !priv->current_ht_config.non_GF_STA_present);
631}
630#else 632#else
633static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
634{
631 return 0; 635 return 0;
632#endif /* CONFIG_IWL4965_HT */
633} 636}
637#endif /* CONFIG_IWL4965_HT */
634 638
635/** 639/**
636 * rs_get_supported_rates - get the available rates 640 * rs_get_supported_rates - get the available rates
@@ -1058,7 +1062,7 @@ static void rs_set_expected_tpt_table(struct iwl4965_lq_sta *lq_sta,
1058static s32 rs_get_best_rate(struct iwl_priv *priv, 1062static s32 rs_get_best_rate(struct iwl_priv *priv,
1059 struct iwl4965_lq_sta *lq_sta, 1063 struct iwl4965_lq_sta *lq_sta,
1060 struct iwl4965_scale_tbl_info *tbl, /* "search" */ 1064 struct iwl4965_scale_tbl_info *tbl, /* "search" */
1061 u16 rate_mask, s8 index, s8 rate) 1065 u16 rate_mask, s8 index)
1062{ 1066{
1063 /* "active" values */ 1067 /* "active" values */
1064 struct iwl4965_scale_tbl_info *active_tbl = 1068 struct iwl4965_scale_tbl_info *active_tbl =
@@ -1071,6 +1075,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
1071 1075
1072 s32 new_rate, high, low, start_hi; 1076 s32 new_rate, high, low, start_hi;
1073 u16 high_low; 1077 u16 high_low;
1078 s8 rate = index;
1074 1079
1075 new_rate = high = low = start_hi = IWL_RATE_INVALID; 1080 new_rate = high = low = start_hi = IWL_RATE_INVALID;
1076 1081
@@ -1197,7 +1202,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
1197 1202
1198 rs_set_expected_tpt_table(lq_sta, tbl); 1203 rs_set_expected_tpt_table(lq_sta, tbl);
1199 1204
1200 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index); 1205 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index);
1201 1206
1202 IWL_DEBUG_RATE("LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask); 1207 IWL_DEBUG_RATE("LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask);
1203 1208
@@ -1270,7 +1275,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1270 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ 1275 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/
1271 1276
1272 rs_set_expected_tpt_table(lq_sta, tbl); 1277 rs_set_expected_tpt_table(lq_sta, tbl);
1273 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index); 1278 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index);
1274 1279
1275 IWL_DEBUG_RATE("LQ: get best rate %d mask %X\n", rate, rate_mask); 1280 IWL_DEBUG_RATE("LQ: get best rate %d mask %X\n", rate, rate_mask);
1276 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { 1281 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) {
@@ -1284,7 +1289,6 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1284 return 0; 1289 return 0;
1285#else 1290#else
1286 return -1; 1291 return -1;
1287
1288#endif /*CONFIG_IWL4965_HT */ 1292#endif /*CONFIG_IWL4965_HT */
1289} 1293}
1290 1294
@@ -1311,7 +1315,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1311 for (; ;) { 1315 for (; ;) {
1312 switch (tbl->action) { 1316 switch (tbl->action) {
1313 case IWL_LEGACY_SWITCH_ANTENNA: 1317 case IWL_LEGACY_SWITCH_ANTENNA:
1314 IWL_DEBUG_RATE("LQ Legacy toggle Antenna\n"); 1318 IWL_DEBUG_RATE("LQ: Legacy toggle Antenna\n");
1315 1319
1316 lq_sta->action_counter++; 1320 lq_sta->action_counter++;
1317 1321
@@ -1580,9 +1584,6 @@ static void rs_stay_in_table(struct iwl4965_lq_sta *lq_sta)
1580 (unsigned long)(lq_sta->flush_timer + 1584 (unsigned long)(lq_sta->flush_timer +
1581 IWL_RATE_SCALE_FLUSH_INTVL)); 1585 IWL_RATE_SCALE_FLUSH_INTVL));
1582 1586
1583 /* For now, disable the elapsed time criterion */
1584 flush_interval_passed = 0;
1585
1586 /* 1587 /*
1587 * Check if we should allow search for new modulation mode. 1588 * Check if we should allow search for new modulation mode.
1588 * If many frames have failed or succeeded, or we've used 1589 * If many frames have failed or succeeded, or we've used