immediately following reset when pin 9 (SDIO_SPI_CFG) is tied to
VDDIO. Select this if your platform is using the SPI bus.
-choice
- prompt "WILC1000 Memory Allocation"
- depends on WILC1000
- default WILC1000_PREALLOCATE_AT_LOADING_DRIVER
-
-config WILC1000_PREALLOCATE_AT_LOADING_DRIVER
- bool "Preallocate memory at loading driver"
- ---help---
- This choice supports static allocation of the memory
- for the receive buffer. The driver will allocate the RX buffer
- during initial time. The driver will also free the buffer
- by calling network device stop.
-
-config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY
- bool "Dynamically allocate memory in real time"
- ---help---
- This choice supports dynamic allocation of the memory
- for the receive buffer. The driver will allocate the RX buffer
- when it is required.
-endchoice
-
-
config WILC1000_HW_OOB_INTR
bool "WILC1000 out of band interrupt"
depends on WILC1000_SDIO
ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 -DWILC_DEBUGFS
#ccflags-y += -DTCP_ACK_FILTER
-ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
- -DWILC_PREALLOC_AT_INSMOD
-
-ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC
-
-
wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc_msgqueue.o \
coreconfigurator.o host_interface.o \
u32 cfg_frame_offset;
int cfg_seq_no;
- #ifdef MEMORY_STATIC
u8 *rx_buffer;
u32 rx_buffer_offset;
- #endif
u8 *tx_buffer;
u32 tx_buffer_offset;
if (offset >= size)
break;
} while (1);
-#ifndef MEMORY_STATIC
- kfree(buffer);
-#endif
kfree(rqe);
if (has_packet)
static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status)
{
wilc_wlan_dev_t *p = &g_wlan;
-#ifdef MEMORY_STATIC
u32 offset = p->rx_buffer_offset;
-#endif
u8 *buffer = NULL;
u32 size;
u32 retries = 0;
}
if (size > 0) {
-#ifdef MEMORY_STATIC
if (LINUX_RX_SIZE - offset < size)
offset = 0;
goto _end_;
}
-#else
- buffer = kmalloc(size, GFP_KERNEL);
- if (!buffer) {
- usleep_range(100 * 1000, 100 * 1000);
- goto _end_;
- }
-#endif
p->hif_func.hif_clear_int_ext(wilc,
DATA_INT_CLR | ENABLE_RX_VMM);
ret = p->hif_func.hif_block_rx_ext(wilc, 0, buffer, size);
}
_end_:
if (ret) {
-#ifdef MEMORY_STATIC
offset += size;
p->rx_buffer_offset = offset;
-#endif
rqe = kmalloc(sizeof(*rqe), GFP_KERNEL);
if (rqe) {
rqe->buffer = buffer;
PRINT_D(RX_DBG, "rxq entery Size= %d - Address = %p\n", rqe->buffer_size, rqe->buffer);
wilc_wlan_rxq_add(wilc, rqe);
}
- } else {
-#ifndef MEMORY_STATIC
- kfree(buffer);
-#endif
}
}
wilc_wlan_handle_rxq(wilc);
rqe = wilc_wlan_rxq_remove(wilc);
if (!rqe)
break;
-#ifndef MEMORY_STATIC
- kfree(rqe->buffer);
-#endif
kfree(rqe);
} while (1);
- #ifdef MEMORY_STATIC
kfree(p->rx_buffer);
p->rx_buffer = NULL;
- #endif
kfree(p->tx_buffer);
acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
goto _fail_;
}
-#if defined(MEMORY_STATIC)
if (!g_wlan.rx_buffer)
g_wlan.rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL);
PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer);
PRINT_ER("Can't allocate Rx Buffer");
goto _fail_;
}
-#endif
if (!init_chip(dev)) {
ret = -EIO;
_fail_:
- #ifdef MEMORY_STATIC
kfree(g_wlan.rx_buffer);
g_wlan.rx_buffer = NULL;
- #endif
kfree(g_wlan.tx_buffer);
g_wlan.tx_buffer = NULL;