From 6d4c2be63510274c5e4a7e08be5196f26612059e Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Fri, 2 Sep 2016 17:01:18 +0530 Subject: [PATCH] qcacld-3.0: Fix 32 bit compilation in IPA path Compilation error is seen for 32 bit builds in htt_tx_ipa_uc_wdi_tx_buf_alloc as buffer_paddr, which is defined as unsigned long and will be a 32 bit bit variable for 32 bit builds, is right shifted by 32 to get the high 32 bits for fragment descriptor. Instead of right shifting buffer_paddr by 32, use APIs lower_32_bits and upper_32_bits. Change-Id: I283792333075c11219a491d305b2822849c025f3 CRs-Fixed: 1062916 --- core/dp/htt/htt_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 95a42dc16ec5..8c6271b7ac58 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -1100,12 +1100,12 @@ int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev, /* Frag Desc Pointer */ /* 64bits descriptor, Low 32bits */ - *header_ptr = (uint32_t) (buffer_paddr + - IPA_UC_TX_BUF_FRAG_DESC_OFFSET); + *header_ptr = qdf_get_lower_32_bits(buffer_paddr + + IPA_UC_TX_BUF_FRAG_DESC_OFFSET); header_ptr++; /* 64bits descriptor, high 32bits */ - *header_ptr = (buffer_paddr >> IPA_UC_TX_BUF_PADDR_HI_OFFSET) & + *header_ptr = qdf_get_upper_32_bits(buffer_paddr) & IPA_UC_TX_BUF_PADDR_HI_MASK; header_ptr++;