diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-08 09:37:29 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:03 -0400 |
commit | 5d664a41a0a8c612f66bcb3c2a6f395e9afa6beb (patch) | |
tree | fa256b0edb1a7d94dac56c639cce19adacf8c1c8 /drivers/net/wireless/iwlwifi/iwl-agn-rs.h | |
parent | be5d56ed885a2897ec813eab4a8055d495816e9a (diff) | |
download | blackbird-op-linux-5d664a41a0a8c612f66bcb3c2a6f395e9afa6beb.tar.gz blackbird-op-linux-5d664a41a0a8c612f66bcb3c2a6f395e9afa6beb.zip |
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.h | 10 |
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 d148d73635eb..bac91f1d2aa8 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; |