]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/net/wireless/ipw2x00/libipw_module.c
tree-wide: fix assorted typos all over the place
[mirror_ubuntu-zesty-kernel.git] / drivers / net / wireless / ipw2x00 / libipw_module.c
index a0e9f6aed7daf8568ff27b0d484d17fc9df5da03..20b8a8a2064409e9e1968b71c1d15c2ae033b2a7 100644 (file)
@@ -199,7 +199,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv, int monitor)
        ieee->host_decrypt = 1;
        ieee->host_mc_decrypt = 1;
 
-       /* Host fragementation in Open mode. Default is enabled.
+       /* Host fragmentation in Open mode. Default is enabled.
         * Note: host fragmentation is always enabled if host encryption
         * is enabled. For cards can do hardware encryption, they must do
         * hardware fragmentation as well. So we don't need a variable
@@ -235,16 +235,19 @@ void free_ieee80211(struct net_device *dev, int monitor)
        libipw_networks_free(ieee);
 
        /* free cfg80211 resources */
-       if (!monitor) {
-               wiphy_unregister(ieee->wdev.wiphy);
-               kfree(ieee->a_band.channels);
-               kfree(ieee->bg_band.channels);
+       if (!monitor)
                wiphy_free(ieee->wdev.wiphy);
-       }
 
        free_netdev(dev);
 }
 
+void unregister_ieee80211(struct libipw_device *ieee)
+{
+       wiphy_unregister(ieee->wdev.wiphy);
+       kfree(ieee->a_band.channels);
+       kfree(ieee->bg_band.channels);
+}
+
 #ifdef CONFIG_LIBIPW_DEBUG
 
 static int debug = 0;
@@ -330,3 +333,4 @@ module_init(libipw_init);
 
 EXPORT_SYMBOL(alloc_ieee80211);
 EXPORT_SYMBOL(free_ieee80211);
+EXPORT_SYMBOL(unregister_ieee80211);