Pārlūkot izejas kodu

qcacmn: Address 32 bit specific compilation issues

Fixing 32 bit compliation issues due to improper type
casting and shift operation.

CRs-Fixed: 1043823
Change-Id: I2c05a0c0940c5d65c40aefdc80dc2888fbe87be1
Hardik Kantilal Patel 8 gadi atpakaļ
vecāks
revīzija
343739296c
2 mainītis faili ar 3 papildinājumiem un 4 dzēšanām
  1. 1 2
      hif/src/ce/ce_reg.h
  2. 2 2
      qdf/linux/src/qdf_nbuf.c

+ 1 - 2
hif/src/ce/ce_reg.h

@@ -258,8 +258,7 @@ uint32_t DEBUG_CE_DEST_RING_READ_IDX_GET(struct hif_softc *scn,
 				     & (uint64_t)(0xF00000000))>>32))
 
 #define VADDR_FOR_CE(scn, CE_ctrl_addr)\
-	((uint32_t *)((uint64_t)(scn->vaddr_rri_on_ddr) + \
-	COPY_ENGINE_ID(CE_ctrl_addr)*sizeof(uint32_t)))
+	((scn->vaddr_rri_on_ddr) + COPY_ENGINE_ID(CE_ctrl_addr))
 
 #define SRRI_FROM_DDR_ADDR(addr) ((*(addr)) & 0xFFFF)
 #define DRRI_FROM_DDR_ADDR(addr) (((*(addr))>>16) & 0xFFFF)

+ 2 - 2
qdf/linux/src/qdf_nbuf.c

@@ -1115,8 +1115,8 @@ void __qdf_dmaaddr_to_32s(qdf_dma_addr_t dmaaddr,
 				      uint32_t *lo, uint32_t *hi)
 {
 	if (sizeof(dmaaddr) > sizeof(uint32_t)) {
-		*lo = (uint32_t) (dmaaddr & 0x0ffffffff);
-		*hi = (uint32_t) (dmaaddr >> 32);
+		*lo = lower_32_bits(dmaaddr);
+		*hi = upper_32_bits(dmaaddr);
 	} else {
 		*lo = dmaaddr;
 		*hi = 0;