aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-02-04 18:05:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-11 11:44:26 -0500
commita94e8427c8bd358b602288d0b1e0cff83a9401bc (patch)
tree724395c05a06b84812a81eb6b06b1c183e5625ed /drivers
parent6fe9deb1747e1e3b9f626878a9954b9eef8ab17d (diff)
orinoco: spaces in parenthesised expressions
Remove checkpatch warnings of the following type: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '!' (ctx:BxW) ERROR: space required before the open parenthesis '(' ERROR: space required before the open brace '{' Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/orinoco/orinoco.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c
index 0e21eaff66b5..6ff6c3803c06 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -167,7 +167,7 @@ static const u8 encaps_hdr[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
167#define ORINOCO_INTEN (HERMES_EV_RX | HERMES_EV_ALLOC \ 167#define ORINOCO_INTEN (HERMES_EV_RX | HERMES_EV_ALLOC \
168 | HERMES_EV_TX | HERMES_EV_TXEXC \ 168 | HERMES_EV_TX | HERMES_EV_TXEXC \
169 | HERMES_EV_WTERR | HERMES_EV_INFO \ 169 | HERMES_EV_WTERR | HERMES_EV_INFO \
170 | HERMES_EV_INFDROP ) 170 | HERMES_EV_INFDROP)
171 171
172#define MAX_RID_LEN 1024 172#define MAX_RID_LEN 1024
173 173
@@ -768,7 +768,7 @@ static int orinoco_open(struct net_device *dev)
768 768
769 err = __orinoco_up(dev); 769 err = __orinoco_up(dev);
770 770
771 if (! err) 771 if (!err)
772 priv->open = 1; 772 priv->open = 1;
773 773
774 orinoco_unlock(priv, &flags); 774 orinoco_unlock(priv, &flags);
@@ -810,7 +810,7 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
810 int err; 810 int err;
811 unsigned long flags; 811 unsigned long flags;
812 812
813 if (! netif_device_present(dev)) { 813 if (!netif_device_present(dev)) {
814 printk(KERN_WARNING "%s: get_wireless_stats() called while device not present\n", 814 printk(KERN_WARNING "%s: get_wireless_stats() called while device not present\n",
815 dev->name); 815 dev->name);
816 return NULL; /* FIXME: Can we do better than this? */ 816 return NULL; /* FIXME: Can we do better than this? */
@@ -881,12 +881,12 @@ static int orinoco_change_mtu(struct net_device *dev, int new_mtu)
881{ 881{
882 struct orinoco_private *priv = netdev_priv(dev); 882 struct orinoco_private *priv = netdev_priv(dev);
883 883
884 if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) ) 884 if ((new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU))
885 return -EINVAL; 885 return -EINVAL;
886 886
887 /* MTU + encapsulation + header length */ 887 /* MTU + encapsulation + header length */
888 if ( (new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) > 888 if ((new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) >
889 (priv->nicbuf_size - ETH_HLEN) ) 889 (priv->nicbuf_size - ETH_HLEN))
890 return -EINVAL; 890 return -EINVAL;
891 891
892 dev->mtu = new_mtu; 892 dev->mtu = new_mtu;
@@ -909,7 +909,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
909 int tx_control; 909 int tx_control;
910 unsigned long flags; 910 unsigned long flags;
911 911
912 if (! netif_running(dev)) { 912 if (!netif_running(dev)) {
913 printk(KERN_ERR "%s: Tx on stopped device!\n", 913 printk(KERN_ERR "%s: Tx on stopped device!\n",
914 dev->name); 914 dev->name);
915 return NETDEV_TX_BUSY; 915 return NETDEV_TX_BUSY;
@@ -927,7 +927,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
927 return NETDEV_TX_BUSY; 927 return NETDEV_TX_BUSY;
928 } 928 }
929 929
930 if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { 930 if (!netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) {
931 /* Oops, the firmware hasn't established a connection, 931 /* Oops, the firmware hasn't established a connection,
932 silently drop the packet (this seems to be the 932 silently drop the packet (this seems to be the
933 safest approach). */ 933 safest approach). */
@@ -1203,7 +1203,7 @@ static inline int is_ethersnap(void *_hdr)
1203 * 00:00:f8 - we need both because different APs appear to use 1203 * 00:00:f8 - we need both because different APs appear to use
1204 * different OUIs for some reason */ 1204 * different OUIs for some reason */
1205 return (memcmp(hdr, &encaps_hdr, 5) == 0) 1205 return (memcmp(hdr, &encaps_hdr, 5) == 0)
1206 && ( (hdr[5] == 0x00) || (hdr[5] == 0xf8) ); 1206 && ((hdr[5] == 0x00) || (hdr[5] == 0xf8));
1207} 1207}
1208 1208
1209static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, 1209static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac,
@@ -1700,14 +1700,14 @@ static void orinoco_join_ap(struct work_struct *work)
1700 1700
1701 /* Allocate buffer for scan results */ 1701 /* Allocate buffer for scan results */
1702 buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL); 1702 buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL);
1703 if (! buf) 1703 if (!buf)
1704 return; 1704 return;
1705 1705
1706 if (orinoco_lock(priv, &flags) != 0) 1706 if (orinoco_lock(priv, &flags) != 0)
1707 goto fail_lock; 1707 goto fail_lock;
1708 1708
1709 /* Sanity checks in case user changed something in the meantime */ 1709 /* Sanity checks in case user changed something in the meantime */
1710 if (! priv->bssid_fixed) 1710 if (!priv->bssid_fixed)
1711 goto out; 1711 goto out;
1712 1712
1713 if (strlen(priv->desired_essid) == 0) 1713 if (strlen(priv->desired_essid) == 0)
@@ -1735,7 +1735,7 @@ static void orinoco_join_ap(struct work_struct *work)
1735 } 1735 }
1736 } 1736 }
1737 1737
1738 if (! found) { 1738 if (!found) {
1739 DEBUG(1, "%s: Requested AP not found in scan results\n", 1739 DEBUG(1, "%s: Requested AP not found in scan results\n",
1740 dev->name); 1740 dev->name);
1741 goto out; 1741 goto out;
@@ -2174,7 +2174,7 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw)
2174 { 2174 {
2175 int i; 2175 int i;
2176 printk(KERN_DEBUG "Scan result [%02X", buf[0]); 2176 printk(KERN_DEBUG "Scan result [%02X", buf[0]);
2177 for(i = 1; i < (len * 2); i++) 2177 for (i = 1; i < (len * 2); i++)
2178 printk(":%02X", buf[i]); 2178 printk(":%02X", buf[i]);
2179 printk("]\n"); 2179 printk("]\n");
2180 } 2180 }
@@ -2311,8 +2311,8 @@ int __orinoco_down(struct net_device *dev)
2311 2311
2312 netif_stop_queue(dev); 2312 netif_stop_queue(dev);
2313 2313
2314 if (! priv->hw_unavailable) { 2314 if (!priv->hw_unavailable) {
2315 if (! priv->broken_disableport) { 2315 if (!priv->broken_disableport) {
2316 err = hermes_disable_port(hw, 0); 2316 err = hermes_disable_port(hw, 0);
2317 if (err) { 2317 if (err) {
2318 /* Some firmwares (e.g. Intersil 1.3.x) seem 2318 /* Some firmwares (e.g. Intersil 1.3.x) seem
@@ -2475,7 +2475,7 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
2475 } 2475 }
2476 2476
2477 /* Write all 4 keys */ 2477 /* Write all 4 keys */
2478 for(i = 0; i < ORINOCO_MAX_KEYS; i++) { 2478 for (i = 0; i < ORINOCO_MAX_KEYS; i++) {
2479 err = hermes_write_ltv(hw, USER_BAP, 2479 err = hermes_write_ltv(hw, USER_BAP,
2480 HERMES_RID_CNFDEFAULTKEY0 + i, 2480 HERMES_RID_CNFDEFAULTKEY0 + i,
2481 HERMES_BYTES_TO_RECLEN(keylen), 2481 HERMES_BYTES_TO_RECLEN(keylen),
@@ -2898,8 +2898,8 @@ __orinoco_set_multicast_list(struct net_device *dev)
2898 2898
2899 /* The Hermes doesn't seem to have an allmulti mode, so we go 2899 /* The Hermes doesn't seem to have an allmulti mode, so we go
2900 * into promiscuous mode and let the upper levels deal. */ 2900 * into promiscuous mode and let the upper levels deal. */
2901 if ( (dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI) || 2901 if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI) ||
2902 (dev->mc_count > MAX_MULTICAST(priv)) ) { 2902 (dev->mc_count > MAX_MULTICAST(priv))) {
2903 promisc = 1; 2903 promisc = 1;
2904 mc_count = 0; 2904 mc_count = 0;
2905 } else { 2905 } else {
@@ -2921,14 +2921,14 @@ __orinoco_set_multicast_list(struct net_device *dev)
2921 /* If we're not in promiscuous mode, then we need to set the 2921 /* If we're not in promiscuous mode, then we need to set the
2922 * group address if either we want to multicast, or if we were 2922 * group address if either we want to multicast, or if we were
2923 * multicasting and want to stop */ 2923 * multicasting and want to stop */
2924 if (! promisc && (mc_count || priv->mc_count) ) { 2924 if (!promisc && (mc_count || priv->mc_count)) {
2925 struct dev_mc_list *p = dev->mc_list; 2925 struct dev_mc_list *p = dev->mc_list;
2926 struct hermes_multicast mclist; 2926 struct hermes_multicast mclist;
2927 int i; 2927 int i;
2928 2928
2929 for (i = 0; i < mc_count; i++) { 2929 for (i = 0; i < mc_count; i++) {
2930 /* paranoia: is list shorter than mc_count? */ 2930 /* paranoia: is list shorter than mc_count? */
2931 BUG_ON(! p); 2931 BUG_ON(!p);
2932 /* paranoia: bad address size in list? */ 2932 /* paranoia: bad address size in list? */
2933 BUG_ON(p->dmi_addrlen != ETH_ALEN); 2933 BUG_ON(p->dmi_addrlen != ETH_ALEN);
2934 2934
@@ -3008,7 +3008,7 @@ static void orinoco_reset(struct work_struct *work)
3008 3008
3009 /* priv->open or priv->hw_unavailable might have changed while 3009 /* priv->open or priv->hw_unavailable might have changed while
3010 * we dropped the lock */ 3010 * we dropped the lock */
3011 if (priv->open && (! priv->hw_unavailable)) { 3011 if (priv->open && (!priv->hw_unavailable)) {
3012 err = __orinoco_up(dev); 3012 err = __orinoco_up(dev);
3013 if (err) { 3013 if (err) {
3014 printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n", 3014 printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n",
@@ -3066,7 +3066,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
3066 3066
3067 evstat = hermes_read_regn(hw, EVSTAT); 3067 evstat = hermes_read_regn(hw, EVSTAT);
3068 events = evstat & hw->inten; 3068 events = evstat & hw->inten;
3069 if (! events) { 3069 if (!events) {
3070 orinoco_unlock(priv, &flags); 3070 orinoco_unlock(priv, &flags);
3071 return IRQ_NONE; 3071 return IRQ_NONE;
3072 } 3072 }
@@ -3086,7 +3086,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
3086 } 3086 }
3087 3087
3088 /* Check the card hasn't been removed */ 3088 /* Check the card hasn't been removed */
3089 if (! hermes_present(hw)) { 3089 if (!hermes_present(hw)) {
3090 DEBUG(0, "orinoco_interrupt(): card removed\n"); 3090 DEBUG(0, "orinoco_interrupt(): card removed\n");
3091 break; 3091 break;
3092 } 3092 }
@@ -3558,7 +3558,7 @@ static int orinoco_init(struct net_device *dev)
3558 /* Set up the default configuration */ 3558 /* Set up the default configuration */
3559 priv->iw_mode = IW_MODE_INFRA; 3559 priv->iw_mode = IW_MODE_INFRA;
3560 /* By default use IEEE/IBSS ad-hoc mode if we have it */ 3560 /* By default use IEEE/IBSS ad-hoc mode if we have it */
3561 priv->prefer_port3 = priv->has_port3 && (! priv->has_ibss); 3561 priv->prefer_port3 = priv->has_port3 && (!priv->has_ibss);
3562 set_port_type(priv); 3562 set_port_type(priv);
3563 priv->channel = 0; /* use firmware default */ 3563 priv->channel = 0; /* use firmware default */
3564 3564
@@ -3769,7 +3769,7 @@ static int orinoco_hw_get_freq(struct orinoco_private *priv)
3769 goto out; 3769 goto out;
3770 } 3770 }
3771 3771
3772 if ( (channel < 1) || (channel > NUM_CHANNELS) ) { 3772 if ((channel < 1) || (channel > NUM_CHANNELS)) {
3773 printk(KERN_WARNING "%s: Channel out of range (%d)!\n", 3773 printk(KERN_WARNING "%s: Channel out of range (%d)!\n",
3774 priv->ndev->name, channel); 3774 priv->ndev->name, channel);
3775 err = -EBUSY; 3775 err = -EBUSY;
@@ -4029,7 +4029,7 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev,
4029 if (priv->has_wpa) 4029 if (priv->has_wpa)
4030 range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_CIPHER_TKIP; 4030 range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_CIPHER_TKIP;
4031 4031
4032 if ((priv->iw_mode == IW_MODE_ADHOC) && (!SPY_NUMBER(priv))){ 4032 if ((priv->iw_mode == IW_MODE_ADHOC) && (!SPY_NUMBER(priv))) {
4033 /* Quality stats meaningless in ad-hoc mode */ 4033 /* Quality stats meaningless in ad-hoc mode */
4034 } else { 4034 } else {
4035 range->max_qual.qual = 0x8b - 0x2f; 4035 range->max_qual.qual = 0x8b - 0x2f;
@@ -4106,7 +4106,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
4106 int err = -EINPROGRESS; /* Call commit handler */ 4106 int err = -EINPROGRESS; /* Call commit handler */
4107 unsigned long flags; 4107 unsigned long flags;
4108 4108
4109 if (! priv->has_wep) 4109 if (!priv->has_wep)
4110 return -EOPNOTSUPP; 4110 return -EOPNOTSUPP;
4111 4111
4112 if (erq->pointer) { 4112 if (erq->pointer) {
@@ -4114,7 +4114,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
4114 if (erq->length > LARGE_KEY_SIZE) 4114 if (erq->length > LARGE_KEY_SIZE)
4115 return -E2BIG; 4115 return -E2BIG;
4116 4116
4117 if ( (erq->length > SMALL_KEY_SIZE) && !priv->has_big_wep ) 4117 if ((erq->length > SMALL_KEY_SIZE) && !priv->has_big_wep)
4118 return -E2BIG; 4118 return -E2BIG;
4119 } 4119 }
4120 4120
@@ -4147,13 +4147,13 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
4147 * we will arrive there with an index of -1. This is valid 4147 * we will arrive there with an index of -1. This is valid
4148 * but need to be taken care off... Jean II */ 4148 * but need to be taken care off... Jean II */
4149 if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) { 4149 if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) {
4150 if((index != -1) || (erq->flags == 0)) { 4150 if ((index != -1) || (erq->flags == 0)) {
4151 err = -EINVAL; 4151 err = -EINVAL;
4152 goto out; 4152 goto out;
4153 } 4153 }
4154 } else { 4154 } else {
4155 /* Set the index : Check that the key is valid */ 4155 /* Set the index : Check that the key is valid */
4156 if(priv->keys[index].len == 0) { 4156 if (priv->keys[index].len == 0) {
4157 err = -EINVAL; 4157 err = -EINVAL;
4158 goto out; 4158 goto out;
4159 } 4159 }
@@ -4204,7 +4204,7 @@ static int orinoco_ioctl_getiwencode(struct net_device *dev,
4204 u16 xlen = 0; 4204 u16 xlen = 0;
4205 unsigned long flags; 4205 unsigned long flags;
4206 4206
4207 if (! priv->has_wep) 4207 if (!priv->has_wep)
4208 return -EOPNOTSUPP; 4208 return -EOPNOTSUPP;
4209 4209
4210 if (orinoco_lock(priv, &flags) != 0) 4210 if (orinoco_lock(priv, &flags) != 0)
@@ -4348,7 +4348,7 @@ static int orinoco_ioctl_setfreq(struct net_device *dev,
4348 if (priv->iw_mode == IW_MODE_INFRA) 4348 if (priv->iw_mode == IW_MODE_INFRA)
4349 return -EBUSY; 4349 return -EBUSY;
4350 4350
4351 if ( (frq->e == 0) && (frq->m <= 1000) ) { 4351 if ((frq->e == 0) && (frq->m <= 1000)) {
4352 /* Setting by channel number */ 4352 /* Setting by channel number */
4353 chan = frq->m; 4353 chan = frq->m;
4354 } else { 4354 } else {
@@ -4363,8 +4363,8 @@ static int orinoco_ioctl_setfreq(struct net_device *dev,
4363 chan = ieee80211_freq_to_dsss_chan(frq->m / denom); 4363 chan = ieee80211_freq_to_dsss_chan(frq->m / denom);
4364 } 4364 }
4365 4365
4366 if ( (chan < 1) || (chan > NUM_CHANNELS) || 4366 if ((chan < 1) || (chan > NUM_CHANNELS) ||
4367 ! (priv->channel_mask & (1 << (chan-1)) ) ) 4367 !(priv->channel_mask & (1 << (chan-1))))
4368 return -EINVAL; 4368 return -EINVAL;
4369 4369
4370 if (orinoco_lock(priv, &flags) != 0) 4370 if (orinoco_lock(priv, &flags) != 0)
@@ -4467,7 +4467,7 @@ static int orinoco_ioctl_setrts(struct net_device *dev,
4467 if (rrq->disabled) 4467 if (rrq->disabled)
4468 val = 2347; 4468 val = 2347;
4469 4469
4470 if ( (val < 0) || (val > 2347) ) 4470 if ((val < 0) || (val > 2347))
4471 return -EINVAL; 4471 return -EINVAL;
4472 4472
4473 if (orinoco_lock(priv, &flags) != 0) 4473 if (orinoco_lock(priv, &flags) != 0)
@@ -4519,7 +4519,7 @@ static int orinoco_ioctl_setfrag(struct net_device *dev,
4519 if (frq->disabled) 4519 if (frq->disabled)
4520 priv->frag_thresh = 2346; 4520 priv->frag_thresh = 2346;
4521 else { 4521 else {
4522 if ( (frq->value < 256) || (frq->value > 2346) ) 4522 if ((frq->value < 256) || (frq->value > 2346))
4523 err = -EINVAL; 4523 err = -EINVAL;
4524 else 4524 else
4525 priv->frag_thresh = frq->value & ~0x1; /* must be even */ 4525 priv->frag_thresh = frq->value & ~0x1; /* must be even */
@@ -4553,7 +4553,7 @@ static int orinoco_ioctl_getfrag(struct net_device *dev,
4553 val = 0; 4553 val = 0;
4554 4554
4555 frq->value = val ? 2347 : 0; 4555 frq->value = val ? 2347 : 0;
4556 frq->disabled = ! val; 4556 frq->disabled = !val;
4557 frq->fixed = 0; 4557 frq->fixed = 0;
4558 } else { 4558 } else {
4559 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, 4559 err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD,
@@ -4593,13 +4593,13 @@ static int orinoco_ioctl_setrate(struct net_device *dev,
4593 bitrate = rrq->value / 100000; 4593 bitrate = rrq->value / 100000;
4594 } 4594 }
4595 4595
4596 if ( (bitrate != 10) && (bitrate != 20) && 4596 if ((bitrate != 10) && (bitrate != 20) &&
4597 (bitrate != 55) && (bitrate != 110) ) 4597 (bitrate != 55) && (bitrate != 110))
4598 return -EINVAL; 4598 return -EINVAL;
4599 4599
4600 for (i = 0; i < BITRATE_TABLE_SIZE; i++) 4600 for (i = 0; i < BITRATE_TABLE_SIZE; i++)
4601 if ( (bitrate_table[i].bitrate == bitrate) && 4601 if ((bitrate_table[i].bitrate == bitrate) &&
4602 (bitrate_table[i].automatic == ! rrq->fixed) ) { 4602 (bitrate_table[i].automatic == !rrq->fixed)) {
4603 ratemode = i; 4603 ratemode = i;
4604 break; 4604 break;
4605 } 4605 }
@@ -4636,7 +4636,7 @@ static int orinoco_ioctl_getrate(struct net_device *dev,
4636 BUG_ON((ratemode < 0) || (ratemode >= BITRATE_TABLE_SIZE)); 4636 BUG_ON((ratemode < 0) || (ratemode >= BITRATE_TABLE_SIZE));
4637 4637
4638 rrq->value = bitrate_table[ratemode].bitrate * 100000; 4638 rrq->value = bitrate_table[ratemode].bitrate * 100000;
4639 rrq->fixed = ! bitrate_table[ratemode].automatic; 4639 rrq->fixed = !bitrate_table[ratemode].automatic;
4640 rrq->disabled = 0; 4640 rrq->disabled = 0;
4641 4641
4642 /* If the interface is running we try to find more about the 4642 /* If the interface is running we try to find more about the
@@ -4725,7 +4725,7 @@ static int orinoco_ioctl_setpower(struct net_device *dev,
4725 } 4725 }
4726 /* It's valid to not have a value if we are just toggling 4726 /* It's valid to not have a value if we are just toggling
4727 * the flags... Jean II */ 4727 * the flags... Jean II */
4728 if(!priv->pm_on) { 4728 if (!priv->pm_on) {
4729 err = -EINVAL; 4729 err = -EINVAL;
4730 goto out; 4730 goto out;
4731 } 4731 }
@@ -5221,7 +5221,7 @@ static int orinoco_ioctl_getretry(struct net_device *dev,
5221 } else { 5221 } else {
5222 rrq->flags = IW_RETRY_LIMIT; 5222 rrq->flags = IW_RETRY_LIMIT;
5223 rrq->value = short_limit; 5223 rrq->value = short_limit;
5224 if(short_limit != long_limit) 5224 if (short_limit != long_limit)
5225 rrq->flags |= IW_RETRY_SHORT; 5225 rrq->flags |= IW_RETRY_SHORT;
5226 } 5226 }
5227 } 5227 }
@@ -5239,7 +5239,7 @@ static int orinoco_ioctl_reset(struct net_device *dev,
5239{ 5239{
5240 struct orinoco_private *priv = netdev_priv(dev); 5240 struct orinoco_private *priv = netdev_priv(dev);
5241 5241
5242 if (! capable(CAP_NET_ADMIN)) 5242 if (!capable(CAP_NET_ADMIN))
5243 return -EPERM; 5243 return -EPERM;
5244 5244
5245 if (info->cmd == (SIOCIWFIRSTPRIV + 0x1)) { 5245 if (info->cmd == (SIOCIWFIRSTPRIV + 0x1)) {
@@ -5263,7 +5263,7 @@ static int orinoco_ioctl_setibssport(struct net_device *dev,
5263 5263
5264{ 5264{
5265 struct orinoco_private *priv = netdev_priv(dev); 5265 struct orinoco_private *priv = netdev_priv(dev);
5266 int val = *( (int *) extra ); 5266 int val = *((int *) extra);
5267 unsigned long flags; 5267 unsigned long flags;
5268 5268
5269 if (orinoco_lock(priv, &flags) != 0) 5269 if (orinoco_lock(priv, &flags) != 0)
@@ -5296,7 +5296,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
5296 char *extra) 5296 char *extra)
5297{ 5297{
5298 struct orinoco_private *priv = netdev_priv(dev); 5298 struct orinoco_private *priv = netdev_priv(dev);
5299 int val = *( (int *) extra ); 5299 int val = *((int *) extra);
5300 int err = 0; 5300 int err = 0;
5301 unsigned long flags; 5301 unsigned long flags;
5302 5302
@@ -5305,7 +5305,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
5305 5305
5306 switch (val) { 5306 switch (val) {
5307 case 0: /* Try to do IEEE ad-hoc mode */ 5307 case 0: /* Try to do IEEE ad-hoc mode */
5308 if (! priv->has_ibss) { 5308 if (!priv->has_ibss) {
5309 err = -EINVAL; 5309 err = -EINVAL;
5310 break; 5310 break;
5311 } 5311 }
@@ -5314,7 +5314,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
5314 break; 5314 break;
5315 5315
5316 case 1: /* Try to do Lucent proprietary ad-hoc mode */ 5316 case 1: /* Try to do Lucent proprietary ad-hoc mode */
5317 if (! priv->has_port3) { 5317 if (!priv->has_port3) {
5318 err = -EINVAL; 5318 err = -EINVAL;
5319 break; 5319 break;
5320 } 5320 }
@@ -5325,7 +5325,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
5325 err = -EINVAL; 5325 err = -EINVAL;
5326 } 5326 }
5327 5327
5328 if (! err) { 5328 if (!err) {
5329 /* Actually update the mode we are using */ 5329 /* Actually update the mode we are using */
5330 set_port_type(priv); 5330 set_port_type(priv);
5331 err = -EINPROGRESS; 5331 err = -EINPROGRESS;
@@ -5357,7 +5357,7 @@ static int orinoco_ioctl_setpreamble(struct net_device *dev,
5357 unsigned long flags; 5357 unsigned long flags;
5358 int val; 5358 int val;
5359 5359
5360 if (! priv->has_preamble) 5360 if (!priv->has_preamble)
5361 return -EOPNOTSUPP; 5361 return -EOPNOTSUPP;
5362 5362
5363 /* 802.11b has recently defined some short preamble. 5363 /* 802.11b has recently defined some short preamble.
@@ -5365,7 +5365,7 @@ static int orinoco_ioctl_setpreamble(struct net_device *dev,
5365 * This increase performance, especially at high rates 5365 * This increase performance, especially at high rates
5366 * (the preamble is transmitted at 1Mb/s), unfortunately 5366 * (the preamble is transmitted at 1Mb/s), unfortunately
5367 * this give compatibility troubles... - Jean II */ 5367 * this give compatibility troubles... - Jean II */
5368 val = *( (int *) extra ); 5368 val = *((int *) extra);
5369 5369
5370 if (orinoco_lock(priv, &flags) != 0) 5370 if (orinoco_lock(priv, &flags) != 0)
5371 return -EBUSY; 5371 return -EBUSY;
@@ -5388,7 +5388,7 @@ static int orinoco_ioctl_getpreamble(struct net_device *dev,
5388 struct orinoco_private *priv = netdev_priv(dev); 5388 struct orinoco_private *priv = netdev_priv(dev);
5389 int *val = (int *) extra; 5389 int *val = (int *) extra;
5390 5390
5391 if (! priv->has_preamble) 5391 if (!priv->has_preamble)
5392 return -EOPNOTSUPP; 5392 return -EOPNOTSUPP;
5393 5393
5394 *val = priv->preamble; 5394 *val = priv->preamble;
@@ -5414,7 +5414,7 @@ static int orinoco_ioctl_getrid(struct net_device *dev,
5414 5414
5415 /* It's a "get" function, but we don't want users to access the 5415 /* It's a "get" function, but we don't want users to access the
5416 * WEP key and other raw firmware data */ 5416 * WEP key and other raw firmware data */
5417 if (! capable(CAP_NET_ADMIN)) 5417 if (!capable(CAP_NET_ADMIN))
5418 return -EPERM; 5418 return -EPERM;
5419 5419
5420 if (rid < 0xfc00 || rid > 0xffff) 5420 if (rid < 0xfc00 || rid > 0xffff)
@@ -5548,7 +5548,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
5548 err = hermes_inquire(hw, HERMES_INQ_SCAN); 5548 err = hermes_inquire(hw, HERMES_INQ_SCAN);
5549 5549
5550 /* One more client */ 5550 /* One more client */
5551 if (! err) 5551 if (!err)
5552 priv->scan_inprogress = 1; 5552 priv->scan_inprogress = 1;
5553 5553
5554 out: 5554 out: