From patchwork Tue Oct 27 09:27:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7495071 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6991FBEEA4 for ; Tue, 27 Oct 2015 09:26:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C7162081F for ; Tue, 27 Oct 2015 09:26:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96F84206E4 for ; Tue, 27 Oct 2015 09:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471AbbJ0J0W (ORCPT ); Tue, 27 Oct 2015 05:26:22 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:58161 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbbJ0J0V (ORCPT ); Tue, 27 Oct 2015 05:26:21 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 27 Oct 2015 10:26:17 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH V2 13/27] staging: wilc1000: host_int_init: add argument net_device Date: Tue, 27 Oct 2015 18:27:49 +0900 Message-ID: <1445938083-20445-13-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445938083-20445-1-git-send-email-glen.lee@atmel.com> References: <1445938083-20445-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 add argument net_device and pass netdev private data member wilc to kthread_run. Pass net_device to the function as well. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 11 +++++++++-- drivers/staging/wilc1000/host_interface.h | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 930dcba..f658594 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -7,6 +7,7 @@ #include "wilc_wlan_if.h" #include "wilc_msgqueue.h" #include +#include "wilc_wfi_netdevice.h" extern u8 connecting; @@ -4131,11 +4132,16 @@ void host_int_send_network_info_to_host { } -s32 host_int_init(struct host_if_drv **hif_drv_handler) +s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) { s32 result = 0; struct host_if_drv *hif_drv; int err; + perInterface_wlan_t *nic; + struct wilc *wilc; + + nic = netdev_priv(dev); + wilc = nic->wilc; PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1); @@ -4181,7 +4187,8 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler) goto _fail_; } - hif_thread_handler = kthread_run(hostIFthread, NULL, "WILC_kthread"); + hif_thread_handler = kthread_run(hostIFthread, wilc, + "WILC_kthread"); if (IS_ERR(hif_thread_handler)) { PRINT_ER("Failed to creat Thread\n"); diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index f3fb628..0fd2eda 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -911,7 +911,7 @@ void host_int_send_network_info_to_host * @date 8 March 2012 * @version 1.0 */ -s32 host_int_init(struct host_if_drv **phWFIDrv); +s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv); /** * @brief host interface initialization function diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index ac32d2b..21d053d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -3464,7 +3464,7 @@ int wilc_init_host_int(struct net_device *net) priv->bInP2PlistenState = false; sema_init(&(priv->hSemScanReq), 1); - s32Error = host_int_init(&priv->hWILCWFIDrv); + s32Error = host_int_init(net, &priv->hWILCWFIDrv); if (s32Error) PRINT_ER("Error while initializing hostinterface\n");