diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-22 18:02:05 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-10-08 00:51:36 +0200 |
commit | facd982e8246ed25a049d270a71513fb11b901ec (patch) | |
tree | 98f5a4da059171153b7c5ab5aaab6f66c0f77202 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | iwlwifi: remove agn rates info there (diff) | |
download | linux-facd982e8246ed25a049d270a71513fb11b901ec.tar.xz linux-facd982e8246ed25a049d270a71513fb11b901ec.zip |
iwlwifi: move iwl_toggle_rx_ant to agn
The iwl_toggle_tx_ant function is only used
by agn code, so it can be moved into the
agn module instead of being exported from
the core.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 3eeab0a99def..9f1c93bbb01c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -2205,3 +2205,20 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx) WARN_ON(active_rx_cnt == 0 || idle_rx_cnt == 0 || active_rx_cnt < idle_rx_cnt); } + +u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid) +{ + int i; + u8 ind = ant; + + if (priv->band == IEEE80211_BAND_2GHZ && + priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) + return 0; + + for (i = 0; i < RATE_ANT_NUM - 1; i++) { + ind = (ind + 1) < RATE_ANT_NUM ? ind + 1 : 0; + if (valid & BIT(ind)) + return ind; + } + return ant; +} |