diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-07 21:37:29 -0400 |
---|---|---|
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) |
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) | |||
284 | !!((mask) & ANT_C); | 284 | !!((mask) & ANT_C); |
285 | } | 285 | } |
286 | 286 | ||
287 | static inline u8 first_antenna(u8 mask) | ||
288 | { | ||
289 | if (mask & ANT_A) | ||
290 | return ANT_A; | ||
291 | if (mask & ANT_B) | ||
292 | return ANT_B; | ||
293 | return ANT_C; | ||
294 | } | ||
295 | |||
296 | |||
287 | static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index) | 297 | static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index) |
288 | { | 298 | { |
289 | u8 rate = iwl_rates[rate_index].prev_ieee; | 299 | u8 rate = iwl_rates[rate_index].prev_ieee; |