diff options
Diffstat (limited to 'drivers/staging/vt6655/hostap.c')
-rw-r--r-- | drivers/staging/vt6655/hostap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 134de869cb8..620b8bd745b 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -100,6 +100,7 @@ static int msglevel =MSG_LEVEL_INFO; static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) { + PSDevice apdev_priv; struct net_device *dev = pDevice->dev; int ret; @@ -124,12 +125,13 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) dev->name, pDevice->apdev->name); #else - pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); + pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); if (pDevice->apdev == NULL) return -ENOMEM; memset(pDevice->apdev, 0, sizeof(struct net_device)); - pDevice->apdev->priv = pDevice; + apdev_priv = netdev_priv(pDevice->apdev); + *apdev_priv = *pDevice; memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); pDevice->apdev->hard_start_xmit = pDevice->tx_80211; pDevice->apdev->type = ARPHRD_IEEE80211; |