From patchwork Thu Oct 1 07:03:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7305381 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 D0C169F314 for ; Thu, 1 Oct 2015 07:04:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1FAA207F0 for ; Thu, 1 Oct 2015 07:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1BF920687 for ; Thu, 1 Oct 2015 07:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751324AbbJAHEV (ORCPT ); Thu, 1 Oct 2015 03:04:21 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:3443 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035AbbJAHET (ORCPT ); Thu, 1 Oct 2015 03:04:19 -0400 Received: from tony-itx.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, 1 Oct 2015 09:04:13 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH 04/12] staging: wilc1000: remove function pointer wlan_add_to_tx_que Date: Thu, 1 Oct 2015 16:03:35 +0900 Message-ID: <1443683023-6498-4-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443683023-6498-1-git-send-email-tony.cho@atmel.com> References: <1443683023-6498-1-git-send-email-tony.cho@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, T_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 From: Glen Lee This patch removes function pointer wlan_add_to_tx_que and just call the function wilc_wlan_txq_add_net_pkt. Remove static from the function also. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 7 +++---- drivers/staging/wilc1000/wilc_wlan.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.h | 2 ++ drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 245357e..e40ee8c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1563,10 +1563,9 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev) nic->netstats.tx_packets++; nic->netstats.tx_bytes += tx_data->size; tx_data->pBssid = g_linux_wlan->strInterfaceInfo[nic->u8IfIdx].aBSSID; - QueueCount = g_linux_wlan->oup.wlan_add_to_tx_que((void *)tx_data, - tx_data->buff, - tx_data->size, - linux_wlan_tx_complete); + QueueCount = wilc_wlan_txq_add_net_pkt((void *)tx_data, tx_data->buff, + tx_data->size, + linux_wlan_tx_complete); if (QueueCount > FLOW_CONTROL_UPPER_THRESHOLD) { netif_stop_queue(g_linux_wlan->strInterfaceInfo[0].wilc_netdev); diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 745953c..fcc4155 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -503,7 +503,8 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size) return 1; } -static int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wilc_tx_complete_func_t func) +int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, + wilc_tx_complete_func_t func) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; struct txq_entry_t *tqe; @@ -2027,7 +2028,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) /** * export functions **/ - oup->wlan_add_to_tx_que = wilc_wlan_txq_add_net_pkt; oup->wlan_handle_tx_que = wilc_wlan_handle_txq; oup->wlan_handle_rx_isr = wilc_handle_isr; oup->wlan_cleanup = wilc_wlan_cleanup; diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index b32ba4f..2af027c 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -308,4 +308,6 @@ typedef struct { int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size); int wilc_wlan_start(void); int wilc_wlan_stop(void); +int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, + wilc_tx_complete_func_t func); #endif diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 9e749c7..25d9d90 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -122,7 +122,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int); #define WILC_TX_ERR_NO_BUF (-2) typedef struct { - int (*wlan_add_to_tx_que)(void *, u8 *, u32, wilc_tx_complete_func_t); int (*wlan_handle_tx_que)(u32 *); void (*wlan_handle_rx_isr)(void); void (*wlan_cleanup)(void);