Browse Source

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
Himanshu Agarwal 8 years ago
parent
commit
6d4c2be635
1 changed files with 3 additions and 3 deletions
  1. 3 3
      core/dp/htt/htt_tx.c

+ 3 - 3
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++;