Skip to content

Commit

Permalink
[PATCH] prism54: whitespace cleanup
Browse files Browse the repository at this point in the history
NET: prism54 - whitespace cleanup

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dmitry Torokhov authored and Jeff Garzik committed Dec 2, 2006
1 parent d18e0c4 commit 93b2dd1
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 102 deletions.
17 changes: 8 additions & 9 deletions drivers/net/wireless/prism54/isl_38xx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2002 Intersil Americas Inc.
* Copyright (C) 2003-2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>_
*
Expand Down Expand Up @@ -38,7 +37,7 @@
* isl38xx_disable_interrupts - disable all interrupts
* @device: pci memory base address
*
* Instructs the device to disable all interrupt reporting by asserting
* Instructs the device to disable all interrupt reporting by asserting
* the IRQ line. New events may still show up in the interrupt identification
* register located at offset %ISL38XX_INT_IDENT_REG.
*/
Expand Down Expand Up @@ -204,17 +203,19 @@ isl38xx_interface_reset(void __iomem *device_base, dma_addr_t host_address)
/* enable the interrupt for detecting initialization */

/* Note: Do not enable other interrupts here. We want the
* device to have come up first 100% before allowing any other
* device to have come up first 100% before allowing any other
* interrupts. */
isl38xx_w32_flush(device_base, ISL38XX_INT_IDENT_INIT, ISL38XX_INT_EN_REG);
udelay(ISL38XX_WRITEIO_DELAY); /* allow complete full reset */
}

void
isl38xx_enable_common_interrupts(void __iomem *device_base) {
isl38xx_enable_common_interrupts(void __iomem *device_base)
{
u32 reg;
reg = ( ISL38XX_INT_IDENT_UPDATE |
ISL38XX_INT_IDENT_SLEEP | ISL38XX_INT_IDENT_WAKEUP);

reg = ISL38XX_INT_IDENT_UPDATE | ISL38XX_INT_IDENT_SLEEP |
ISL38XX_INT_IDENT_WAKEUP;
isl38xx_w32_flush(device_base, reg, ISL38XX_INT_EN_REG);
udelay(ISL38XX_WRITEIO_DELAY);
}
Expand All @@ -234,23 +235,21 @@ isl38xx_in_queue(isl38xx_control_block *cb, int queue)
/* send queues */
case ISL38XX_CB_TX_MGMTQ:
BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE);

case ISL38XX_CB_TX_DATA_LQ:
case ISL38XX_CB_TX_DATA_HQ:
BUG_ON(delta > ISL38XX_CB_TX_QSIZE);
return delta;
break;

/* receive queues */
case ISL38XX_CB_RX_MGMTQ:
BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE);
return ISL38XX_CB_MGMT_QSIZE - delta;
break;

case ISL38XX_CB_RX_DATA_LQ:
case ISL38XX_CB_RX_DATA_HQ:
BUG_ON(delta > ISL38XX_CB_RX_QSIZE);
return ISL38XX_CB_RX_QSIZE - delta;
break;
}
BUG();
return 0;
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/wireless/prism54/isl_38xx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2002 Intersil Americas Inc.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -67,10 +66,10 @@
* @base: (host) memory base address of the device
* @val: 32bit value (host order) to write
* @offset: byte offset into @base to write value to
*
*
* This helper takes care of writing a 32bit datum to the
* specified offset into the device's pci memory space, and making sure
* the pci memory buffers get flushed by performing one harmless read
* specified offset into the device's pci memory space, and making sure
* the pci memory buffers get flushed by performing one harmless read
* from the %ISL38XX_PCI_POSTING_FLUSH offset.
*/
static inline void
Expand Down
61 changes: 30 additions & 31 deletions drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2002 Intersil Americas Inc.
* (C) 2003,2004 Aurelien Alleaume <slts@free.fr>
* (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
Expand Down Expand Up @@ -55,12 +54,12 @@ static const unsigned char scan_rate_list[] = { 2, 4, 11, 22,
* prism54_mib_mode_helper - MIB change mode helper function
* @mib: the &struct islpci_mib object to modify
* @iw_mode: new mode (%IW_MODE_*)
*
*
* This is a helper function, hence it does not lock. Make sure
* caller deals with locking *if* necessary. This function sets the
* mode-dependent mib values and does the mapping of the Linux
* Wireless API modes to Device firmware modes. It also checks for
* correct valid Linux wireless modes.
* caller deals with locking *if* necessary. This function sets the
* mode-dependent mib values and does the mapping of the Linux
* Wireless API modes to Device firmware modes. It also checks for
* correct valid Linux wireless modes.
*/
static int
prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode)
Expand Down Expand Up @@ -118,7 +117,7 @@ prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode)
*
* this function initializes the struct given as @mib with defaults,
* of which many are retrieved from the global module parameter
* variables.
* variables.
*/

void
Expand All @@ -134,7 +133,7 @@ prism54_mib_init(islpci_private *priv)
authen = CARD_DEFAULT_AUTHEN;
wep = CARD_DEFAULT_WEP;
filter = CARD_DEFAULT_FILTER; /* (0) Do not filter un-encrypted data */
dot1x = CARD_DEFAULT_DOT1X;
dot1x = CARD_DEFAULT_DOT1X;
mlme = CARD_DEFAULT_MLME_MODE;
conformance = CARD_DEFAULT_CONFORMANCE;
power = 127;
Expand Down Expand Up @@ -228,7 +227,7 @@ prism54_get_wireless_stats(struct net_device *ndev)
} else
priv->iwstatistics.qual.updated = 0;

/* Update our wireless stats, but do not schedule to often
/* Update our wireless stats, but do not schedule to often
* (max 1 HZ) */
if ((priv->stats_timestamp == 0) ||
time_after(jiffies, priv->stats_timestamp + 1 * HZ)) {
Expand Down Expand Up @@ -705,7 +704,7 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
* Starting with WE-17, the buffer can be as big as needed.
* But the device won't repport anything if you change the value
* of IWMAX_BSS=24. */

rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r);
bsslist = r.ptr;

Expand Down Expand Up @@ -785,7 +784,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
return rvalue;
}

/* Provides no functionality, just completes the ioctl. In essence this is a
/* Provides no functionality, just completes the ioctl. In essence this is a
* just a cosmetic ioctl.
*/
static int
Expand Down Expand Up @@ -1104,7 +1103,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
&key);
}
/*
* If a valid key is set, encryption should be enabled
* If a valid key is set, encryption should be enabled
* (user may turn it off later).
* This is also how "iwconfig ethX key on" works
*/
Expand All @@ -1126,7 +1125,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
}
/* now read the flags */
if (dwrq->flags & IW_ENCODE_DISABLED) {
/* Encoding disabled,
/* Encoding disabled,
* authen = DOT11_AUTH_OS;
* invoke = 0;
* exunencrypt = 0; */
Expand Down Expand Up @@ -1214,7 +1213,7 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info,
vwrq->value = (s32) r.u / 4;
vwrq->fixed = 1;
/* radio is not turned of
* btw: how is possible to turn off only the radio
* btw: how is possible to turn off only the radio
*/
vwrq->disabled = 0;

Expand Down Expand Up @@ -2354,17 +2353,17 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
handle_request(priv, mlme, oid);
send_formatted_event(priv, "Authenticate request (ex)", mlme, 1);

if (priv->iw_mode != IW_MODE_MASTER
if (priv->iw_mode != IW_MODE_MASTER
&& mlmeex->state != DOT11_STATE_AUTHING)
break;

confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC);

if (!confirm)
if (!confirm)
break;

memcpy(&confirm->address, mlmeex->address, ETH_ALEN);
printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
mlmeex->address[0],
mlmeex->address[1],
mlmeex->address[2],
Expand Down Expand Up @@ -2398,10 +2397,10 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
handle_request(priv, mlme, oid);
send_formatted_event(priv, "Associate request (ex)", mlme, 1);

if (priv->iw_mode != IW_MODE_MASTER
if (priv->iw_mode != IW_MODE_MASTER
&& mlmeex->state != DOT11_STATE_ASSOCING)
break;

confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC);

if (!confirm)
Expand All @@ -2417,7 +2416,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,

if (!wpa_ie_len) {
printk(KERN_DEBUG "No WPA IE found from "
"address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
"address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
mlmeex->address[0],
mlmeex->address[1],
mlmeex->address[2],
Expand All @@ -2435,14 +2434,14 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
mgt_set_varlen(priv, oid, confirm, wpa_ie_len);

kfree(confirm);

break;

case DOT11_OID_REASSOCIATEEX:
handle_request(priv, mlme, oid);
send_formatted_event(priv, "Reassociate request (ex)", mlme, 1);

if (priv->iw_mode != IW_MODE_MASTER
if (priv->iw_mode != IW_MODE_MASTER
&& mlmeex->state != DOT11_STATE_ASSOCING)
break;

Expand All @@ -2461,7 +2460,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,

if (!wpa_ie_len) {
printk(KERN_DEBUG "No WPA IE found from "
"address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
"address:\t%02x:%02x:%02x:%02x:%02x:%02x\n",
mlmeex->address[0],
mlmeex->address[1],
mlmeex->address[2],
Expand All @@ -2473,13 +2472,13 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
break;
}

confirm->size = wpa_ie_len;
confirm->size = wpa_ie_len;
memcpy(&confirm->data, wpa_ie, wpa_ie_len);

mgt_set_varlen(priv, oid, confirm, wpa_ie_len);

kfree(confirm);

break;

default:
Expand Down Expand Up @@ -2545,10 +2544,10 @@ enum {
#define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data))

/* Maximum length for algorithm names (-1 for nul termination)
/* Maximum length for algorithm names (-1 for nul termination)
* used in ioctl() */
#define HOSTAP_CRYPT_ALG_NAME_LEN 16

struct prism2_hostapd_param {
u32 cmd;
u8 sta_addr[ETH_ALEN];
Expand Down Expand Up @@ -2621,7 +2620,7 @@ prism2_ioctl_set_encryption(struct net_device *dev,
&key);
}
/*
* If a valid key is set, encryption should be enabled
* If a valid key is set, encryption should be enabled
* (user may turn it off later).
* This is also how "iwconfig ethX key on" works
*/
Expand All @@ -2643,7 +2642,7 @@ prism2_ioctl_set_encryption(struct net_device *dev,
}
/* now read the flags */
if (param->u.crypt.flags & IW_ENCODE_DISABLED) {
/* Encoding disabled,
/* Encoding disabled,
* authen = DOT11_AUTH_OS;
* invoke = 0;
* exunencrypt = 0; */
Expand Down Expand Up @@ -2710,7 +2709,7 @@ prism2_ioctl_set_generic_element(struct net_device *ndev,

ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len);

if (ret == 0)
if (ret == 0)
printk(KERN_DEBUG "%s: WPA IE Attachment was set\n",
ndev->name);
}
Expand Down Expand Up @@ -2870,7 +2869,7 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
mlme = DOT11_MLME_AUTO;
printk("%s: Disabling WPA\n", ndev->name);
break;
case 2:
case 2:
case 1: /* WPA */
printk("%s: Enabling WPA\n", ndev->name);
break;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/prism54/isl_ioctl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2002 Intersil Americas Inc.
* (C) 2003 Aurelien Alleaume <slts@free.fr>
* (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
Expand Down
Loading

0 comments on commit 93b2dd1

Please sign in to comment.