diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-06-07 10:31:13 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-08-01 12:41:44 +0300 |
commit | c67a3d05024fad00ac160e868967a1e711073993 (patch) | |
tree | 94f15a21cbcee5614fcb8660a45bdf80a0b81422 /drivers/net | |
parent | c8c017a6ff933ff88f3abf7d924e717284e218af (diff) | |
download | linux-c67a3d05024fad00ac160e868967a1e711073993.tar.xz |
iwlwifi: mvm: byte-swap constant instead of variable
Convention has it to byte-swap the constant instead of the variable
when doing bit checks. This also generates better code when the swap
is actually needed, since the constant can be swapped at compile-time.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 13733252c1fb..6b8e57b7234a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -851,7 +851,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rcu_read_lock(); - if (le16_to_cpu(desc->status) & IWL_RX_MPDU_STATUS_SRC_STA_FOUND) { + if (desc->status & cpu_to_le16(IWL_RX_MPDU_STATUS_SRC_STA_FOUND)) { u8 id = desc->sta_id_flags & IWL_RX_MPDU_SIF_STA_ID_MASK; if (!WARN_ON_ONCE(id >= ARRAY_SIZE(mvm->fw_id_to_mac_id))) { |