aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.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-core.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-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 59dd608b9095..20c7ff382914 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -141,7 +141,17 @@ int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
141} 141}
142EXPORT_SYMBOL(iwl_hwrate_to_plcp_idx); 142EXPORT_SYMBOL(iwl_hwrate_to_plcp_idx);
143 143
144 144u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant)
145{
146 int i;
147 u8 ind = ant;
148 for (i = 0; i < RATE_ANT_NUM - 1; i++) {
149 ind = (ind + 1) < RATE_ANT_NUM ? ind + 1 : 0;
150 if (priv->hw_params.valid_tx_ant & BIT(ind))
151 return ind;
152 }
153 return ant;
154}
145 155
146const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 156const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
147EXPORT_SYMBOL(iwl_bcast_addr); 157EXPORT_SYMBOL(iwl_bcast_addr);
@@ -938,7 +948,6 @@ int iwl_init_drv(struct iwl_priv *priv)
938 948
939 priv->iw_mode = NL80211_IFTYPE_STATION; 949 priv->iw_mode = NL80211_IFTYPE_STATION;
940 950
941 priv->use_ant_b_for_management_frame = 1; /* start with ant B */
942 priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; 951 priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED;
943 952
944 /* Choose which receivers/antennas to use */ 953 /* Choose which receivers/antennas to use */