This patch removes two variables rx_buffer_size and use LINUX_RX_SIZE as argument. Signed-off-by: Glen Lee <glen.lee@xxxxxxxxx> --- drivers/staging/wilc1000/linux_wlan.c | 3 --- drivers/staging/wilc1000/wilc_wlan.c | 9 ++------- drivers/staging/wilc1000/wilc_wlan_if.h | 3 --- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 62ca83f..519fb16 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1057,9 +1057,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) nwi->os_context.os_private = (void *)nic; nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs; -#if defined(MEMORY_STATIC) - nwi->os_context.rx_buffer_size = LINUX_RX_SIZE; -#endif nwi->os_func.os_wait = linux_wlan_lock_timeout; #ifdef WILC_SDIO diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 4fc0a6a..84e544d 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -51,7 +51,6 @@ typedef struct { * RX buffer **/ #ifdef MEMORY_STATIC - u32 rx_buffer_size; u8 *rx_buffer; u32 rx_buffer_offset; #endif @@ -1308,7 +1307,7 @@ static void wilc_wlan_handle_isr_ext(u32 int_status) if (size > 0) { #ifdef MEMORY_STATIC - if (p->rx_buffer_size - offset < size) + if (LINUX_RX_SIZE - offset < size) offset = 0; if (p->rx_buffer) @@ -1968,10 +1967,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) memcpy((void *)&g_wlan.os_func, (void *)&inp->os_func, sizeof(wilc_wlan_os_func_t)); memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t)); g_wlan.txq_lock = inp->os_context.txq_critical_section; - -#if defined (MEMORY_STATIC) - g_wlan.rx_buffer_size = inp->os_context.rx_buffer_size; -#endif /*** * host interface init **/ @@ -2028,7 +2023,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) /* rx_buffer is not used unless we activate USE_MEM STATIC which is not applicable, allocating such memory is useless*/ #if defined (MEMORY_STATIC) if (g_wlan.rx_buffer == NULL) - g_wlan.rx_buffer = kmalloc(g_wlan.rx_buffer_size, GFP_KERNEL); + g_wlan.rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL); PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer); if (g_wlan.rx_buffer == NULL) { /* ENOBUFS 105 */ diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index a746ad4..9ab34ca 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -108,9 +108,6 @@ typedef struct { typedef struct { void *os_private; void *txq_critical_section; -#if defined(MEMORY_STATIC) - u32 rx_buffer_size; -#endif } wilc_wlan_os_context_t; typedef struct { -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel