Return-path: Received: from eusmtp01.atmel.com ([212.144.249.242]:17202 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753758AbbJTIPW (ORCPT ); Tue, 20 Oct 2015 04:15:22 -0400 From: Tony Cho To: CC: , , , , , , , , Subject: [PATCH 10/13] staging: wilc1000: del_key: use netdev private wilc instead of g_linux_wlan Date: Tue, 20 Oct 2015 17:14:00 +0900 Message-ID: <1445328843-32247-10-git-send-email-tony.cho@atmel.com> (sfid-20151020_101531_430074_4D969097) 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 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 8aea4b5..eea7f3b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1360,11 +1360,15 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac_addr) { struct wilc_priv *priv; + struct wilc *wl; + perInterface_wlan_t *nic; priv = wiphy_priv(wiphy); + nic = netdev_priv(netdev); + wl = nic->wilc; /*delete saved keys, if any*/ - if (netdev == g_linux_wlan->vif[0].ndev) { + if (netdev == wl->vif[0].ndev) { g_ptk_keys_saved = false; g_gtk_keys_saved = false; g_wep_keys_saved = false; -- 1.9.1