aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-06-09 15:54:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:01 -0400
commit4f85f5b39208e755a93f63296ec1224d14121b6c (patch)
tree6a60946481b392c973ca40b0088e7a1c97870150 /drivers/net/wireless/iwlwifi/iwl-4965-rs.c
parenta19d7292dc7f1c7d8704a353f51c7f1529de953b (diff)
iwlwifi: removing IWL4965_HT config
This patch removes CONFIG_IWL4965_HT #ifdefs for iwl 4965 and 5000. 11n feature is stable in those drivers and its mode of operation is determined in mac80211, so this dependency is not needed any more. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index d8f2b4d33fd9..7f9178bf602e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -105,8 +105,6 @@ struct iwl4965_scale_tbl_info {
105 struct iwl4965_rate_scale_data win[IWL_RATE_COUNT]; /* rate histories */ 105 struct iwl4965_rate_scale_data win[IWL_RATE_COUNT]; /* rate histories */
106}; 106};
107 107
108#ifdef CONFIG_IWL4965_HT
109
110struct iwl4965_traffic_load { 108struct iwl4965_traffic_load {
111 unsigned long time_stamp; /* age of the oldest statistics */ 109 unsigned long time_stamp; /* age of the oldest statistics */
112 u32 packet_count[TID_QUEUE_MAX_SIZE]; /* packet count in this time 110 u32 packet_count[TID_QUEUE_MAX_SIZE]; /* packet count in this time
@@ -118,8 +116,6 @@ struct iwl4965_traffic_load {
118 u8 head; /* start of the circular buffer */ 116 u8 head; /* start of the circular buffer */
119}; 117};
120 118
121#endif /* CONFIG_IWL4965_HT */
122
123/** 119/**
124 * struct iwl4965_lq_sta -- driver's rate scaling private structure 120 * struct iwl4965_lq_sta -- driver's rate scaling private structure
125 * 121 *
@@ -157,16 +153,12 @@ struct iwl4965_lq_sta {
157 153
158 struct iwl_link_quality_cmd lq; 154 struct iwl_link_quality_cmd lq;
159 struct iwl4965_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */ 155 struct iwl4965_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */
160#ifdef CONFIG_IWL4965_HT
161 struct iwl4965_traffic_load load[TID_MAX_LOAD_COUNT]; 156 struct iwl4965_traffic_load load[TID_MAX_LOAD_COUNT];
162 u8 tx_agg_tid_en; 157 u8 tx_agg_tid_en;
163#endif
164#ifdef CONFIG_MAC80211_DEBUGFS 158#ifdef CONFIG_MAC80211_DEBUGFS
165 struct dentry *rs_sta_dbgfs_scale_table_file; 159 struct dentry *rs_sta_dbgfs_scale_table_file;
166 struct dentry *rs_sta_dbgfs_stats_table_file; 160 struct dentry *rs_sta_dbgfs_stats_table_file;
167#ifdef CONFIG_IWL4965_HT
168 struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; 161 struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file;
169#endif
170 u32 dbg_fixed_rate; 162 u32 dbg_fixed_rate;
171#endif 163#endif
172 struct iwl_priv *drv; 164 struct iwl_priv *drv;
@@ -256,7 +248,6 @@ static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type)
256 return ((ant_type & valid_antenna) == ant_type); 248 return ((ant_type & valid_antenna) == ant_type);
257} 249}
258 250
259#ifdef CONFIG_IWL4965_HT
260/* 251/*
261 * removes the old data from the statistics. All data that is older than 252 * removes the old data from the statistics. All data that is older than
262 * TID_MAX_TIME_DIFF, will be deleted. 253 * TID_MAX_TIME_DIFF, will be deleted.
@@ -389,8 +380,6 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
389 rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta); 380 rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
390} 381}
391 382
392#endif /* CONFIG_IWLWIFI_HT */
393
394static inline int get_num_of_ant_from_rate(u32 rate_n_flags) 383static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
395{ 384{
396 return (!!(rate_n_flags & RATE_MCS_ANT_A_MSK) + 385 return (!!(rate_n_flags & RATE_MCS_ANT_A_MSK) +
@@ -626,7 +615,6 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
626 615
627/* FIXME:RS: in 4965 we don't use greenfield at all */ 616/* FIXME:RS: in 4965 we don't use greenfield at all */
628/* FIXME:RS: don't use greenfield for now in TX */ 617/* FIXME:RS: don't use greenfield for now in TX */
629/* #ifdef CONFIG_IWL4965_HT */
630#if 0 618#if 0
631static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) 619static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
632{ 620{
@@ -634,12 +622,11 @@ static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf
634 priv->current_ht_config.is_green_field && 622 priv->current_ht_config.is_green_field &&
635 !priv->current_ht_config.non_GF_STA_present); 623 !priv->current_ht_config.non_GF_STA_present);
636} 624}
637#else 625#endif
638static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) 626static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
639{ 627{
640 return 0; 628 return 0;
641} 629}
642#endif /* CONFIG_IWL4965_HT */
643 630
644/** 631/**
645 * rs_get_supported_rates - get the available rates 632 * rs_get_supported_rates - get the available rates
@@ -1050,7 +1037,6 @@ static void rs_set_expected_tpt_table(struct iwl4965_lq_sta *lq_sta,
1050 tbl->expected_tpt = expected_tpt_G; 1037 tbl->expected_tpt = expected_tpt_G;
1051} 1038}
1052 1039
1053#ifdef CONFIG_IWL4965_HT
1054/* 1040/*
1055 * Find starting rate for new "search" high-throughput mode of modulation. 1041 * Find starting rate for new "search" high-throughput mode of modulation.
1056 * Goal is to find lowest expected rate (under perfect conditions) that is 1042 * Goal is to find lowest expected rate (under perfect conditions) that is
@@ -1152,12 +1138,10 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
1152 1138
1153 return new_rate; 1139 return new_rate;
1154} 1140}
1155#endif /* CONFIG_IWL4965_HT */
1156 1141
1157/* 1142/*
1158 * Set up search table for MIMO 1143 * Set up search table for MIMO
1159 */ 1144 */
1160#ifdef CONFIG_IWL4965_HT
1161static int rs_switch_to_mimo2(struct iwl_priv *priv, 1145static int rs_switch_to_mimo2(struct iwl_priv *priv,
1162 struct iwl4965_lq_sta *lq_sta, 1146 struct iwl4965_lq_sta *lq_sta,
1163 struct ieee80211_conf *conf, 1147 struct ieee80211_conf *conf,
@@ -1221,16 +1205,6 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
1221 tbl->current_rate, is_green); 1205 tbl->current_rate, is_green);
1222 return 0; 1206 return 0;
1223} 1207}
1224#else
1225static int rs_switch_to_mimo2(struct iwl_priv *priv,
1226 struct iwl4965_lq_sta *lq_sta,
1227 struct ieee80211_conf *conf,
1228 struct sta_info *sta,
1229 struct iwl4965_scale_tbl_info *tbl, int index)
1230{
1231 return -1;
1232}
1233#endif /*CONFIG_IWL4965_HT */
1234 1208
1235/* 1209/*
1236 * Set up search table for SISO 1210 * Set up search table for SISO
@@ -1241,7 +1215,6 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1241 struct sta_info *sta, 1215 struct sta_info *sta,
1242 struct iwl4965_scale_tbl_info *tbl, int index) 1216 struct iwl4965_scale_tbl_info *tbl, int index)
1243{ 1217{
1244#ifdef CONFIG_IWL4965_HT
1245 u16 rate_mask; 1218 u16 rate_mask;
1246 u8 is_green = lq_sta->is_green; 1219 u8 is_green = lq_sta->is_green;
1247 s32 rate; 1220 s32 rate;
@@ -1291,9 +1264,6 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1291 IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n", 1264 IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n",
1292 tbl->current_rate, is_green); 1265 tbl->current_rate, is_green);
1293 return 0; 1266 return 0;
1294#else
1295 return -1;
1296#endif /*CONFIG_IWL4965_HT */
1297} 1267}
1298 1268
1299/* 1269/*
@@ -1689,9 +1659,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1689 u8 done_search = 0; 1659 u8 done_search = 0;
1690 u16 high_low; 1660 u16 high_low;
1691 s32 sr; 1661 s32 sr;
1692#ifdef CONFIG_IWL4965_HT
1693 u8 tid = MAX_TID_COUNT; 1662 u8 tid = MAX_TID_COUNT;
1694#endif
1695 1663
1696 IWL_DEBUG_RATE("rate scale calculate new rate for skb\n"); 1664 IWL_DEBUG_RATE("rate scale calculate new rate for skb\n");
1697 1665
@@ -1712,9 +1680,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1712 } 1680 }
1713 lq_sta = (struct iwl4965_lq_sta *)sta->rate_ctrl_priv; 1681 lq_sta = (struct iwl4965_lq_sta *)sta->rate_ctrl_priv;
1714 1682
1715#ifdef CONFIG_IWL4965_HT
1716 rs_tl_add_packet(lq_sta, hdr); 1683 rs_tl_add_packet(lq_sta, hdr);
1717#endif
1718 /* 1684 /*
1719 * Select rate-scale / modulation-mode table to work with in 1685 * Select rate-scale / modulation-mode table to work with in
1720 * the rest of this function: "search" if searching for better 1686 * the rest of this function: "search" if searching for better
@@ -2013,9 +1979,7 @@ lq_update:
2013 * before next round of mode comparisons. */ 1979 * before next round of mode comparisons. */
2014 tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]); 1980 tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]);
2015 if (is_legacy(tbl1->lq_type) && 1981 if (is_legacy(tbl1->lq_type) &&
2016#ifdef CONFIG_IWL4965_HT
2017 (!(conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE)) && 1982 (!(conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE)) &&
2018#endif
2019 (lq_sta->action_counter >= 1)) { 1983 (lq_sta->action_counter >= 1)) {
2020 lq_sta->action_counter = 0; 1984 lq_sta->action_counter = 0;
2021 IWL_DEBUG_RATE("LQ: STAY in legacy table\n"); 1985 IWL_DEBUG_RATE("LQ: STAY in legacy table\n");
@@ -2027,14 +1991,12 @@ lq_update:
2027 * mode for a while before next round of mode comparisons. */ 1991 * mode for a while before next round of mode comparisons. */
2028 if (lq_sta->enable_counter && 1992 if (lq_sta->enable_counter &&
2029 (lq_sta->action_counter >= IWL_ACTION_LIMIT)) { 1993 (lq_sta->action_counter >= IWL_ACTION_LIMIT)) {
2030#ifdef CONFIG_IWL4965_HT
2031 if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) && 1994 if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) &&
2032 (lq_sta->tx_agg_tid_en & (1 << tid)) && 1995 (lq_sta->tx_agg_tid_en & (1 << tid)) &&
2033 (tid != MAX_TID_COUNT)) { 1996 (tid != MAX_TID_COUNT)) {
2034 IWL_DEBUG_RATE("try to aggregate tid %d\n", tid); 1997 IWL_DEBUG_RATE("try to aggregate tid %d\n", tid);
2035 rs_tl_turn_on_agg(priv, tid, lq_sta, sta); 1998 rs_tl_turn_on_agg(priv, tid, lq_sta, sta);
2036 } 1999 }
2037#endif /*CONFIG_IWL4965_HT */
2038 lq_sta->action_counter = 0; 2000 lq_sta->action_counter = 0;
2039 rs_set_stay_in_table(priv, 0, lq_sta); 2001 rs_set_stay_in_table(priv, 0, lq_sta);
2040 } 2002 }
@@ -2279,7 +2241,6 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2279 lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000); 2241 lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000);
2280 lq_sta->active_rate_basic = priv->active_rate_basic; 2242 lq_sta->active_rate_basic = priv->active_rate_basic;
2281 lq_sta->band = priv->band; 2243 lq_sta->band = priv->band;
2282#ifdef CONFIG_IWL4965_HT
2283 /* 2244 /*
2284 * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3), 2245 * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3),
2285 * supp_rates[] does not; shift to convert format, force 9 MBits off. 2246 * supp_rates[] does not; shift to convert format, force 9 MBits off.
@@ -2317,7 +2278,6 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2317 2278
2318 /* as default allow aggregation for all tids */ 2279 /* as default allow aggregation for all tids */
2319 lq_sta->tx_agg_tid_en = IWL_AGG_ALL_TID; 2280 lq_sta->tx_agg_tid_en = IWL_AGG_ALL_TID;
2320#endif /*CONFIG_IWL4965_HT*/
2321#ifdef CONFIG_MAC80211_DEBUGFS 2281#ifdef CONFIG_MAC80211_DEBUGFS
2322 lq_sta->drv = priv; 2282 lq_sta->drv = priv;
2323#endif 2283#endif
@@ -2635,11 +2595,9 @@ static void rs_add_debugfs(void *priv, void *priv_sta,
2635 lq_sta->rs_sta_dbgfs_stats_table_file = 2595 lq_sta->rs_sta_dbgfs_stats_table_file =
2636 debugfs_create_file("rate_stats_table", 0600, dir, 2596 debugfs_create_file("rate_stats_table", 0600, dir,
2637 lq_sta, &rs_sta_dbgfs_stats_table_ops); 2597 lq_sta, &rs_sta_dbgfs_stats_table_ops);
2638#ifdef CONFIG_IWL4965_HT
2639 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = 2598 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file =
2640 debugfs_create_u8("tx_agg_tid_enable", 0600, dir, 2599 debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
2641 &lq_sta->tx_agg_tid_en); 2600 &lq_sta->tx_agg_tid_en);
2642#endif
2643 2601
2644} 2602}
2645 2603
@@ -2648,9 +2606,7 @@ static void rs_remove_debugfs(void *priv, void *priv_sta)
2648 struct iwl4965_lq_sta *lq_sta = priv_sta; 2606 struct iwl4965_lq_sta *lq_sta = priv_sta;
2649 debugfs_remove(lq_sta->rs_sta_dbgfs_scale_table_file); 2607 debugfs_remove(lq_sta->rs_sta_dbgfs_scale_table_file);
2650 debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file); 2608 debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file);
2651#ifdef CONFIG_IWL4965_HT
2652 debugfs_remove(lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file); 2609 debugfs_remove(lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file);
2653#endif
2654} 2610}
2655#endif 2611#endif
2656 2612