PRINT_D(INIT_DBG, "%d\n", *buff);
}
-static void *linux_wlan_malloc_atomic(uint32_t sz)
-{
- char *pntr = NULL;
-
- pntr = kmalloc(sz, GFP_ATOMIC);
- PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
- return (void *)pntr;
-
-}
void linux_wlan_free(void *vp)
{
if (vp != NULL) {
nwi->os_func.os_sleep = linux_wlan_msleep;
nwi->os_func.os_atomic_sleep = linux_wlan_atomic_msleep;
nwi->os_func.os_debug = linux_wlan_dbg;
- nwi->os_func.os_malloc_atomic = linux_wlan_malloc_atomic;
nwi->os_func.os_free = linux_wlan_free;
nwi->os_func.os_lock = linux_wlan_lock;
nwi->os_func.os_unlock = linux_wlan_unlock;
return 0;
}
- tqe = (struct txq_entry_t *)p->os_func.os_malloc_atomic(sizeof(struct txq_entry_t));
+ tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC);
if (tqe == NULL) {
PRINT_ER("Failed to allocate memory\n");
return 0;
if (p->quit)
return 0;
- tqe = (struct txq_entry_t *)p->os_func.os_malloc_atomic(sizeof(struct txq_entry_t));
+ tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC);
if (tqe == NULL)
return 0;
if (p->quit)
return 0;
- tqe = (struct txq_entry_t *)p->os_func.os_malloc_atomic(sizeof(struct txq_entry_t));
+ tqe = kmalloc(sizeof(struct txq_entry_t), GFP_KERNEL);
if (tqe == NULL)
return 0;
if (p->quit)
return 0;
- tqe = (struct txq_entry_t *)p->os_func.os_malloc_atomic(sizeof(struct txq_entry_t));
+ tqe = kmalloc(sizeof(struct txq_entry_t), GFP_ATOMIC);
if (tqe == NULL)
return 0;
void (*os_sleep)(uint32_t);
void (*os_atomic_sleep)(uint32_t);
void (*os_debug)(uint8_t *);
- void *(*os_malloc_atomic)(uint32_t);
void (*os_free)(void *);
void (*os_lock)(void *);
void (*os_unlock)(void *);