aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2x00
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-03 10:44:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-03 10:44:01 -0500
commita84216e671c724e0920dfad2fb70828d428ff60a (patch)
treea39f53715c73d267d854653dfe275da5fc60e842 /drivers/net/wireless/ipw2x00
parent1836d95928a0f41ada0cbb2a6c4e46b027db9491 (diff)
parentbcfe3c2046fc4f16544f2b127f1b159dd1fcad8b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits) mac80211: check interface is down before type change cfg80211: fix NULL ptr deref libertas if_usb: Fix crash on 64-bit machines mac80211: fix reason code output endianness mac80211: fix addba timer ath9k: fix misplaced semicolon on rate control b43: Fix DMA TX bounce buffer copying mac80211: fix BSS leak rt73usb.c : more ids ipw2200: fix oops on missing firmware gre: Fix dev_addr clobbering for gretap sky2: set carrier off in probe net: fix sk_forward_alloc corruption pcnet_cs: add cis of PreMax PE-200 ethernet pcmcia card r8169: Fix card drop incoming VLAN tagged MTU byte large jumbo frames ibmtr: possible Read buffer overflow? net: Fix RPF to work with policy routing net: fix kmemcheck annotations e1000e: rework disable K1 at 1000Mbps for 82577/82578 e1000e: config PHY via software after resets ...
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c5
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c2
-rw-r--r--drivers/net/wireless/ipw2x00/libipw.h1
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_module.c14
4 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 240cff1e6979..a741d37fd96f 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -6325,8 +6325,10 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
6325 6325
6326 fail: 6326 fail:
6327 if (dev) { 6327 if (dev) {
6328 if (registered) 6328 if (registered) {
6329 unregister_ieee80211(priv->ieee);
6329 unregister_netdev(dev); 6330 unregister_netdev(dev);
6331 }
6330 6332
6331 ipw2100_hw_stop_adapter(priv); 6333 ipw2100_hw_stop_adapter(priv);
6332 6334
@@ -6383,6 +6385,7 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
6383 /* Unregister the device first - this results in close() 6385 /* Unregister the device first - this results in close()
6384 * being called if the device is open. If we free storage 6386 * being called if the device is open. If we free storage
6385 * first, then close() will crash. */ 6387 * first, then close() will crash. */
6388 unregister_ieee80211(priv->ieee);
6386 unregister_netdev(dev); 6389 unregister_netdev(dev);
6387 6390
6388 /* ipw2100_down will ensure that there is no more pending work 6391 /* ipw2100_down will ensure that there is no more pending work
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 827824d45de9..9b0f2c0646e0 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11822,6 +11822,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11822 if (err) { 11822 if (err) {
11823 IPW_ERROR("Failed to register promiscuous network " 11823 IPW_ERROR("Failed to register promiscuous network "
11824 "device (error %d).\n", err); 11824 "device (error %d).\n", err);
11825 unregister_ieee80211(priv->ieee);
11825 unregister_netdev(priv->net_dev); 11826 unregister_netdev(priv->net_dev);
11826 goto out_remove_sysfs; 11827 goto out_remove_sysfs;
11827 } 11828 }
@@ -11872,6 +11873,7 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev)
11872 11873
11873 mutex_unlock(&priv->mutex); 11874 mutex_unlock(&priv->mutex);
11874 11875
11876 unregister_ieee80211(priv->ieee);
11875 unregister_netdev(priv->net_dev); 11877 unregister_netdev(priv->net_dev);
11876 11878
11877 if (priv->rxq) { 11879 if (priv->rxq) {
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h
index bf45391172f3..f42ade6c2d3e 100644
--- a/drivers/net/wireless/ipw2x00/libipw.h
+++ b/drivers/net/wireless/ipw2x00/libipw.h
@@ -1020,6 +1020,7 @@ static inline int libipw_is_cck_rate(u8 rate)
1020/* ieee80211.c */ 1020/* ieee80211.c */
1021extern void free_ieee80211(struct net_device *dev, int monitor); 1021extern void free_ieee80211(struct net_device *dev, int monitor);
1022extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); 1022extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor);
1023extern void unregister_ieee80211(struct libipw_device *ieee);
1023extern int libipw_change_mtu(struct net_device *dev, int new_mtu); 1024extern int libipw_change_mtu(struct net_device *dev, int new_mtu);
1024 1025
1025extern void libipw_networks_age(struct libipw_device *ieee, 1026extern void libipw_networks_age(struct libipw_device *ieee,
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c
index a0e9f6aed7da..be5b809ec97a 100644
--- a/drivers/net/wireless/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c
@@ -235,16 +235,19 @@ void free_ieee80211(struct net_device *dev, int monitor)
235 libipw_networks_free(ieee); 235 libipw_networks_free(ieee);
236 236
237 /* free cfg80211 resources */ 237 /* free cfg80211 resources */
238 if (!monitor) { 238 if (!monitor)
239 wiphy_unregister(ieee->wdev.wiphy);
240 kfree(ieee->a_band.channels);
241 kfree(ieee->bg_band.channels);
242 wiphy_free(ieee->wdev.wiphy); 239 wiphy_free(ieee->wdev.wiphy);
243 }
244 240
245 free_netdev(dev); 241 free_netdev(dev);
246} 242}
247 243
244void unregister_ieee80211(struct libipw_device *ieee)
245{
246 wiphy_unregister(ieee->wdev.wiphy);
247 kfree(ieee->a_band.channels);
248 kfree(ieee->bg_band.channels);
249}
250
248#ifdef CONFIG_LIBIPW_DEBUG 251#ifdef CONFIG_LIBIPW_DEBUG
249 252
250static int debug = 0; 253static int debug = 0;
@@ -330,3 +333,4 @@ module_init(libipw_init);
330 333
331EXPORT_SYMBOL(alloc_ieee80211); 334EXPORT_SYMBOL(alloc_ieee80211);
332EXPORT_SYMBOL(free_ieee80211); 335EXPORT_SYMBOL(free_ieee80211);
336EXPORT_SYMBOL(unregister_ieee80211);