aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-04-15 19:01:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 16:00:00 -0400
commitec35cf2afb0d807c39188e3a9962ffa51f603024 (patch)
treee0356db85fb40cea2a7f13356336e4f10e630985
parent5425e490471d521bae2fce16d22995803b41d90f (diff)
iwlwifi: support different num of tx and rx antennas
This patch adds infrastructure for supporting different number of tx and rx antennas Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-commands.h9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h7
3 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
index 65cd8ae363b4..7aa7f0be8963 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h
@@ -269,11 +269,10 @@ struct iwl_cmd_header {
269 * 10 B active, A inactive 269 * 10 B active, A inactive
270 * 11 Both active 270 * 11 Both active
271 */ 271 */
272#define RATE_MCS_ANT_A_POS 14 272#define RATE_MCS_ANT_POS 14
273#define RATE_MCS_ANT_B_POS 15 273#define RATE_MCS_ANT_A_MSK 0x04000
274#define RATE_MCS_ANT_A_MSK 0x4000 274#define RATE_MCS_ANT_B_MSK 0x08000
275#define RATE_MCS_ANT_B_MSK 0x8000 275#define RATE_MCS_ANT_AB_MSK 0x0C000
276#define RATE_MCS_ANT_AB_MSK 0xc000
277 276
278 277
279/** 278/**
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index a1e91dbb92bb..e647be7608fc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -410,7 +410,7 @@ void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
410 int rate_index; 410 int rate_index;
411 411
412 control->antenna_sel_tx = 412 control->antenna_sel_tx =
413 ((rate_n_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_A_POS); 413 ((rate_n_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS);
414 if (rate_n_flags & RATE_MCS_HT_MSK) 414 if (rate_n_flags & RATE_MCS_HT_MSK)
415 control->flags |= IEEE80211_TXCTL_OFDM_HT; 415 control->flags |= IEEE80211_TXCTL_OFDM_HT;
416 if (rate_n_flags & RATE_MCS_GF_MSK) 416 if (rate_n_flags & RATE_MCS_GF_MSK)
@@ -2040,7 +2040,10 @@ int iwl4965_hw_set_hw_params(struct iwl_priv *priv)
2040 priv->hw_params.max_stations = IWL4965_STATION_COUNT; 2040 priv->hw_params.max_stations = IWL4965_STATION_COUNT;
2041 priv->hw_params.bcast_sta_id = IWL4965_BROADCAST_ID; 2041 priv->hw_params.bcast_sta_id = IWL4965_BROADCAST_ID;
2042 2042
2043 priv->hw_params.tx_ant_num = 2; 2043 priv->hw_params.tx_chains_num = 2;
2044 priv->hw_params.rx_chains_num = 2;
2045 priv->hw_params.valid_tx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX);
2046 priv->hw_params.valid_rx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX);
2044 2047
2045 return 0; 2048 return 0;
2046} 2049}
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index c127c91010b4..cf909e86ed29 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -580,11 +580,14 @@ struct iwl4965_ibss_seq {
580struct iwl_hw_params { 580struct iwl_hw_params {
581 u16 max_txq_num; 581 u16 max_txq_num;
582 u16 tx_cmd_len; 582 u16 tx_cmd_len;
583 u16 tx_ant_num; 583 u8 tx_chains_num;
584 u8 rx_chains_num;
585 u8 valid_tx_ant;
586 u8 valid_rx_ant;
584 u16 max_rxq_size; 587 u16 max_rxq_size;
588 u16 max_rxq_log;
585 u32 rx_buf_size; 589 u32 rx_buf_size;
586 u32 max_pkt_size; 590 u32 max_pkt_size;
587 u16 max_rxq_log;
588 u8 max_stations; 591 u8 max_stations;
589 u8 bcast_sta_id; 592 u8 bcast_sta_id;
590}; 593};