aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-10-14 15:32:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:29 -0400
commit76eff18bdc5feaa53f1be33709b67df02f1d55e9 (patch)
treeb532664298ca1ecad5bebf2155fe194d2b0c20dd /drivers/net/wireless/iwlwifi/iwl-tx.c
parent961ba60abe02517d0c8252f9befb1478f4e008a4 (diff)
iwlwifi: unify tx antenna toggling
TX antenna toggling is requested for management frames in tx and scanning. I addition toggling in scanning was incorrect; Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 87c955e88427..b047fd156c0b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -674,11 +674,11 @@ static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
674 __le16 fc, int sta_id, 674 __le16 fc, int sta_id,
675 int is_hcca) 675 int is_hcca)
676{ 676{
677 u32 rate_flags = 0;
678 int rate_idx;
677 u8 rts_retry_limit = 0; 679 u8 rts_retry_limit = 0;
678 u8 data_retry_limit = 0; 680 u8 data_retry_limit = 0;
679 u8 rate_plcp; 681 u8 rate_plcp;
680 u16 rate_flags = 0;
681 int rate_idx;
682 682
683 rate_idx = min(ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xffff, 683 rate_idx = min(ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xffff,
684 IWL_RATE_COUNT - 1); 684 IWL_RATE_COUNT - 1);
@@ -721,14 +721,8 @@ static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
721 break; 721 break;
722 } 722 }
723 723
724 /* Alternate between antenna A and B for successive frames */ 724 priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant);
725 if (priv->use_ant_b_for_management_frame) { 725 rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
726 priv->use_ant_b_for_management_frame = 0;
727 rate_flags |= RATE_MCS_ANT_B_MSK;
728 } else {
729 priv->use_ant_b_for_management_frame = 1;
730 rate_flags |= RATE_MCS_ANT_A_MSK;
731 }
732 } 726 }
733 727
734 tx_cmd->rts_retry_limit = rts_retry_limit; 728 tx_cmd->rts_retry_limit = rts_retry_limit;