]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: wilc1000: CfgConnectResult: use netdev private wilc
authorGlen Lee <glen.lee@atmel.com>
Tue, 20 Oct 2015 08:13:58 +0000 (17:13 +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 33a082f6a74a391dccc4418a4c0bea6e607568a3..15338049042514926bb056328a8f767a161c5764 100644 (file)
@@ -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,