浏览代码

qcacmn: Typecast address

Tyepcast while getting the head pointer address

Change-Id: Ide94aeeb0589cb4666b7524a6cfa87ef2c568e49
Manoj Ekbote 8 年之前
父节点
当前提交
7980f3eb60
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      hal/wifi3.0/hal_api.h

+ 6 - 4
hal/wifi3.0/hal_api.h

@@ -804,11 +804,13 @@ static inline qdf_dma_addr_t hal_srng_get_hp_addr(void *hal_soc, void *hal_ring)
 	}
 
 	if (srng->ring_dir == HAL_SRNG_SRC_RING) {
-		return hal->shadow_wrptr_mem_paddr + (srng->u.src_ring.hp_addr -
-			hal->shadow_wrptr_mem_vaddr);
+		return hal->shadow_wrptr_mem_paddr +
+		  ((unsigned long)(srng->u.src_ring.hp_addr) -
+		  (unsigned long)(hal->shadow_wrptr_mem_vaddr));
 	} else {
-		return hal->shadow_rdptr_mem_paddr + (srng->u.dst_ring.hp_addr -
-			hal->shadow_rdptr_mem_vaddr);
+		return hal->shadow_rdptr_mem_paddr +
+		  ((unsigned long)(srng->u.dst_ring.hp_addr) -
+		   (unsigned long)(hal->shadow_rdptr_mem_vaddr));
 	}
 }