aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2010-03-12 00:01:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-15 15:32:07 -0400
commit27ae60f8f7aac221b428422eecafddaa7aff9549 (patch)
tree20a1a1fdca308f102e1c443e9f73868af83eca5b
parent484b4dd582867c6cfec3a1feb128d60af21c4978 (diff)
ipw2x00: replace "ieee80211" with "libipw" where appropriate
"ieee80211" was the old name of the common library for ipw2100 and ipw2200. It was renamed to "libipw", but some occurrences of the old name remained. Rename alloc_ieee80211() to alloc_libipw() and free_ieee80211() to free_libipw(). Adjust comments and label names. Change prefixes in diagnostic messages. Keep /proc/net/ieee80211 under the original name to avoid breaking user interface. Move the affected EXPORT_SYMBOL macros to their proper places. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c10
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c18
-rw-r--r--drivers/net/wireless/ipw2x00/libipw.h14
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_module.c13
4 files changed, 27 insertions, 28 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 9b72c45a7748..fe63bf21c67e 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -6102,7 +6102,7 @@ static const struct net_device_ops ipw2100_netdev_ops = {
6102 .ndo_validate_addr = eth_validate_addr, 6102 .ndo_validate_addr = eth_validate_addr,
6103}; 6103};
6104 6104
6105/* Look into using netdev destructor to shutdown ieee80211? */ 6105/* Look into using netdev destructor to shutdown libipw? */
6106 6106
6107static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, 6107static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
6108 void __iomem * base_addr, 6108 void __iomem * base_addr,
@@ -6112,7 +6112,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
6112 struct ipw2100_priv *priv; 6112 struct ipw2100_priv *priv;
6113 struct net_device *dev; 6113 struct net_device *dev;
6114 6114
6115 dev = alloc_ieee80211(sizeof(struct ipw2100_priv), 0); 6115 dev = alloc_libipw(sizeof(struct ipw2100_priv), 0);
6116 if (!dev) 6116 if (!dev)
6117 return NULL; 6117 return NULL;
6118 priv = libipw_priv(dev); 6118 priv = libipw_priv(dev);
@@ -6425,7 +6425,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
6425 sysfs_remove_group(&pci_dev->dev.kobj, 6425 sysfs_remove_group(&pci_dev->dev.kobj,
6426 &ipw2100_attribute_group); 6426 &ipw2100_attribute_group);
6427 6427
6428 free_ieee80211(dev, 0); 6428 free_libipw(dev, 0);
6429 pci_set_drvdata(pci_dev, NULL); 6429 pci_set_drvdata(pci_dev, NULL);
6430 } 6430 }
6431 6431
@@ -6483,10 +6483,10 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev)
6483 if (dev->base_addr) 6483 if (dev->base_addr)
6484 iounmap((void __iomem *)dev->base_addr); 6484 iounmap((void __iomem *)dev->base_addr);
6485 6485
6486 /* wiphy_unregister needs to be here, before free_ieee80211 */ 6486 /* wiphy_unregister needs to be here, before free_libipw */
6487 wiphy_unregister(priv->ieee->wdev.wiphy); 6487 wiphy_unregister(priv->ieee->wdev.wiphy);
6488 kfree(priv->ieee->bg_band.channels); 6488 kfree(priv->ieee->bg_band.channels);
6489 free_ieee80211(dev, 0); 6489 free_libipw(dev, 0);
6490 } 6490 }
6491 6491
6492 pci_release_regions(pci_dev); 6492 pci_release_regions(pci_dev);
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 63c2a7ade5fb..d6edc2440128 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11651,7 +11651,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv)
11651 if (priv->prom_net_dev) 11651 if (priv->prom_net_dev)
11652 return -EPERM; 11652 return -EPERM;
11653 11653
11654 priv->prom_net_dev = alloc_ieee80211(sizeof(struct ipw_prom_priv), 1); 11654 priv->prom_net_dev = alloc_libipw(sizeof(struct ipw_prom_priv), 1);
11655 if (priv->prom_net_dev == NULL) 11655 if (priv->prom_net_dev == NULL)
11656 return -ENOMEM; 11656 return -ENOMEM;
11657 11657
@@ -11670,7 +11670,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv)
11670 11670
11671 rc = register_netdev(priv->prom_net_dev); 11671 rc = register_netdev(priv->prom_net_dev);
11672 if (rc) { 11672 if (rc) {
11673 free_ieee80211(priv->prom_net_dev, 1); 11673 free_libipw(priv->prom_net_dev, 1);
11674 priv->prom_net_dev = NULL; 11674 priv->prom_net_dev = NULL;
11675 return rc; 11675 return rc;
11676 } 11676 }
@@ -11684,7 +11684,7 @@ static void ipw_prom_free(struct ipw_priv *priv)
11684 return; 11684 return;
11685 11685
11686 unregister_netdev(priv->prom_net_dev); 11686 unregister_netdev(priv->prom_net_dev);
11687 free_ieee80211(priv->prom_net_dev, 1); 11687 free_libipw(priv->prom_net_dev, 1);
11688 11688
11689 priv->prom_net_dev = NULL; 11689 priv->prom_net_dev = NULL;
11690} 11690}
@@ -11712,7 +11712,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11712 struct ipw_priv *priv; 11712 struct ipw_priv *priv;
11713 int i; 11713 int i;
11714 11714
11715 net_dev = alloc_ieee80211(sizeof(struct ipw_priv), 0); 11715 net_dev = alloc_libipw(sizeof(struct ipw_priv), 0);
11716 if (net_dev == NULL) { 11716 if (net_dev == NULL) {
11717 err = -ENOMEM; 11717 err = -ENOMEM;
11718 goto out; 11718 goto out;
@@ -11732,7 +11732,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11732 mutex_init(&priv->mutex); 11732 mutex_init(&priv->mutex);
11733 if (pci_enable_device(pdev)) { 11733 if (pci_enable_device(pdev)) {
11734 err = -ENODEV; 11734 err = -ENODEV;
11735 goto out_free_ieee80211; 11735 goto out_free_libipw;
11736 } 11736 }
11737 11737
11738 pci_set_master(pdev); 11738 pci_set_master(pdev);
@@ -11859,8 +11859,8 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11859 out_pci_disable_device: 11859 out_pci_disable_device:
11860 pci_disable_device(pdev); 11860 pci_disable_device(pdev);
11861 pci_set_drvdata(pdev, NULL); 11861 pci_set_drvdata(pdev, NULL);
11862 out_free_ieee80211: 11862 out_free_libipw:
11863 free_ieee80211(priv->net_dev, 0); 11863 free_libipw(priv->net_dev, 0);
11864 out: 11864 out:
11865 return err; 11865 return err;
11866} 11866}
@@ -11927,11 +11927,11 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev)
11927 pci_release_regions(pdev); 11927 pci_release_regions(pdev);
11928 pci_disable_device(pdev); 11928 pci_disable_device(pdev);
11929 pci_set_drvdata(pdev, NULL); 11929 pci_set_drvdata(pdev, NULL);
11930 /* wiphy_unregister needs to be here, before free_ieee80211 */ 11930 /* wiphy_unregister needs to be here, before free_libipw */
11931 wiphy_unregister(priv->ieee->wdev.wiphy); 11931 wiphy_unregister(priv->ieee->wdev.wiphy);
11932 kfree(priv->ieee->a_band.channels); 11932 kfree(priv->ieee->a_band.channels);
11933 kfree(priv->ieee->bg_band.channels); 11933 kfree(priv->ieee->bg_band.channels);
11934 free_ieee80211(priv->net_dev, 0); 11934 free_libipw(priv->net_dev, 0);
11935 free_firmware(); 11935 free_firmware();
11936} 11936}
11937 11937
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h
index bf45391172f3..9ac136b98bb3 100644
--- a/drivers/net/wireless/ipw2x00/libipw.h
+++ b/drivers/net/wireless/ipw2x00/libipw.h
@@ -64,7 +64,7 @@
64extern u32 libipw_debug_level; 64extern u32 libipw_debug_level;
65#define LIBIPW_DEBUG(level, fmt, args...) \ 65#define LIBIPW_DEBUG(level, fmt, args...) \
66do { if (libipw_debug_level & (level)) \ 66do { if (libipw_debug_level & (level)) \
67 printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ 67 printk(KERN_DEBUG "libipw: %c %s " fmt, \
68 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) 68 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
69static inline bool libipw_ratelimit_debug(u32 level) 69static inline bool libipw_ratelimit_debug(u32 level)
70{ 70{
@@ -116,8 +116,8 @@ static inline bool libipw_ratelimit_debug(u32 level)
116#define LIBIPW_DL_RX (1<<9) 116#define LIBIPW_DL_RX (1<<9)
117#define LIBIPW_DL_QOS (1<<31) 117#define LIBIPW_DL_QOS (1<<31)
118 118
119#define LIBIPW_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a) 119#define LIBIPW_ERROR(f, a...) printk(KERN_ERR "libipw: " f, ## a)
120#define LIBIPW_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a) 120#define LIBIPW_WARNING(f, a...) printk(KERN_WARNING "libipw: " f, ## a)
121#define LIBIPW_DEBUG_INFO(f, a...) LIBIPW_DEBUG(LIBIPW_DL_INFO, f, ## a) 121#define LIBIPW_DEBUG_INFO(f, a...) LIBIPW_DEBUG(LIBIPW_DL_INFO, f, ## a)
122 122
123#define LIBIPW_DEBUG_WX(f, a...) LIBIPW_DEBUG(LIBIPW_DL_WX, f, ## a) 123#define LIBIPW_DEBUG_WX(f, a...) LIBIPW_DEBUG(LIBIPW_DL_WX, f, ## a)
@@ -905,7 +905,7 @@ struct libipw_device {
905 struct libipw_reassoc_request * req); 905 struct libipw_reassoc_request * req);
906 906
907 /* This must be the last item so that it points to the data 907 /* This must be the last item so that it points to the data
908 * allocated beyond this structure by alloc_ieee80211 */ 908 * allocated beyond this structure by alloc_libipw */
909 u8 priv[0]; 909 u8 priv[0];
910}; 910};
911 911
@@ -1017,9 +1017,9 @@ static inline int libipw_is_cck_rate(u8 rate)
1017 return 0; 1017 return 0;
1018} 1018}
1019 1019
1020/* ieee80211.c */ 1020/* libipw.c */
1021extern void free_ieee80211(struct net_device *dev, int monitor); 1021extern void free_libipw(struct net_device *dev, int monitor);
1022extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); 1022extern struct net_device *alloc_libipw(int sizeof_priv, int monitor);
1023extern int libipw_change_mtu(struct net_device *dev, int new_mtu); 1023extern int libipw_change_mtu(struct net_device *dev, int new_mtu);
1024 1024
1025extern void libipw_networks_age(struct libipw_device *ieee, 1025extern 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 1ae0b2b02c38..5b8841159b7c 100644
--- a/drivers/net/wireless/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c
@@ -53,7 +53,7 @@
53#include "libipw.h" 53#include "libipw.h"
54 54
55#define DRV_DESCRIPTION "802.11 data/management/control stack" 55#define DRV_DESCRIPTION "802.11 data/management/control stack"
56#define DRV_NAME "ieee80211" 56#define DRV_NAME "libipw"
57#define DRV_VERSION LIBIPW_VERSION 57#define DRV_VERSION LIBIPW_VERSION
58#define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>" 58#define DRV_COPYRIGHT "Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>"
59 59
@@ -143,7 +143,7 @@ int libipw_change_mtu(struct net_device *dev, int new_mtu)
143} 143}
144EXPORT_SYMBOL(libipw_change_mtu); 144EXPORT_SYMBOL(libipw_change_mtu);
145 145
146struct net_device *alloc_ieee80211(int sizeof_priv, int monitor) 146struct net_device *alloc_libipw(int sizeof_priv, int monitor)
147{ 147{
148 struct libipw_device *ieee; 148 struct libipw_device *ieee;
149 struct net_device *dev; 149 struct net_device *dev;
@@ -225,8 +225,9 @@ failed_free_netdev:
225failed: 225failed:
226 return NULL; 226 return NULL;
227} 227}
228EXPORT_SYMBOL(alloc_libipw);
228 229
229void free_ieee80211(struct net_device *dev, int monitor) 230void free_libipw(struct net_device *dev, int monitor)
230{ 231{
231 struct libipw_device *ieee = netdev_priv(dev); 232 struct libipw_device *ieee = netdev_priv(dev);
232 233
@@ -240,6 +241,7 @@ void free_ieee80211(struct net_device *dev, int monitor)
240 241
241 free_netdev(dev); 242 free_netdev(dev);
242} 243}
244EXPORT_SYMBOL(free_libipw);
243 245
244#ifdef CONFIG_LIBIPW_DEBUG 246#ifdef CONFIG_LIBIPW_DEBUG
245 247
@@ -294,7 +296,7 @@ static int __init libipw_init(void)
294 struct proc_dir_entry *e; 296 struct proc_dir_entry *e;
295 297
296 libipw_debug_level = debug; 298 libipw_debug_level = debug;
297 libipw_proc = proc_mkdir(DRV_NAME, init_net.proc_net); 299 libipw_proc = proc_mkdir("ieee80211", init_net.proc_net);
298 if (libipw_proc == NULL) { 300 if (libipw_proc == NULL) {
299 LIBIPW_ERROR("Unable to create " DRV_NAME 301 LIBIPW_ERROR("Unable to create " DRV_NAME
300 " proc directory\n"); 302 " proc directory\n");
@@ -334,6 +336,3 @@ MODULE_PARM_DESC(debug, "debug output mask");
334 336
335module_exit(libipw_exit); 337module_exit(libipw_exit);
336module_init(libipw_init); 338module_init(libipw_init);
337
338EXPORT_SYMBOL(alloc_ieee80211);
339EXPORT_SYMBOL(free_ieee80211);