diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-05-18 02:48:36 -0700 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-05 23:19:44 -0700 |
commit | 0e1654fa2b91324ab91019c7dfabf3518aca54dd (patch) | |
tree | 6a04db2898f305c2c26dcc52070b67748ec6521b /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 3839f7ce6dc749e3170e1bfa656cfac748528117 (diff) |
iwlwifi: generic scan TX antenna forcing
In "iwlwifi: make scan antenna forcing more generic"
I introduced generic scan RX antenna forcing, which
here I rename to make it more evident. Also add scan
TX antenna forcing, since I will need that as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index ec0f39c93106..00b2cdd3c11e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -141,13 +141,14 @@ int iwl_hwrate_to_plcp_idx(u32 rate_n_flags) } EXPORT_SYMBOL(iwl_hwrate_to_plcp_idx); -u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant) +u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid) { int i; u8 ind = ant; + for (i = 0; i < RATE_ANT_NUM - 1; i++) { ind = (ind + 1) < RATE_ANT_NUM ? ind + 1 : 0; - if (priv->hw_params.valid_tx_ant & BIT(ind)) + if (valid & BIT(ind)) return ind; } return ant; |