aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ce77575e88b3..a36e7870b03e 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -105,7 +105,7 @@ static struct pci_driver airo_driver = {
105 of statistics in the /proc filesystem */ 105 of statistics in the /proc filesystem */
106 106
107#define IGNLABEL(comment) NULL 107#define IGNLABEL(comment) NULL
108static char *statsLabels[] = { 108static const char *statsLabels[] = {
109 "RxOverrun", 109 "RxOverrun",
110 IGNLABEL("RxPlcpCrcErr"), 110 IGNLABEL("RxPlcpCrcErr"),
111 IGNLABEL("RxPlcpFormatErr"), 111 IGNLABEL("RxPlcpFormatErr"),
@@ -217,7 +217,6 @@ static char *statsLabels[] = {
217 (no spaces) list of rates (up to 8). */ 217 (no spaces) list of rates (up to 8). */
218 218
219static int rates[8]; 219static int rates[8];
220static int basic_rate;
221static char *ssids[3]; 220static char *ssids[3];
222 221
223static int io[4]; 222static int io[4];
@@ -250,7 +249,6 @@ MODULE_LICENSE("Dual BSD/GPL");
250MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340/350"); 249MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340/350");
251module_param_array(io, int, NULL, 0); 250module_param_array(io, int, NULL, 0);
252module_param_array(irq, int, NULL, 0); 251module_param_array(irq, int, NULL, 0);
253module_param(basic_rate, int, 0);
254module_param_array(rates, int, NULL, 0); 252module_param_array(rates, int, NULL, 0);
255module_param_array(ssids, charp, NULL, 0); 253module_param_array(ssids, charp, NULL, 0);
256module_param(auto_wep, int, 0); 254module_param(auto_wep, int, 0);
@@ -932,7 +930,7 @@ typedef struct aironet_ioctl {
932 unsigned char __user *data; // d-data 930 unsigned char __user *data; // d-data
933} aironet_ioctl; 931} aironet_ioctl;
934 932
935static char swversion[] = "2.1"; 933static const char swversion[] = "2.1";
936#endif /* CISCO_EXT */ 934#endif /* CISCO_EXT */
937 935
938#define NUM_MODULES 2 936#define NUM_MODULES 2
@@ -1374,7 +1372,7 @@ static int micsetup(struct airo_info *ai) {
1374 return SUCCESS; 1372 return SUCCESS;
1375} 1373}
1376 1374
1377static char micsnap[] = {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02}; 1375static const u8 micsnap[] = {0xAA,0xAA,0x03,0x00,0x40,0x96,0x00,0x02};
1378 1376
1379/*=========================================================================== 1377/*===========================================================================
1380 * Description: Mic a packet 1378 * Description: Mic a packet
@@ -2723,9 +2721,8 @@ static int airo_networks_allocate(struct airo_info *ai)
2723 if (ai->networks) 2721 if (ai->networks)
2724 return 0; 2722 return 0;
2725 2723
2726 ai->networks = 2724 ai->networks = kcalloc(AIRO_MAX_NETWORK_COUNT, sizeof(BSSListElement),
2727 kzalloc(AIRO_MAX_NETWORK_COUNT * sizeof(BSSListElement), 2725 GFP_KERNEL);
2728 GFP_KERNEL);
2729 if (!ai->networks) { 2726 if (!ai->networks) {
2730 airo_print_warn("", "Out of memory allocating beacons"); 2727 airo_print_warn("", "Out of memory allocating beacons");
2731 return -ENOMEM; 2728 return -ENOMEM;
@@ -3884,15 +3881,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
3884 ai->config.rates[i] = rates[i]; 3881 ai->config.rates[i] = rates[i];
3885 } 3882 }
3886 } 3883 }
3887 if ( basic_rate > 0 ) {
3888 for( i = 0; i < 8; i++ ) {
3889 if ( ai->config.rates[i] == basic_rate ||
3890 !ai->config.rates ) {
3891 ai->config.rates[i] = basic_rate | 0x80;
3892 break;
3893 }
3894 }
3895 }
3896 set_bit (FLAG_COMMIT, &ai->flags); 3884 set_bit (FLAG_COMMIT, &ai->flags);
3897 } 3885 }
3898 3886
@@ -5032,7 +5020,7 @@ static void proc_config_on_close(struct inode *inode, struct file *file)
5032 airo_config_commit(dev, NULL, NULL, NULL); 5020 airo_config_commit(dev, NULL, NULL, NULL);
5033} 5021}
5034 5022
5035static char *get_rmode(__le16 mode) 5023static const char *get_rmode(__le16 mode)
5036{ 5024{
5037 switch(mode & RXMODE_MASK) { 5025 switch(mode & RXMODE_MASK) {
5038 case RXMODE_RFMON: return "rfmon"; 5026 case RXMODE_RFMON: return "rfmon";