From patchwork Tue Oct 20 08:13:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7443501 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 602909F36A for ; Tue, 20 Oct 2015 08:15:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F1B620858 for ; Tue, 20 Oct 2015 08:15:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E8D92084A for ; Tue, 20 Oct 2015 08:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753568AbbJTIPH (ORCPT ); Tue, 20 Oct 2015 04:15:07 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:17049 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753302AbbJTIPC (ORCPT ); Tue, 20 Oct 2015 04:15:02 -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; Tue, 20 Oct 2015 10:14:58 +0200 From: Tony Cho To: CC: , , , , , , , , Subject: [PATCH 08/13] staging: wilc1000: CfgConnectResult: use netdev private wilc Date: Tue, 20 Oct 2015 17:13:58 +0900 Message-ID: <1445328843-32247-8-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445328843-32247-1-git-send-email-tony.cho@atmel.com> References: <1445328843-32247-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, 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 Use netdev private data member wilc instead of global variable g_linux_wlan. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 33a082f..1533804 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -537,11 +537,15 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent, struct net_device *dev; struct host_if_drv *pstrWFIDrv; u8 NullBssid[ETH_ALEN] = {0}; + struct wilc *wl; + perInterface_wlan_t *nic; connecting = 0; priv = (struct wilc_priv *)pUserVoid; dev = priv->dev; + nic = netdev_priv(dev); + wl = nic->wilc; pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv; if (enuConnDisconnEvent == CONN_DISCONN_EVENT_CONN_RESP) { @@ -624,12 +628,12 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent, u8WLANChannel = INVALID_CHANNEL; /*Incase "P2P CLIENT Connected" send deauthentication reason by 3 to force the WPA_SUPPLICANT to directly change * virtual interface to station*/ - if ((pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].ndev)) { + if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1].ndev)) { pstrDisconnectNotifInfo->u16reason = 3; } /*Incase "P2P CLIENT during connection(not connected)" send deauthentication reason by 1 to force the WPA_SUPPLICANT * to scan again and retry the connection*/ - else if ((!pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].ndev)) { + else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1].ndev)) { pstrDisconnectNotifInfo->u16reason = 1; } cfg80211_disconnected(dev, pstrDisconnectNotifInfo->u16reason, pstrDisconnectNotifInfo->ie,