schedule_timeout_uninterruptible(t);
}
EXPORT_SYMBOL_GPL(CsrThreadSleep);
-
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrMemAllocDma
- *
- * DESCRIPTION
- * Allocate DMA capable dynamic memory of a given size.
- *
- * RETURNS
- * Pointer to allocated memory, or NULL in case of failure.
- * Allocated memory is not initialised.
- *
- *----------------------------------------------------------------------------*/
-void *CsrMemAllocDma(size_t size)
-{
- return kmalloc(size, GFP_KERNEL | GFP_DMA);
-}
-EXPORT_SYMBOL_GPL(CsrMemAllocDma);
*----------------------------------------------------------------------------*/
void CsrThreadSleep(u16 sleepTimeInMs);
-#ifndef CSR_PMEM_DEBUG_ENABLE
-/*----------------------------------------------------------------------------*
- * NAME
- * CsrMemAllocDma
- *
- * DESCRIPTION
- * Allocate dynamic memory suitable for DMA transfers.
- *
- * RETURNS
- * Pointer to allocated memory, or NULL in case of failure.
- * Allocated memory is not initialised.
- *
- *----------------------------------------------------------------------------*/
-#ifdef CSR_MEM_DEBUG
-void *CsrMemAllocDmaDebug(size_t size,
- const char *file, u32 line);
-#define CsrMemAllocDma(sz) CsrMemAllocDmaDebug((sz), __FILE__, __LINE__)
-#else
-void *CsrMemAllocDma(size_t size);
-#endif
-
-
-#else
-
-#include "csr_pmem.h"
-
-#define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__)
-
-#endif
-
-
#ifdef __cplusplus
}
#endif
/*
* Allocate memory for the from-host and to-host signal buffers.
*/
- card->fh_buffer.buf = CsrMemAllocDma(UNIFI_FH_BUF_SIZE);
+ card->fh_buffer.buf = kmalloc(UNIFI_FH_BUF_SIZE, GFP_KERNEL);
if (card->fh_buffer.buf == NULL)
{
unifi_error(card->ospriv, "Failed to allocate memory for F-H signals\n");
card->fh_buffer.ptr = card->fh_buffer.buf;
card->fh_buffer.count = 0;
- card->th_buffer.buf = CsrMemAllocDma(UNIFI_FH_BUF_SIZE);
+ card->th_buffer.buf = kmalloc(UNIFI_FH_BUF_SIZE, GFP_KERNEL);
if (card->th_buffer.buf == NULL)
{
unifi_error(card->ospriv, "Failed to allocate memory for T-H signals\n");
if (len != 0 && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3))
{
- host_bulk_data_slot = CsrMemAllocDma(len);
+ host_bulk_data_slot = kmalloc(len, GFP_KERNEL);
if (!host_bulk_data_slot)
{
return CSR_WIFI_HIP_RESULT_INVALID_VALUE;
}
- buf = CsrMemAllocDma(buf_size);
+ buf = kmalloc(buf_size, GFP_KERNEL);
if (buf == NULL)
{
unifi_error(card->ospriv, "Failed to allocate transfer buffer for firmware download\n");