iwlwifi: pcie: use iwl_get_dma_hi_addr()
authorJohannes Berg <johannes.berg@intel.com>
Mon, 9 Jan 2017 10:31:39 +0000 (11:31 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 11 Apr 2017 11:54:38 +0000 (14:54 +0300)
Use iwl_get_dma_hi_addr() instead of open-coding it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c

index 66bdd2d..9c8ab1a 100644 (file)
@@ -380,8 +380,7 @@ static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd,
                u16 hi_n_len = len << 4;
 
                put_unaligned_le32(addr, &tb->lo);
-               if (sizeof(dma_addr_t) > sizeof(u32))
-                       hi_n_len |= ((addr >> 16) >> 16) & 0xF;
+               hi_n_len |= iwl_get_dma_hi_addr(addr);
 
                tb->hi_n_len = cpu_to_le16(hi_n_len);