diff options
author | Daniel Halperin <dhalperi@cs.washington.edu> | 2011-03-18 18:48:55 -0700 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-03-25 06:58:06 -0700 |
commit | 2520546aecc969372080448a2422b39eedb2a528 (patch) | |
tree | da1c3a8a13dc507e916ddb5351aacd2cb552a054 /drivers/net/wireless/iwlwifi/iwl-agn.h | |
parent | d0eb633431ec922f8f9b2040f46d9b42a4cec193 (diff) | |
download | lwn-2520546aecc969372080448a2422b39eedb2a528.tar.gz lwn-2520546aecc969372080448a2422b39eedb2a528.zip |
iwlwifi: add RATE_MCS_RATE_MSK
Throughout the code we use rate_n_flags & 0xff to extract the lower byte
of the rate_n_flags u32 that contains the information about the rate.
Add a #define and remove the use of the magic number.
Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 4f7c9ce9d8bd..39313acb9cc7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h @@ -310,7 +310,7 @@ static inline u32 iwl_ant_idx_to_flags(u8 ant_idx) static inline u8 iwl_hw_get_rate(__le32 rate_n_flags) { - return le32_to_cpu(rate_n_flags) & 0xFF; + return le32_to_cpu(rate_n_flags) & RATE_MCS_RATE_MSK; } static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags) |