staging: wilc1000: remove variable rx_buffer_size
authorGlen Lee <glen.lee@atmel.com>
Thu, 24 Sep 2015 09:15:03 +0000 (18:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 00:39:58 +0000 (02:39 +0200)
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>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan_if.h

index 62ca83f..519fb16 100644 (file)
@@ -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
index 9217b18..46f96c3 100644 (file)
@@ -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 */
index 1dfc673..e87d7cc 100644 (file)
@@ -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 {