staging: wilc1000: del_key: use netdev private wilc instead of g_linux_wlan
authorGlen Lee <glen.lee@atmel.com>
Tue, 20 Oct 2015 08:14:00 +0000 (17:14 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:16:57 +0000 (18:16 -0700)
Use netdev private data member wilc instead of global variable g_linux_wlan.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index 8aea4b560b2e0dd6c1449061ee24a87931a0c5fd..eea7f3b1e4160050bfbee6d611a91291b647422f 100644 (file)
@@ -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;