Browse Source

qcacmn: Pass valid dev in consistent mem alloc

On 64-bit platform consistent mem alloc was failing due to NULL
passed for dev. Fix this by passing valid dev in consistent mem alloc
call.

Change-Id: I730af58c637dc652c4e249b83d432e0b5f01f7fb
CRs-fixed: 1079575
Kiran Venkatappa 8 years ago
parent
commit
6768509c68
1 changed files with 2 additions and 2 deletions
  1. 2 2
      hal/wifi3.0/hal_srng.c

+ 2 - 2
hal/wifi3.0/hal_srng.c

@@ -521,7 +521,7 @@ void *hal_attach(void *hif_handle, qdf_device_t qdf_dev)
 	hal->dev_base_addr = hif_get_dev_ba(hif_handle);
 	hal->qdf_dev = qdf_dev;
 	hal->shadow_rdptr_mem_vaddr = (uint32_t *)qdf_mem_alloc_consistent(
-		qdf_dev, NULL, sizeof(*(hal->shadow_rdptr_mem_vaddr)) *
+		qdf_dev, qdf_dev->dev, sizeof(*(hal->shadow_rdptr_mem_vaddr)) *
 		HAL_SRNG_ID_MAX, &(hal->shadow_rdptr_mem_paddr));
 	if (!hal->shadow_rdptr_mem_paddr) {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -531,7 +531,7 @@ void *hal_attach(void *hif_handle, qdf_device_t qdf_dev)
 	}
 
 	hal->shadow_wrptr_mem_vaddr =
-		(uint32_t *)qdf_mem_alloc_consistent(qdf_dev, NULL,
+		(uint32_t *)qdf_mem_alloc_consistent(qdf_dev, qdf_dev->dev,
 		sizeof(*(hal->shadow_wrptr_mem_vaddr)) * HAL_MAX_LMAC_RINGS,
 		&(hal->shadow_wrptr_mem_paddr));
 	if (!hal->shadow_wrptr_mem_vaddr) {