summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-10-08 09:37:29 +0800
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:03 -0400
commit5d664a41a0a8c612f66bcb3c2a6f395e9afa6beb (patch)
treefa256b0edb1a7d94dac56c639cce19adacf8c1c8 /drivers/net/wireless/iwlwifi/iwl-agn-rs.h
parentbe5d56ed885a2897ec813eab4a8055d495816e9a (diff)
iwlwifi: take a valid antenna upon rate scale init
This patch selects a valid antennae upon rate scale init. This solves a SYSASSERT complaining that the driver is setting a non valid antenna in the LQ CMD. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
index d148d73635e..bac91f1d2aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
@@ -284,6 +284,16 @@ static inline u8 num_of_ant(u8 mask)
!!((mask) & ANT_C);
}
+static inline u8 first_antenna(u8 mask)
+{
+ if (mask & ANT_A)
+ return ANT_A;
+ if (mask & ANT_B)
+ return ANT_B;
+ return ANT_C;
+}
+
+
static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index)
{
u8 rate = iwl_rates[rate_index].prev_ieee;