From: Malcolm Priestley Date: Wed, 29 Oct 2014 17:43:55 +0000 (+0000) Subject: staging: vt6655: mac80211 conversion: device_free_info X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14e5300631fa504058315cc74da66ce18ed41e11;p=linux-beck.git staging: vt6655: mac80211 conversion: device_free_info Remove net device code and add mac80211 unregister code. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 77d81b339158..451b608ca1f1 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -806,31 +806,20 @@ static bool device_get_pci_info(struct vnt_private *pDevice, static void device_free_info(struct vnt_private *pDevice) { - struct net_device *dev = pDevice->dev; - - ASSERT(pDevice); -//2008-0714-01by chester - device_release_WPADEV(pDevice); - -//2008-07-21-01by MikeLiu -//unregister wpadev - if (wpa_set_wpadev(pDevice, 0) != 0) - pr_err("unregister wpadev fail?\n"); + if (!pDevice) + return; -#ifdef HOSTAP - if (dev) - vt6655_hostap_set_hostapd(pDevice, 0, 0); -#endif - if (dev) - unregister_netdev(dev); + if (pDevice->mac_hw) + ieee80211_unregister_hw(pDevice->hw); if (pDevice->PortOffset) iounmap(pDevice->PortOffset); if (pDevice->pcid) pci_release_regions(pDevice->pcid); - if (dev) - free_netdev(dev); + + if (pDevice->hw) + ieee80211_free_hw(pDevice->hw); } static bool device_init_rings(struct vnt_private *pDevice)