aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlen Lee <glen.lee@atmel.com>2015-09-24 18:15:03 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 02:39:58 +0200
commit03eb7266306659080776907498cbfe96f7771d12 (patch)
tree3836ca7384628d39c147adaaeb206984e3a02104
parentstaging: wilc1000: remove variable tx_buffer_size (diff)
staging: wilc1000: remove variable rx_buffer_size
This patch removes two variables rx_buffer_size and use LINUX_RX_SIZE as argument. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/linux_wlan.c3
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c9
-rw-r--r--drivers/staging/wilc1000/wilc_wlan_if.h3
3 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 62ca83fa1551..519fb167726c 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 9217b1864ed6..46f96c332622 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 1dfc673cd574..e87d7cc38520 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 {