aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.h10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c9
3 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index c1300fb71615..56a3f0c84a1e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -811,10 +811,14 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
811 811
812 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 812 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
813 case CSR_HW_REV_TYPE_5100: 813 case CSR_HW_REV_TYPE_5100:
814 priv->hw_params.tx_chains_num = 1;
815 priv->hw_params.rx_chains_num = 2;
816 priv->hw_params.valid_tx_ant = ANT_B;
817 priv->hw_params.valid_rx_ant = ANT_AB;
818 break;
814 case CSR_HW_REV_TYPE_5150: 819 case CSR_HW_REV_TYPE_5150:
815 priv->hw_params.tx_chains_num = 1; 820 priv->hw_params.tx_chains_num = 1;
816 priv->hw_params.rx_chains_num = 2; 821 priv->hw_params.rx_chains_num = 2;
817 /* FIXME: move to ANT_A, ANT_B, ANT_C enum */
818 priv->hw_params.valid_tx_ant = ANT_A; 822 priv->hw_params.valid_tx_ant = ANT_A;
819 priv->hw_params.valid_rx_ant = ANT_AB; 823 priv->hw_params.valid_rx_ant = ANT_AB;
820 break; 824 break;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
index d148d73635eb..bac91f1d2aa8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
@@ -284,6 +284,16 @@ static inline u8 num_of_ant(u8 mask)
284 !!((mask) & ANT_C); 284 !!((mask) & ANT_C);
285} 285}
286 286
287static inline u8 first_antenna(u8 mask)
288{
289 if (mask & ANT_A)
290 return ANT_A;
291 if (mask & ANT_B)
292 return ANT_B;
293 return ANT_C;
294}
295
296
287static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index) 297static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index)
288{ 298{
289 u8 rate = iwl_rates[rate_index].prev_ieee; 299 u8 rate = iwl_rates[rate_index].prev_ieee;
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index e02c4717c93c..a28a8decc79c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -845,7 +845,7 @@ static void iwl_sta_init_lq(struct iwl_priv *priv, const u8 *addr, int is_ap)
845 struct iwl_link_quality_cmd link_cmd = { 845 struct iwl_link_quality_cmd link_cmd = {
846 .reserved1 = 0, 846 .reserved1 = 0,
847 }; 847 };
848 u16 rate_flags; 848 u32 rate_flags;
849 849
850 /* Set up the rate scaling to start at selected rate, fall back 850 /* Set up the rate scaling to start at selected rate, fall back
851 * all the way down to 1M in IEEE order, and then spin on 1M */ 851 * all the way down to 1M in IEEE order, and then spin on 1M */
@@ -861,15 +861,16 @@ static void iwl_sta_init_lq(struct iwl_priv *priv, const u8 *addr, int is_ap)
861 if (r >= IWL_FIRST_CCK_RATE && r <= IWL_LAST_CCK_RATE) 861 if (r >= IWL_FIRST_CCK_RATE && r <= IWL_LAST_CCK_RATE)
862 rate_flags |= RATE_MCS_CCK_MSK; 862 rate_flags |= RATE_MCS_CCK_MSK;
863 863
864 /* Use Tx antenna B only */ 864 rate_flags |= first_antenna(priv->hw_params.valid_tx_ant) <<
865 rate_flags |= RATE_MCS_ANT_B_MSK; /*FIXME:RS*/ 865 RATE_MCS_ANT_POS;
866 866
867 link_cmd.rs_table[i].rate_n_flags = 867 link_cmd.rs_table[i].rate_n_flags =
868 iwl_hw_set_rate_n_flags(iwl_rates[r].plcp, rate_flags); 868 iwl_hw_set_rate_n_flags(iwl_rates[r].plcp, rate_flags);
869 r = iwl4965_get_prev_ieee_rate(r); 869 r = iwl4965_get_prev_ieee_rate(r);
870 } 870 }
871 871
872 link_cmd.general_params.single_stream_ant_msk = 2; 872 link_cmd.general_params.single_stream_ant_msk =
873 first_antenna(priv->hw_params.valid_tx_ant);
873 link_cmd.general_params.dual_stream_ant_msk = 3; 874 link_cmd.general_params.dual_stream_ant_msk = 3;
874 link_cmd.agg_params.agg_dis_start_th = 3; 875 link_cmd.agg_params.agg_dis_start_th = 3;
875 link_cmd.agg_params.agg_time_limit = cpu_to_le16(4000); 876 link_cmd.agg_params.agg_time_limit = cpu_to_le16(4000);