aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-25 05:15:51 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:25 -0500
commitc8b0e6e19c0bcd30689cb6c6f64eb140f5d61894 (patch)
tree5c9ef861d391a3d8d56f3e24cd9920f19161f7d2 /drivers/net/wireless/iwlwifi/iwl-4965-rs.c
parent5d08cd1dfdc57dc834c47eb9f023fcf861f3d6bf (diff)
iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Currently the iwl3945 & iwl4965 drivers share some common Kconfig symbols. This split it up into options for the individual drivers and gets rid of all the CONFIG_IWLWIFI cruft. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zhu Yi <yi.zhu@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.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 0e384e60648e..8f6e9f8395c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -197,7 +197,7 @@ static inline u8 iwl_rate_get_rate(u32 rate_n_flags)
197static int rs_send_lq_cmd(struct iwl_priv *priv, 197static int rs_send_lq_cmd(struct iwl_priv *priv,
198 struct iwl_link_quality_cmd *lq, u8 flags) 198 struct iwl_link_quality_cmd *lq, u8 flags)
199{ 199{
200#ifdef CONFIG_IWLWIFI_DEBUG 200#ifdef CONFIG_IWL4965_DEBUG
201 int i; 201 int i;
202#endif 202#endif
203 struct iwl_host_cmd cmd = { 203 struct iwl_host_cmd cmd = {
@@ -218,7 +218,7 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,
218 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n", 218 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n",
219 lq->general_params.single_stream_ant_msk, 219 lq->general_params.single_stream_ant_msk,
220 lq->general_params.dual_stream_ant_msk); 220 lq->general_params.dual_stream_ant_msk);
221#ifdef CONFIG_IWLWIFI_DEBUG 221#ifdef CONFIG_IWL4965_DEBUG
222 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) 222 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)
223 IWL_DEBUG_RATE("lq index %d 0x%X\n", 223 IWL_DEBUG_RATE("lq index %d 0x%X\n",
224 i, lq->rs_table[i].rate_n_flags); 224 i, lq->rs_table[i].rate_n_flags);
@@ -442,13 +442,13 @@ static inline void rs_toggle_antenna(struct iwl_rate *new_rate,
442 442
443static inline u8 rs_use_green(struct iwl_priv *priv) 443static inline u8 rs_use_green(struct iwl_priv *priv)
444{ 444{
445#ifdef CONFIG_IWLWIFI_HT 445#ifdef CONFIG_IWL4965_HT
446 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht) 446 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht)
447 return 0; 447 return 0;
448 448
449 return ((priv->current_assoc_ht.is_green_field) && 449 return ((priv->current_assoc_ht.is_green_field) &&
450 !(priv->current_assoc_ht.operating_mode & 0x4)); 450 !(priv->current_assoc_ht.operating_mode & 0x4));
451#endif /*CONFIG_IWLWIFI_HT */ 451#endif /*CONFIG_IWL4965_HT */
452 return 0; 452 return 0;
453} 453}
454 454
@@ -826,7 +826,7 @@ static void rs_get_expected_tpt_table(struct iwl_rate_scale_priv *lq_data,
826 tbl->expected_tpt = expected_tpt_G; 826 tbl->expected_tpt = expected_tpt_G;
827} 827}
828 828
829#ifdef CONFIG_IWLWIFI_HT 829#ifdef CONFIG_IWL4965_HT
830static s32 rs_get_best_rate(struct iwl_priv *priv, 830static s32 rs_get_best_rate(struct iwl_priv *priv,
831 struct iwl_rate_scale_priv *lq_data, 831 struct iwl_rate_scale_priv *lq_data,
832 struct iwl_scale_tbl_info *tbl, 832 struct iwl_scale_tbl_info *tbl,
@@ -879,7 +879,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
879 879
880 return new_rate; 880 return new_rate;
881} 881}
882#endif /* CONFIG_IWLWIFI_HT */ 882#endif /* CONFIG_IWL4965_HT */
883 883
884static inline u8 rs_is_both_ant_supp(u8 valid_antenna) 884static inline u8 rs_is_both_ant_supp(u8 valid_antenna)
885{ 885{
@@ -890,7 +890,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,
890 struct iwl_rate_scale_priv *lq_data, 890 struct iwl_rate_scale_priv *lq_data,
891 struct iwl_scale_tbl_info *tbl, int index) 891 struct iwl_scale_tbl_info *tbl, int index)
892{ 892{
893#ifdef CONFIG_IWLWIFI_HT 893#ifdef CONFIG_IWL4965_HT
894 u16 rate_mask; 894 u16 rate_mask;
895 s32 rate; 895 s32 rate;
896 s8 is_green = lq_data->is_green; 896 s8 is_green = lq_data->is_green;
@@ -938,7 +938,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,
938 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 938 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
939 tbl->current_rate.rate_n_flags, is_green); 939 tbl->current_rate.rate_n_flags, is_green);
940 940
941#endif /*CONFIG_IWLWIFI_HT */ 941#endif /*CONFIG_IWL4965_HT */
942 return 0; 942 return 0;
943} 943}
944 944
@@ -946,7 +946,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
946 struct iwl_rate_scale_priv *lq_data, 946 struct iwl_rate_scale_priv *lq_data,
947 struct iwl_scale_tbl_info *tbl, int index) 947 struct iwl_scale_tbl_info *tbl, int index)
948{ 948{
949#ifdef CONFIG_IWLWIFI_HT 949#ifdef CONFIG_IWL4965_HT
950 u16 rate_mask; 950 u16 rate_mask;
951 u8 is_green = lq_data->is_green; 951 u8 is_green = lq_data->is_green;
952 s32 rate; 952 s32 rate;
@@ -992,7 +992,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
992 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 992 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
993 tbl->current_rate.rate_n_flags, is_green); 993 tbl->current_rate.rate_n_flags, is_green);
994 994
995#endif /*CONFIG_IWLWIFI_HT */ 995#endif /*CONFIG_IWL4965_HT */
996 return 0; 996 return 0;
997} 997}
998 998
@@ -1568,7 +1568,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1568 tbl1 = &(lq_data->lq_info[lq_data->active_tbl]); 1568 tbl1 = &(lq_data->lq_info[lq_data->active_tbl]);
1569 1569
1570 if (is_legacy(tbl1->lq_type) && 1570 if (is_legacy(tbl1->lq_type) &&
1571#ifdef CONFIG_IWLWIFI_HT 1571#ifdef CONFIG_IWL4965_HT
1572 !priv->current_assoc_ht.is_ht && 1572 !priv->current_assoc_ht.is_ht &&
1573#endif 1573#endif
1574 (lq_data->action_counter >= 1)) { 1574 (lq_data->action_counter >= 1)) {
@@ -1579,14 +1579,14 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1579 1579
1580 if (lq_data->enable_counter && 1580 if (lq_data->enable_counter &&
1581 (lq_data->action_counter >= IWL_ACTION_LIMIT)) { 1581 (lq_data->action_counter >= IWL_ACTION_LIMIT)) {
1582#ifdef CONFIG_IWLWIFI_HT_AGG 1582#ifdef CONFIG_IWL4965_HT_AGG
1583 if ((lq_data->last_tpt > TID_AGG_TPT_THREHOLD) && 1583 if ((lq_data->last_tpt > TID_AGG_TPT_THREHOLD) &&
1584 (priv->lq_mngr.agg_ctrl.auto_agg)) { 1584 (priv->lq_mngr.agg_ctrl.auto_agg)) {
1585 priv->lq_mngr.agg_ctrl.tid_retry = 1585 priv->lq_mngr.agg_ctrl.tid_retry =
1586 TID_ALL_SPECIFIED; 1586 TID_ALL_SPECIFIED;
1587 schedule_work(&priv->agg_work); 1587 schedule_work(&priv->agg_work);
1588 } 1588 }
1589#endif /*CONFIG_IWLWIFI_HT_AGG */ 1589#endif /*CONFIG_IWL4965_HT_AGG */
1590 lq_data->action_counter = 0; 1590 lq_data->action_counter = 0;
1591 rs_set_stay_in_table(0, lq_data); 1591 rs_set_stay_in_table(0, lq_data);
1592 } 1592 }
@@ -1806,7 +1806,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1806 crl->active_rate &= ~(0x1000); 1806 crl->active_rate &= ~(0x1000);
1807 crl->active_rate_basic = priv->active_rate_basic; 1807 crl->active_rate_basic = priv->active_rate_basic;
1808 crl->phymode = priv->phymode; 1808 crl->phymode = priv->phymode;
1809#ifdef CONFIG_IWLWIFI_HT 1809#ifdef CONFIG_IWL4965_HT
1810 crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0] << 1); 1810 crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0] << 1);
1811 crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0] & 0x1); 1811 crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0] & 0x1);
1812 crl->active_siso_rate &= ~((u16)0x2); 1812 crl->active_siso_rate &= ~((u16)0x2);
@@ -1818,7 +1818,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1818 crl->active_mimo_rate = crl->active_mimo_rate << IWL_FIRST_OFDM_RATE; 1818 crl->active_mimo_rate = crl->active_mimo_rate << IWL_FIRST_OFDM_RATE;
1819 IWL_DEBUG_HT("MIMO RATE 0x%X SISO MASK 0x%X\n", crl->active_siso_rate, 1819 IWL_DEBUG_HT("MIMO RATE 0x%X SISO MASK 0x%X\n", crl->active_siso_rate,
1820 crl->active_mimo_rate); 1820 crl->active_mimo_rate);
1821#endif /*CONFIG_IWLWIFI_HT*/ 1821#endif /*CONFIG_IWL4965_HT*/
1822#ifdef CONFIG_MAC80211_DEBUGFS 1822#ifdef CONFIG_MAC80211_DEBUGFS
1823 crl->drv = priv; 1823 crl->drv = priv;
1824#endif 1824#endif
@@ -1937,12 +1937,12 @@ static void rs_clear(void *priv_rate)
1937 IWL_DEBUG_RATE("enter\n"); 1937 IWL_DEBUG_RATE("enter\n");
1938 1938
1939 priv->lq_mngr.lq_ready = 0; 1939 priv->lq_mngr.lq_ready = 0;
1940#ifdef CONFIG_IWLWIFI_HT 1940#ifdef CONFIG_IWL4965_HT
1941#ifdef CONFIG_IWLWIFI_HT_AGG 1941#ifdef CONFIG_IWL4965_HT_AGG
1942 if (priv->lq_mngr.agg_ctrl.granted_ba) 1942 if (priv->lq_mngr.agg_ctrl.granted_ba)
1943 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED); 1943 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED);
1944#endif /*CONFIG_IWLWIFI_HT_AGG */ 1944#endif /*CONFIG_IWL4965_HT_AGG */
1945#endif /* CONFIG_IWLWIFI_HT */ 1945#endif /* CONFIG_IWL4965_HT */
1946 1946
1947 IWL_DEBUG_RATE("leave\n"); 1947 IWL_DEBUG_RATE("leave\n");
1948} 1948}