From patchwork Thu Sep 24 09:15:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7254621 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C6109F30C for ; Thu, 24 Sep 2015 09:14:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE19320987 for ; Thu, 24 Sep 2015 09:14:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8883208EB for ; Thu, 24 Sep 2015 09:14:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbbIXJOF (ORCPT ); Thu, 24 Sep 2015 05:14:05 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:25607 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbbIXJOE (ORCPT ); Thu, 24 Sep 2015 05:14:04 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 24 Sep 2015 11:13:58 +0200 From: Glen Lee To: CC: , , , , , , , , , , , Subject: [PATCH 12/15] staging: wilc1000: remove variable rx_buffer_size Date: Thu, 24 Sep 2015 18:15:03 +0900 Message-ID: <1443086106-20482-12-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443086106-20482-1-git-send-email-glen.lee@atmel.com> References: <1443086106-20482-1-git-send-email-glen.lee@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes two variables rx_buffer_size and use LINUX_RX_SIZE as argument. Signed-off-by: Glen Lee --- 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 {