diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-04-03 19:44:39 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-04-16 16:46:29 -0400 |
commit | 3a23d69582fa4bfcb443631bcd3d0d2afcc19208 (patch) | |
tree | 6bdd4a5cb19535d4b8d3efec0da2b4ceb7b20b45 /drivers/net/wireless/iwlwifi/iwl-sta.c | |
parent | 8715fa28fb4fad62f6004d276ec8e1aa5e664e76 (diff) |
iwlwifi: set correct single/dual stream mask
Even the initial single/dual stream values will be overridden later when
issue link quality command; but still make sense not to use hard-code
value during initialization. Single/Dual stream mask are used to indicate the
best antenna for SISO/MIMO; different NIC has different tx antenna
configuration; so the parameter need to based on the valid tx antenna.
1x2 device: single tx antenna available, only SISO is valid
configuration, but still need to set up MIMO configuration, so set it up
with antenna A & B as default.
2x2 device: two tx antenna available, dual_stream will use both valid
antenna.
3x3 device: three tx antenna available, skip the first antenna and
choice the second and third antenna for dual_stream.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index d86ecd2f9ec2..09d9c4d56450 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -451,7 +451,17 @@ static void iwl_sta_init_lq(struct iwl_priv *priv, const u8 *addr, bool is_ap) | |||
451 | 451 | ||
452 | link_cmd.general_params.single_stream_ant_msk = | 452 | link_cmd.general_params.single_stream_ant_msk = |
453 | first_antenna(priv->hw_params.valid_tx_ant); | 453 | first_antenna(priv->hw_params.valid_tx_ant); |
454 | link_cmd.general_params.dual_stream_ant_msk = 3; | 454 | |
455 | link_cmd.general_params.dual_stream_ant_msk = | ||
456 | priv->hw_params.valid_tx_ant & | ||
457 | ~first_antenna(priv->hw_params.valid_tx_ant); | ||
458 | if (!link_cmd.general_params.dual_stream_ant_msk) { | ||
459 | link_cmd.general_params.dual_stream_ant_msk = ANT_AB; | ||
460 | } else if (num_of_ant(priv->hw_params.valid_tx_ant) == 2) { | ||
461 | link_cmd.general_params.dual_stream_ant_msk = | ||
462 | priv->hw_params.valid_tx_ant; | ||
463 | } | ||
464 | |||
455 | link_cmd.agg_params.agg_dis_start_th = LINK_QUAL_AGG_DISABLE_START_DEF; | 465 | link_cmd.agg_params.agg_dis_start_th = LINK_QUAL_AGG_DISABLE_START_DEF; |
456 | link_cmd.agg_params.agg_time_limit = | 466 | link_cmd.agg_params.agg_time_limit = |
457 | cpu_to_le16(LINK_QUAL_AGG_TIME_LIMIT_DEF); | 467 | cpu_to_le16(LINK_QUAL_AGG_TIME_LIMIT_DEF); |