diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-02-04 18:05:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-11 11:44:25 -0500 |
commit | 6fe9deb1747e1e3b9f626878a9954b9eef8ab17d (patch) | |
tree | 459b04fb0dec31e2d5a982ed3ea02dec541a5f3f /drivers/net/wireless/orinoco | |
parent | ce1a9ee33a5864f3d199baa1d3e154a1f9a6f3dd (diff) |
orinoco: address leading and trailing whitespace
Remove the following checkpatch errors from orinoco.c
ERROR: trailing whitespace
ERROR: code indent should use tabs where possible
WARNING: suspect code indent for conditional statements
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c index e082ef085116..0e21eaff66b5 100644 --- a/drivers/net/wireless/orinoco/orinoco.c +++ b/drivers/net/wireless/orinoco/orinoco.c | |||
@@ -798,7 +798,7 @@ static int orinoco_stop(struct net_device *dev) | |||
798 | static struct net_device_stats *orinoco_get_stats(struct net_device *dev) | 798 | static struct net_device_stats *orinoco_get_stats(struct net_device *dev) |
799 | { | 799 | { |
800 | struct orinoco_private *priv = netdev_priv(dev); | 800 | struct orinoco_private *priv = netdev_priv(dev); |
801 | 801 | ||
802 | return &priv->stats; | 802 | return &priv->stats; |
803 | } | 803 | } |
804 | 804 | ||
@@ -914,13 +914,13 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
914 | dev->name); | 914 | dev->name); |
915 | return NETDEV_TX_BUSY; | 915 | return NETDEV_TX_BUSY; |
916 | } | 916 | } |
917 | 917 | ||
918 | if (netif_queue_stopped(dev)) { | 918 | if (netif_queue_stopped(dev)) { |
919 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", | 919 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", |
920 | dev->name); | 920 | dev->name); |
921 | return NETDEV_TX_BUSY; | 921 | return NETDEV_TX_BUSY; |
922 | } | 922 | } |
923 | 923 | ||
924 | if (orinoco_lock(priv, &flags) != 0) { | 924 | if (orinoco_lock(priv, &flags) != 0) { |
925 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", | 925 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", |
926 | dev->name); | 926 | dev->name); |
@@ -929,8 +929,8 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
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). */ |
934 | goto drop; | 934 | goto drop; |
935 | } | 935 | } |
936 | 936 | ||
@@ -1141,10 +1141,10 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) | |||
1141 | dev->name, fid, err); | 1141 | dev->name, fid, err); |
1142 | return; | 1142 | return; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | DEBUG(1, "%s: Tx error, err %d (FID=%04X)\n", dev->name, | 1145 | DEBUG(1, "%s: Tx error, err %d (FID=%04X)\n", dev->name, |
1146 | err, fid); | 1146 | err, fid); |
1147 | 1147 | ||
1148 | /* We produce a TXDROP event only for retry or lifetime | 1148 | /* We produce a TXDROP event only for retry or lifetime |
1149 | * exceeded, because that's the only status that really mean | 1149 | * exceeded, because that's the only status that really mean |
1150 | * that this particular node went away. | 1150 | * that this particular node went away. |
@@ -1334,7 +1334,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, | |||
1334 | skb->ip_summed = CHECKSUM_NONE; | 1334 | skb->ip_summed = CHECKSUM_NONE; |
1335 | skb->pkt_type = PACKET_OTHERHOST; | 1335 | skb->pkt_type = PACKET_OTHERHOST; |
1336 | skb->protocol = cpu_to_be16(ETH_P_802_2); | 1336 | skb->protocol = cpu_to_be16(ETH_P_802_2); |
1337 | 1337 | ||
1338 | stats->rx_packets++; | 1338 | stats->rx_packets++; |
1339 | stats->rx_bytes += skb->len; | 1339 | stats->rx_bytes += skb->len; |
1340 | 1340 | ||
@@ -1424,8 +1424,8 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) | |||
1424 | /* Sanity checks */ | 1424 | /* Sanity checks */ |
1425 | if (length < 3) { /* No for even an 802.2 LLC header */ | 1425 | if (length < 3) { /* No for even an 802.2 LLC header */ |
1426 | /* At least on Symbol firmware with PCF we get quite a | 1426 | /* At least on Symbol firmware with PCF we get quite a |
1427 | lot of these legitimately - Poll frames with no | 1427 | lot of these legitimately - Poll frames with no |
1428 | data. */ | 1428 | data. */ |
1429 | goto out; | 1429 | goto out; |
1430 | } | 1430 | } |
1431 | if (length > IEEE80211_MAX_DATA_LEN) { | 1431 | if (length > IEEE80211_MAX_DATA_LEN) { |
@@ -1444,7 +1444,7 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) | |||
1444 | header, plus 2 bytes so we can align the IP header on a | 1444 | header, plus 2 bytes so we can align the IP header on a |
1445 | 32bit boundary, plus 1 byte so we can read in odd length | 1445 | 32bit boundary, plus 1 byte so we can read in odd length |
1446 | packets from the card, which has an IO granularity of 16 | 1446 | packets from the card, which has an IO granularity of 16 |
1447 | bits */ | 1447 | bits */ |
1448 | skb = dev_alloc_skb(length+ETH_HLEN+2+1); | 1448 | skb = dev_alloc_skb(length+ETH_HLEN+2+1); |
1449 | if (!skb) { | 1449 | if (!skb) { |
1450 | printk(KERN_WARNING "%s: Can't allocate skb for Rx\n", | 1450 | printk(KERN_WARNING "%s: Can't allocate skb for Rx\n", |
@@ -1587,7 +1587,7 @@ static void orinoco_rx(struct net_device *dev, | |||
1587 | skb->ip_summed = CHECKSUM_NONE; | 1587 | skb->ip_summed = CHECKSUM_NONE; |
1588 | if (fc & IEEE80211_FCTL_TODS) | 1588 | if (fc & IEEE80211_FCTL_TODS) |
1589 | skb->pkt_type = PACKET_OTHERHOST; | 1589 | skb->pkt_type = PACKET_OTHERHOST; |
1590 | 1590 | ||
1591 | /* Process the wireless stats if needed */ | 1591 | /* Process the wireless stats if needed */ |
1592 | orinoco_stat_gather(dev, skb, desc); | 1592 | orinoco_stat_gather(dev, skb, desc); |
1593 | 1593 | ||
@@ -1673,7 +1673,7 @@ static void print_linkstatus(struct net_device *dev, u16 status) | |||
1673 | default: | 1673 | default: |
1674 | s = "UNKNOWN"; | 1674 | s = "UNKNOWN"; |
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | printk(KERN_DEBUG "%s: New link status: %s (%04x)\n", | 1677 | printk(KERN_DEBUG "%s: New link status: %s (%04x)\n", |
1678 | dev->name, s, status); | 1678 | dev->name, s, status); |
1679 | } | 1679 | } |
@@ -2046,7 +2046,7 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) | |||
2046 | "Frame dropped.\n", dev->name, err); | 2046 | "Frame dropped.\n", dev->name, err); |
2047 | return; | 2047 | return; |
2048 | } | 2048 | } |
2049 | 2049 | ||
2050 | len = HERMES_RECLEN_TO_BYTES(le16_to_cpu(info.len)); | 2050 | len = HERMES_RECLEN_TO_BYTES(le16_to_cpu(info.len)); |
2051 | type = le16_to_cpu(info.type); | 2051 | type = le16_to_cpu(info.type); |
2052 | 2052 | ||
@@ -2054,23 +2054,23 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) | |||
2054 | case HERMES_INQ_TALLIES: { | 2054 | case HERMES_INQ_TALLIES: { |
2055 | struct hermes_tallies_frame tallies; | 2055 | struct hermes_tallies_frame tallies; |
2056 | struct iw_statistics *wstats = &priv->wstats; | 2056 | struct iw_statistics *wstats = &priv->wstats; |
2057 | 2057 | ||
2058 | if (len > sizeof(tallies)) { | 2058 | if (len > sizeof(tallies)) { |
2059 | printk(KERN_WARNING "%s: Tallies frame too long (%d bytes)\n", | 2059 | printk(KERN_WARNING "%s: Tallies frame too long (%d bytes)\n", |
2060 | dev->name, len); | 2060 | dev->name, len); |
2061 | len = sizeof(tallies); | 2061 | len = sizeof(tallies); |
2062 | } | 2062 | } |
2063 | 2063 | ||
2064 | err = hermes_bap_pread(hw, IRQ_BAP, &tallies, len, | 2064 | err = hermes_bap_pread(hw, IRQ_BAP, &tallies, len, |
2065 | infofid, sizeof(info)); | 2065 | infofid, sizeof(info)); |
2066 | if (err) | 2066 | if (err) |
2067 | break; | 2067 | break; |
2068 | 2068 | ||
2069 | /* Increment our various counters */ | 2069 | /* Increment our various counters */ |
2070 | /* wstats->discard.nwid - no wrong BSSID stuff */ | 2070 | /* wstats->discard.nwid - no wrong BSSID stuff */ |
2071 | wstats->discard.code += | 2071 | wstats->discard.code += |
2072 | le16_to_cpu(tallies.RxWEPUndecryptable); | 2072 | le16_to_cpu(tallies.RxWEPUndecryptable); |
2073 | if (len == sizeof(tallies)) | 2073 | if (len == sizeof(tallies)) |
2074 | wstats->discard.code += | 2074 | wstats->discard.code += |
2075 | le16_to_cpu(tallies.RxDiscards_WEPICVError) + | 2075 | le16_to_cpu(tallies.RxDiscards_WEPICVError) + |
2076 | le16_to_cpu(tallies.RxDiscards_WEPExcluded); | 2076 | le16_to_cpu(tallies.RxDiscards_WEPExcluded); |
@@ -2326,7 +2326,7 @@ int __orinoco_down(struct net_device *dev) | |||
2326 | hermes_set_irqmask(hw, 0); | 2326 | hermes_set_irqmask(hw, 0); |
2327 | hermes_write_regn(hw, EVACK, 0xffff); | 2327 | hermes_write_regn(hw, EVACK, 0xffff); |
2328 | } | 2328 | } |
2329 | 2329 | ||
2330 | /* firmware will have to reassociate */ | 2330 | /* firmware will have to reassociate */ |
2331 | netif_carrier_off(dev); | 2331 | netif_carrier_off(dev); |
2332 | priv->last_linkstatus = 0xffff; | 2332 | priv->last_linkstatus = 0xffff; |
@@ -2346,7 +2346,7 @@ static int orinoco_allocate_fid(struct net_device *dev) | |||
2346 | printk(KERN_WARNING "%s: firmware ALLOC bug detected " | 2346 | printk(KERN_WARNING "%s: firmware ALLOC bug detected " |
2347 | "(old Symbol firmware?). Trying to work around... ", | 2347 | "(old Symbol firmware?). Trying to work around... ", |
2348 | dev->name); | 2348 | dev->name); |
2349 | 2349 | ||
2350 | priv->nicbuf_size = TX_NICBUF_SIZE_BUG; | 2350 | priv->nicbuf_size = TX_NICBUF_SIZE_BUG; |
2351 | err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); | 2351 | err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); |
2352 | if (err) | 2352 | if (err) |
@@ -2467,7 +2467,7 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv) | |||
2467 | 2467 | ||
2468 | /* Force uniform key length to work around firmware bugs */ | 2468 | /* Force uniform key length to work around firmware bugs */ |
2469 | keylen = le16_to_cpu(priv->keys[priv->tx_key].len); | 2469 | keylen = le16_to_cpu(priv->keys[priv->tx_key].len); |
2470 | 2470 | ||
2471 | if (keylen > LARGE_KEY_SIZE) { | 2471 | if (keylen > LARGE_KEY_SIZE) { |
2472 | printk(KERN_ERR "%s: BUG: Key %d has oversize length %d.\n", | 2472 | printk(KERN_ERR "%s: BUG: Key %d has oversize length %d.\n", |
2473 | priv->ndev->name, priv->tx_key, keylen); | 2473 | priv->ndev->name, priv->tx_key, keylen); |
@@ -2572,7 +2572,7 @@ static int __orinoco_hw_setup_enc(struct orinoco_private *priv) | |||
2572 | HERMES_RID_CNFWEPFLAGS_INTERSIL, | 2572 | HERMES_RID_CNFWEPFLAGS_INTERSIL, |
2573 | master_wep_flag); | 2573 | master_wep_flag); |
2574 | if (err) | 2574 | if (err) |
2575 | return err; | 2575 | return err; |
2576 | 2576 | ||
2577 | break; | 2577 | break; |
2578 | } | 2578 | } |
@@ -2707,7 +2707,7 @@ static int __orinoco_program_rids(struct net_device *dev) | |||
2707 | } else { | 2707 | } else { |
2708 | createibss = priv->createibss; | 2708 | createibss = priv->createibss; |
2709 | } | 2709 | } |
2710 | 2710 | ||
2711 | err = hermes_write_wordrec(hw, USER_BAP, | 2711 | err = hermes_write_wordrec(hw, USER_BAP, |
2712 | HERMES_RID_CNFCREATEIBSS, | 2712 | HERMES_RID_CNFCREATEIBSS, |
2713 | createibss); | 2713 | createibss); |
@@ -2866,7 +2866,7 @@ static int __orinoco_program_rids(struct net_device *dev) | |||
2866 | if (priv->iw_mode == IW_MODE_MONITOR) { | 2866 | if (priv->iw_mode == IW_MODE_MONITOR) { |
2867 | /* Enable monitor mode */ | 2867 | /* Enable monitor mode */ |
2868 | dev->type = ARPHRD_IEEE80211; | 2868 | dev->type = ARPHRD_IEEE80211; |
2869 | err = hermes_docmd_wait(hw, HERMES_CMD_TEST | | 2869 | err = hermes_docmd_wait(hw, HERMES_CMD_TEST | |
2870 | HERMES_TEST_MONITOR, 0, NULL); | 2870 | HERMES_TEST_MONITOR, 0, NULL); |
2871 | } else { | 2871 | } else { |
2872 | /* Disable monitor mode */ | 2872 | /* Disable monitor mode */ |
@@ -2914,7 +2914,7 @@ __orinoco_set_multicast_list(struct net_device *dev) | |||
2914 | if (err) { | 2914 | if (err) { |
2915 | printk(KERN_ERR "%s: Error %d setting PROMISCUOUSMODE to 1.\n", | 2915 | printk(KERN_ERR "%s: Error %d setting PROMISCUOUSMODE to 1.\n", |
2916 | dev->name, err); | 2916 | dev->name, err); |
2917 | } else | 2917 | } else |
2918 | priv->promiscuous = promisc; | 2918 | priv->promiscuous = promisc; |
2919 | } | 2919 | } |
2920 | 2920 | ||
@@ -2931,11 +2931,11 @@ __orinoco_set_multicast_list(struct net_device *dev) | |||
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 | ||
2935 | memcpy(mclist.addr[i], p->dmi_addr, ETH_ALEN); | 2935 | memcpy(mclist.addr[i], p->dmi_addr, ETH_ALEN); |
2936 | p = p->next; | 2936 | p = p->next; |
2937 | } | 2937 | } |
2938 | 2938 | ||
2939 | if (p) | 2939 | if (p) |
2940 | printk(KERN_WARNING "%s: Multicast list is " | 2940 | printk(KERN_WARNING "%s: Multicast list is " |
2941 | "longer than mc_count\n", dev->name); | 2941 | "longer than mc_count\n", dev->name); |
@@ -2982,7 +2982,7 @@ static void orinoco_reset(struct work_struct *work) | |||
2982 | 2982 | ||
2983 | orinoco_unlock(priv, &flags); | 2983 | orinoco_unlock(priv, &flags); |
2984 | 2984 | ||
2985 | /* Scanning support: Cleanup of driver struct */ | 2985 | /* Scanning support: Cleanup of driver struct */ |
2986 | orinoco_clear_scan_results(priv, 0); | 2986 | orinoco_clear_scan_results(priv, 0); |
2987 | priv->scan_inprogress = 0; | 2987 | priv->scan_inprogress = 0; |
2988 | 2988 | ||
@@ -3070,7 +3070,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id) | |||
3070 | orinoco_unlock(priv, &flags); | 3070 | orinoco_unlock(priv, &flags); |
3071 | return IRQ_NONE; | 3071 | return IRQ_NONE; |
3072 | } | 3072 | } |
3073 | 3073 | ||
3074 | if (jiffies != last_irq_jiffy) | 3074 | if (jiffies != last_irq_jiffy) |
3075 | loops_this_jiffy = 0; | 3075 | loops_this_jiffy = 0; |
3076 | last_irq_jiffy = jiffies; | 3076 | last_irq_jiffy = jiffies; |
@@ -3107,7 +3107,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id) | |||
3107 | __orinoco_ev_tx(dev, hw); | 3107 | __orinoco_ev_tx(dev, hw); |
3108 | if (events & HERMES_EV_ALLOC) | 3108 | if (events & HERMES_EV_ALLOC) |
3109 | __orinoco_ev_alloc(dev, hw); | 3109 | __orinoco_ev_alloc(dev, hw); |
3110 | 3110 | ||
3111 | hermes_write_regn(hw, EVACK, evstat); | 3111 | hermes_write_regn(hw, EVACK, evstat); |
3112 | 3112 | ||
3113 | evstat = hermes_read_regn(hw, EVSTAT); | 3113 | evstat = hermes_read_regn(hw, EVSTAT); |
@@ -3315,7 +3315,7 @@ static int determine_firmware(struct net_device *dev) | |||
3315 | priv->has_ibss = (firmver >= 0x20000); | 3315 | priv->has_ibss = (firmver >= 0x20000); |
3316 | priv->has_wep = (firmver >= 0x15012); | 3316 | priv->has_wep = (firmver >= 0x15012); |
3317 | priv->has_big_wep = (firmver >= 0x20000); | 3317 | priv->has_big_wep = (firmver >= 0x20000); |
3318 | priv->has_pm = (firmver >= 0x20000 && firmver < 0x22000) || | 3318 | priv->has_pm = (firmver >= 0x20000 && firmver < 0x22000) || |
3319 | (firmver >= 0x29000 && firmver < 0x30000) || | 3319 | (firmver >= 0x29000 && firmver < 0x30000) || |
3320 | firmver >= 0x31000; | 3320 | firmver >= 0x31000; |
3321 | priv->has_preamble = (firmver >= 0x20000); | 3321 | priv->has_preamble = (firmver >= 0x20000); |
@@ -3335,8 +3335,8 @@ static int determine_firmware(struct net_device *dev) | |||
3335 | */ | 3335 | */ |
3336 | priv->do_fw_download = (priv->stop_fw != NULL); | 3336 | priv->do_fw_download = (priv->stop_fw != NULL); |
3337 | 3337 | ||
3338 | priv->broken_disableport = (firmver == 0x25013) || | 3338 | priv->broken_disableport = (firmver == 0x25013) || |
3339 | (firmver >= 0x30000 && firmver <= 0x31000); | 3339 | (firmver >= 0x30000 && firmver <= 0x31000); |
3340 | priv->has_hostscan = (firmver >= 0x31001) || | 3340 | priv->has_hostscan = (firmver >= 0x31001) || |
3341 | (firmver >= 0x29057 && firmver < 0x30000); | 3341 | (firmver >= 0x29057 && firmver < 0x30000); |
3342 | /* Tested with Intel firmware : 0x20015 => Jean II */ | 3342 | /* Tested with Intel firmware : 0x20015 => Jean II */ |
@@ -3554,7 +3554,7 @@ static int orinoco_init(struct net_device *dev) | |||
3554 | if (err) | 3554 | if (err) |
3555 | goto out; | 3555 | goto out; |
3556 | } | 3556 | } |
3557 | 3557 | ||
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 */ |
@@ -3720,7 +3720,7 @@ static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, | |||
3720 | 3720 | ||
3721 | rid = (priv->port_type == 3) ? HERMES_RID_CNFOWNSSID : | 3721 | rid = (priv->port_type == 3) ? HERMES_RID_CNFOWNSSID : |
3722 | HERMES_RID_CNFDESIREDSSID; | 3722 | HERMES_RID_CNFDESIREDSSID; |
3723 | 3723 | ||
3724 | err = hermes_read_ltv(hw, USER_BAP, rid, sizeof(essidbuf), | 3724 | err = hermes_read_ltv(hw, USER_BAP, rid, sizeof(essidbuf), |
3725 | NULL, &essidbuf); | 3725 | NULL, &essidbuf); |
3726 | if (err) | 3726 | if (err) |
@@ -3744,12 +3744,12 @@ static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, | |||
3744 | fail_unlock: | 3744 | fail_unlock: |
3745 | orinoco_unlock(priv, &flags); | 3745 | orinoco_unlock(priv, &flags); |
3746 | 3746 | ||
3747 | return err; | 3747 | return err; |
3748 | } | 3748 | } |
3749 | 3749 | ||
3750 | static int orinoco_hw_get_freq(struct orinoco_private *priv) | 3750 | static int orinoco_hw_get_freq(struct orinoco_private *priv) |
3751 | { | 3751 | { |
3752 | 3752 | ||
3753 | hermes_t *hw = &priv->hw; | 3753 | hermes_t *hw = &priv->hw; |
3754 | int err = 0; | 3754 | int err = 0; |
3755 | u16 channel; | 3755 | u16 channel; |
@@ -3758,7 +3758,7 @@ static int orinoco_hw_get_freq(struct orinoco_private *priv) | |||
3758 | 3758 | ||
3759 | if (orinoco_lock(priv, &flags) != 0) | 3759 | if (orinoco_lock(priv, &flags) != 0) |
3760 | return -EBUSY; | 3760 | return -EBUSY; |
3761 | 3761 | ||
3762 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CURRENTCHANNEL, &channel); | 3762 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CURRENTCHANNEL, &channel); |
3763 | if (err) | 3763 | if (err) |
3764 | goto out; | 3764 | goto out; |
@@ -3806,7 +3806,7 @@ static int orinoco_hw_get_bitratelist(struct orinoco_private *priv, | |||
3806 | 3806 | ||
3807 | if (err) | 3807 | if (err) |
3808 | return err; | 3808 | return err; |
3809 | 3809 | ||
3810 | num = le16_to_cpu(list.len); | 3810 | num = le16_to_cpu(list.len); |
3811 | *numrates = num; | 3811 | *numrates = num; |
3812 | num = min(num, max); | 3812 | num = min(num, max); |
@@ -4008,7 +4008,7 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, | |||
4008 | range->freq[k].e = 1; | 4008 | range->freq[k].e = 1; |
4009 | k++; | 4009 | k++; |
4010 | } | 4010 | } |
4011 | 4011 | ||
4012 | if (k >= IW_MAX_FREQUENCIES) | 4012 | if (k >= IW_MAX_FREQUENCIES) |
4013 | break; | 4013 | break; |
4014 | } | 4014 | } |
@@ -4446,7 +4446,7 @@ static int orinoco_ioctl_setsens(struct net_device *dev, | |||
4446 | 4446 | ||
4447 | if ((val < 1) || (val > 3)) | 4447 | if ((val < 1) || (val > 3)) |
4448 | return -EINVAL; | 4448 | return -EINVAL; |
4449 | 4449 | ||
4450 | if (orinoco_lock(priv, &flags) != 0) | 4450 | if (orinoco_lock(priv, &flags) != 0) |
4451 | return -EBUSY; | 4451 | return -EBUSY; |
4452 | priv->ap_density = val; | 4452 | priv->ap_density = val; |
@@ -4544,7 +4544,7 @@ static int orinoco_ioctl_getfrag(struct net_device *dev, | |||
4544 | 4544 | ||
4545 | if (orinoco_lock(priv, &flags) != 0) | 4545 | if (orinoco_lock(priv, &flags) != 0) |
4546 | return -EBUSY; | 4546 | return -EBUSY; |
4547 | 4547 | ||
4548 | if (priv->has_mwo) { | 4548 | if (priv->has_mwo) { |
4549 | err = hermes_read_wordrec(hw, USER_BAP, | 4549 | err = hermes_read_wordrec(hw, USER_BAP, |
4550 | HERMES_RID_CNFMWOROBUST_AGERE, | 4550 | HERMES_RID_CNFMWOROBUST_AGERE, |
@@ -4567,7 +4567,7 @@ static int orinoco_ioctl_getfrag(struct net_device *dev, | |||
4567 | } | 4567 | } |
4568 | 4568 | ||
4569 | orinoco_unlock(priv, &flags); | 4569 | orinoco_unlock(priv, &flags); |
4570 | 4570 | ||
4571 | return err; | 4571 | return err; |
4572 | } | 4572 | } |
4573 | 4573 | ||
@@ -4581,7 +4581,7 @@ static int orinoco_ioctl_setrate(struct net_device *dev, | |||
4581 | int bitrate; /* 100s of kilobits */ | 4581 | int bitrate; /* 100s of kilobits */ |
4582 | int i; | 4582 | int i; |
4583 | unsigned long flags; | 4583 | unsigned long flags; |
4584 | 4584 | ||
4585 | /* As the user space doesn't know our highest rate, it uses -1 | 4585 | /* As the user space doesn't know our highest rate, it uses -1 |
4586 | * to ask us to set the highest rate. Test it using "iwconfig | 4586 | * to ask us to set the highest rate. Test it using "iwconfig |
4587 | * ethX rate auto" - Jean II */ | 4587 | * ethX rate auto" - Jean II */ |
@@ -4603,7 +4603,7 @@ static int orinoco_ioctl_setrate(struct net_device *dev, | |||
4603 | ratemode = i; | 4603 | ratemode = i; |
4604 | break; | 4604 | break; |
4605 | } | 4605 | } |
4606 | 4606 | ||
4607 | if (ratemode == -1) | 4607 | if (ratemode == -1) |
4608 | return -EINVAL; | 4608 | return -EINVAL; |
4609 | 4609 | ||
@@ -4646,7 +4646,7 @@ static int orinoco_ioctl_getrate(struct net_device *dev, | |||
4646 | HERMES_RID_CURRENTTXRATE, &val); | 4646 | HERMES_RID_CURRENTTXRATE, &val); |
4647 | if (err) | 4647 | if (err) |
4648 | goto out; | 4648 | goto out; |
4649 | 4649 | ||
4650 | switch (priv->firmware_type) { | 4650 | switch (priv->firmware_type) { |
4651 | case FIRMWARE_TYPE_AGERE: /* Lucent style rate */ | 4651 | case FIRMWARE_TYPE_AGERE: /* Lucent style rate */ |
4652 | /* Note : in Lucent firmware, the return value of | 4652 | /* Note : in Lucent firmware, the return value of |
@@ -4714,7 +4714,7 @@ static int orinoco_ioctl_setpower(struct net_device *dev, | |||
4714 | err = -EINVAL; | 4714 | err = -EINVAL; |
4715 | goto out; | 4715 | goto out; |
4716 | } | 4716 | } |
4717 | 4717 | ||
4718 | if (prq->flags & IW_POWER_TIMEOUT) { | 4718 | if (prq->flags & IW_POWER_TIMEOUT) { |
4719 | priv->pm_on = 1; | 4719 | priv->pm_on = 1; |
4720 | priv->pm_timeout = prq->value / 1000; | 4720 | priv->pm_timeout = prq->value / 1000; |
@@ -4728,7 +4728,7 @@ static int orinoco_ioctl_setpower(struct net_device *dev, | |||
4728 | if(!priv->pm_on) { | 4728 | if(!priv->pm_on) { |
4729 | err = -EINVAL; | 4729 | err = -EINVAL; |
4730 | goto out; | 4730 | goto out; |
4731 | } | 4731 | } |
4732 | } | 4732 | } |
4733 | 4733 | ||
4734 | out: | 4734 | out: |
@@ -4750,7 +4750,7 @@ static int orinoco_ioctl_getpower(struct net_device *dev, | |||
4750 | 4750 | ||
4751 | if (orinoco_lock(priv, &flags) != 0) | 4751 | if (orinoco_lock(priv, &flags) != 0) |
4752 | return -EBUSY; | 4752 | return -EBUSY; |
4753 | 4753 | ||
4754 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFPMENABLED, &enable); | 4754 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFPMENABLED, &enable); |
4755 | if (err) | 4755 | if (err) |
4756 | goto out; | 4756 | goto out; |
@@ -4814,7 +4814,7 @@ static int orinoco_ioctl_set_encodeext(struct net_device *dev, | |||
4814 | idx = priv->tx_key; | 4814 | idx = priv->tx_key; |
4815 | 4815 | ||
4816 | if (encoding->flags & IW_ENCODE_DISABLED) | 4816 | if (encoding->flags & IW_ENCODE_DISABLED) |
4817 | alg = IW_ENCODE_ALG_NONE; | 4817 | alg = IW_ENCODE_ALG_NONE; |
4818 | 4818 | ||
4819 | if (priv->has_wpa && (alg != IW_ENCODE_ALG_TKIP)) { | 4819 | if (priv->has_wpa && (alg != IW_ENCODE_ALG_TKIP)) { |
4820 | /* Clear any TKIP TX key we had */ | 4820 | /* Clear any TKIP TX key we had */ |
@@ -5191,7 +5191,7 @@ static int orinoco_ioctl_getretry(struct net_device *dev, | |||
5191 | 5191 | ||
5192 | if (orinoco_lock(priv, &flags) != 0) | 5192 | if (orinoco_lock(priv, &flags) != 0) |
5193 | return -EBUSY; | 5193 | return -EBUSY; |
5194 | 5194 | ||
5195 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_SHORTRETRYLIMIT, | 5195 | err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_SHORTRETRYLIMIT, |
5196 | &short_limit); | 5196 | &short_limit); |
5197 | if (err) | 5197 | if (err) |
@@ -5310,7 +5310,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev, | |||
5310 | break; | 5310 | break; |
5311 | } | 5311 | } |
5312 | priv->prefer_port3 = 0; | 5312 | priv->prefer_port3 = 0; |
5313 | 5313 | ||
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 */ |