aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2008-06-25 06:25:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-27 09:09:20 -0400
commite292c737fc57d3ca718056f3308c725c8e541729 (patch)
tree22eeafe6a2353ee929fc7c7dac16acfe59feb70b /drivers/net
parentb973e42eb25036a2672db7f7749f6989ab10479c (diff)
wireless: Small cleanups
Small whitespace cleanups for wireless drivers Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/airo.c41
-rw-r--r--drivers/net/wireless/ath5k/hw.c4
2 files changed, 20 insertions, 25 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 73d66a80c4a3..b5cd850a4a59 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -85,10 +85,10 @@ static struct pci_driver airo_driver = {
85 85
86/* Include Wireless Extension definition and check version - Jean II */ 86/* Include Wireless Extension definition and check version - Jean II */
87#include <linux/wireless.h> 87#include <linux/wireless.h>
88#define WIRELESS_SPY // enable iwspy support 88#define WIRELESS_SPY /* enable iwspy support */
89#include <net/iw_handler.h> // New driver API 89#include <net/iw_handler.h> /* New driver API */
90 90
91#define CISCO_EXT // enable Cisco extensions 91#define CISCO_EXT /* enable Cisco extensions */
92#ifdef CISCO_EXT 92#ifdef CISCO_EXT
93#include <linux/delay.h> 93#include <linux/delay.h>
94#endif 94#endif
@@ -281,7 +281,7 @@ MODULE_PARM_DESC(proc_perm, "The permission bits of the files in /proc");
281/* This is a kind of sloppy hack to get this information to OUT4500 and 281/* This is a kind of sloppy hack to get this information to OUT4500 and
282 IN4500. I would be extremely interested in the situation where this 282 IN4500. I would be extremely interested in the situation where this
283 doesn't work though!!! */ 283 doesn't work though!!! */
284static int do8bitIO = 0; 284static int do8bitIO /* = 0 */;
285 285
286/* Return codes */ 286/* Return codes */
287#define SUCCESS 0 287#define SUCCESS 0
@@ -398,8 +398,8 @@ static int do8bitIO = 0;
398#define MAXTXQ 64 398#define MAXTXQ 64
399 399
400/* BAP selectors */ 400/* BAP selectors */
401#define BAP0 0 // Used for receiving packets 401#define BAP0 0 /* Used for receiving packets */
402#define BAP1 2 // Used for xmiting packets and working with RIDS 402#define BAP1 2 /* Used for xmiting packets and working with RIDS */
403 403
404/* Flags */ 404/* Flags */
405#define COMMAND_BUSY 0x8000 405#define COMMAND_BUSY 0x8000
@@ -5522,11 +5522,13 @@ static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
5522 Cmd cmd; 5522 Cmd cmd;
5523 Resp rsp; 5523 Resp rsp;
5524 5524
5525 if ((ai->APList == NULL) && 5525 if (!ai->APList)
5526 (ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL)) == NULL) 5526 ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL);
5527 if (!ai->APList)
5527 return -ENOMEM; 5528 return -ENOMEM;
5528 if ((ai->SSID == NULL) && 5529 if (!ai->SSID)
5529 (ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL)) == NULL) 5530 ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL);
5531 if (!ai->SSID)
5530 return -ENOMEM; 5532 return -ENOMEM;
5531 readAPListRid(ai, ai->APList); 5533 readAPListRid(ai, ai->APList);
5532 readSsidRid(ai, ai->SSID); 5534 readSsidRid(ai, ai->SSID);
@@ -5537,7 +5539,7 @@ static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
5537 disable_MAC(ai, 0); 5539 disable_MAC(ai, 0);
5538 netif_device_detach(dev); 5540 netif_device_detach(dev);
5539 ai->power = state; 5541 ai->power = state;
5540 cmd.cmd=HOSTSLEEP; 5542 cmd.cmd = HOSTSLEEP;
5541 issuecommand(ai, &cmd, &rsp); 5543 issuecommand(ai, &cmd, &rsp);
5542 5544
5543 pci_enable_wake(pdev, pci_choose_state(pdev, state), 1); 5545 pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
@@ -5567,7 +5569,7 @@ static int airo_pci_resume(struct pci_dev *pdev)
5567 msleep(100); 5569 msleep(100);
5568 } 5570 }
5569 5571
5570 set_bit (FLAG_COMMIT, &ai->flags); 5572 set_bit(FLAG_COMMIT, &ai->flags);
5571 disable_MAC(ai, 0); 5573 disable_MAC(ai, 0);
5572 msleep(200); 5574 msleep(200);
5573 if (ai->SSID) { 5575 if (ai->SSID) {
@@ -5594,9 +5596,6 @@ static int airo_pci_resume(struct pci_dev *pdev)
5594static int __init airo_init_module( void ) 5596static int __init airo_init_module( void )
5595{ 5597{
5596 int i; 5598 int i;
5597#if 0
5598 int have_isa_dev = 0;
5599#endif
5600 5599
5601 airo_entry = create_proc_entry("driver/aironet", 5600 airo_entry = create_proc_entry("driver/aironet",
5602 S_IFDIR | airo_perm, 5601 S_IFDIR | airo_perm,
@@ -5607,15 +5606,11 @@ static int __init airo_init_module( void )
5607 airo_entry->gid = proc_gid; 5606 airo_entry->gid = proc_gid;
5608 } 5607 }
5609 5608
5610 for( i = 0; i < 4 && io[i] && irq[i]; i++ ) { 5609 for (i = 0; i < 4 && io[i] && irq[i]; i++) {
5611 airo_print_info("", "Trying to configure ISA adapter at irq=%d " 5610 airo_print_info("", "Trying to configure ISA adapter at irq=%d "
5612 "io=0x%x", irq[i], io[i] ); 5611 "io=0x%x", irq[i], io[i] );
5613 if (init_airo_card( irq[i], io[i], 0, NULL )) 5612 if (init_airo_card( irq[i], io[i], 0, NULL ))
5614#if 0
5615 have_isa_dev = 1;
5616#else
5617 /* do nothing */ ; 5613 /* do nothing */ ;
5618#endif
5619 } 5614 }
5620 5615
5621#ifdef CONFIG_PCI 5616#ifdef CONFIG_PCI
@@ -5661,7 +5656,7 @@ static void __exit airo_cleanup_module( void )
5661 5656
5662static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi) 5657static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi)
5663{ 5658{
5664 if( !rssi_rid ) 5659 if (!rssi_rid)
5665 return 0; 5660 return 0;
5666 5661
5667 return (0x100 - rssi_rid[rssi].rssidBm); 5662 return (0x100 - rssi_rid[rssi].rssidBm);
@@ -5671,10 +5666,10 @@ static u8 airo_dbm_to_pct (tdsRssiEntry *rssi_rid, u8 dbm)
5671{ 5666{
5672 int i; 5667 int i;
5673 5668
5674 if( !rssi_rid ) 5669 if (!rssi_rid)
5675 return 0; 5670 return 0;
5676 5671
5677 for( i = 0; i < 256; i++ ) 5672 for (i = 0; i < 256; i++)
5678 if (rssi_rid[i].rssidBm == dbm) 5673 if (rssi_rid[i].rssidBm == dbm)
5679 return rssi_rid[i].rssipct; 5674 return rssi_rid[i].rssipct;
5680 5675
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 77990b56860b..c6d12c53bda4 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -31,14 +31,14 @@
31#include "base.h" 31#include "base.h"
32#include "debug.h" 32#include "debug.h"
33 33
34/*Rate tables*/ 34/* Rate tables */
35static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A; 35static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A;
36static const struct ath5k_rate_table ath5k_rt_11b = AR5K_RATES_11B; 36static const struct ath5k_rate_table ath5k_rt_11b = AR5K_RATES_11B;
37static const struct ath5k_rate_table ath5k_rt_11g = AR5K_RATES_11G; 37static const struct ath5k_rate_table ath5k_rt_11g = AR5K_RATES_11G;
38static const struct ath5k_rate_table ath5k_rt_turbo = AR5K_RATES_TURBO; 38static const struct ath5k_rate_table ath5k_rt_turbo = AR5K_RATES_TURBO;
39static const struct ath5k_rate_table ath5k_rt_xr = AR5K_RATES_XR; 39static const struct ath5k_rate_table ath5k_rt_xr = AR5K_RATES_XR;
40 40
41/*Prototypes*/ 41/* Prototypes */
42static int ath5k_hw_nic_reset(struct ath5k_hw *, u32); 42static int ath5k_hw_nic_reset(struct ath5k_hw *, u32);
43static int ath5k_hw_nic_wakeup(struct ath5k_hw *, int, bool); 43static int ath5k_hw_nic_wakeup(struct ath5k_hw *, int, bool);
44static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *, 44static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,