]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge /spare/repo/linux-2.6/
authorJeff Garzik <jgarzik@pretzel.yyz.us>
Mon, 27 Jun 2005 03:38:58 +0000 (23:38 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 27 Jun 2005 03:38:58 +0000 (23:38 -0400)
1  2 
drivers/net/wireless/orinoco.c

index b47684c3217e544f8af8f2e87eb2912c4159de08,b1078baa1d5e3851804b12509222407283b753d2..a57187391f81c5959332b254c56df4a77923f272
  #include <linux/etherdevice.h>
  #include <linux/wireless.h>
  
 +#include <net/ieee80211.h>
 +
  #include <asm/uaccess.h>
  #include <asm/io.h>
  #include <asm/system.h>
  #include "hermes.h"
  #include "hermes_rid.h"
  #include "orinoco.h"
 -#include "ieee802_11.h"
  
  /********************************************************************/
  /* Module information                                               */
@@@ -493,6 -492,9 +493,9 @@@ EXPORT_SYMBOL(orinoco_debug)
  static int suppress_linkstatus; /* = 0 */
  module_param(suppress_linkstatus, bool, 0644);
  MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes");
+ static int ignore_disconnect; /* = 0 */
+ module_param(ignore_disconnect, int, 0644);
+ MODULE_PARM_DESC(ignore_disconnect, "Don't report lost link to the network layer");
  
  /********************************************************************/
  /* Compile time configuration and compatibility stuff               */
  /********************************************************************/
  
  #define ORINOCO_MIN_MTU               256
 -#define ORINOCO_MAX_MTU               (IEEE802_11_DATA_LEN - ENCAPS_OVERHEAD)
 +#define ORINOCO_MAX_MTU               (IEEE80211_DATA_LEN - ENCAPS_OVERHEAD)
  
  #define SYMBOL_MAX_VER_LEN    (14)
  #define USER_BAP              0
@@@ -605,7 -607,6 +608,6 @@@ struct hermes_rx_descriptor 
  static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
  static int __orinoco_program_rids(struct net_device *dev);
  static void __orinoco_set_multicast_list(struct net_device *dev);
- static int orinoco_debug_dump_recs(struct net_device *dev);
  
  /********************************************************************/
  /* Internal helper functions                                        */
@@@ -656,7 -657,7 +658,7 @@@ static int orinoco_open(struct net_devi
        return err;
  }
  
- int orinoco_stop(struct net_device *dev)
static int orinoco_stop(struct net_device *dev)
  {
        struct orinoco_private *priv = netdev_priv(dev);
        int err = 0;
@@@ -687,7 -688,7 +689,7 @@@ static struct iw_statistics *orinoco_ge
        struct orinoco_private *priv = netdev_priv(dev);
        hermes_t *hw = &priv->hw;
        struct iw_statistics *wstats = &priv->wstats;
-       int err = 0;
+       int err;
        unsigned long flags;
  
        if (! netif_device_present(dev)) {
                return NULL; /* FIXME: Can we do better than this? */
        }
  
+       /* If busy, return the old stats.  Returning NULL may cause
+        * the interface to disappear from /proc/net/wireless */
        if (orinoco_lock(priv, &flags) != 0)
-               return NULL;  /* FIXME: Erg, we've been signalled, how
-                              * do we propagate this back up? */
+               return wstats;
+       /* We can't really wait for the tallies inquiry command to
+        * complete, so we just use the previous results and trigger
+        * a new tallies inquiry command for next time - Jean II */
+       /* FIXME: Really we should wait for the inquiry to come back -
+        * as it is the stats we give don't make a whole lot of sense.
+        * Unfortunately, it's not clear how to do that within the
+        * wireless extensions framework: I think we're in user
+        * context, but a lock seems to be held by the time we get in
+        * here so we're not safe to sleep here. */
+       hermes_inquire(hw, HERMES_INQ_TALLIES);
  
        if (priv->iw_mode == IW_MODE_ADHOC) {
                memset(&wstats->qual, 0, sizeof(wstats->qual));
  
                err = HERMES_READ_RECORD(hw, USER_BAP,
                                         HERMES_RID_COMMSQUALITY, &cq);
-               
-               wstats->qual.qual = (int)le16_to_cpu(cq.qual);
-               wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95;
-               wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95;
-               wstats->qual.updated = 7;
+               if (!err) {
+                       wstats->qual.qual = (int)le16_to_cpu(cq.qual);
+                       wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95;
+                       wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95;
+                       wstats->qual.updated = 7;
+               }
        }
  
-       /* We can't really wait for the tallies inquiry command to
-        * complete, so we just use the previous results and trigger
-        * a new tallies inquiry command for next time - Jean II */
-       /* FIXME: We're in user context (I think?), so we should just
-            wait for the tallies to come through */
-       err = hermes_inquire(hw, HERMES_INQ_TALLIES);
-                
        orinoco_unlock(priv, &flags);
-       if (err)
-               return NULL;
-               
        return wstats;
  }
  
@@@ -761,7 -765,7 +766,7 @@@ static int orinoco_change_mtu(struct ne
        if ( (new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU) )
                return -EINVAL;
  
 -      if ( (new_mtu + ENCAPS_OVERHEAD + IEEE802_11_HLEN) >
 +      if ( (new_mtu + ENCAPS_OVERHEAD + IEEE80211_HLEN) >
             (priv->nicbuf_size - ETH_HLEN) )
                return -EINVAL;
  
@@@ -1105,7 -1109,7 +1110,7 @@@ static void __orinoco_ev_rx(struct net_
                stats->rx_dropped++;
                goto drop;
        }
 -      if (length > IEEE802_11_DATA_LEN) {
 +      if (length > IEEE80211_DATA_LEN) {
                printk(KERN_WARNING "%s: Oversized frame received (%d bytes)\n",
                       dev->name, length);
                stats->rx_length_errors++;
@@@ -1276,9 -1280,10 +1281,10 @@@ static void __orinoco_ev_info(struct ne
                        len = sizeof(tallies);
                }
                
-               /* Read directly the data (no seek) */
-               hermes_read_words(hw, HERMES_DATA1, (void *) &tallies,
-                                 len / 2); /* FIXME: blech! */
+               err = hermes_bap_pread(hw, IRQ_BAP, &tallies, len,
+                                      infofid, sizeof(info));
+               if (err)
+                       break;
                
                /* Increment our various counters */
                /* wstats->discard.nwid - no wrong BSSID stuff */
                        break;
                }
  
-               hermes_read_words(hw, HERMES_DATA1, (void *) &linkstatus,
-                                 len / 2);
+               err = hermes_bap_pread(hw, IRQ_BAP, &linkstatus, len,
+                                      infofid, sizeof(info));
+               if (err)
+                       break;
                newstatus = le16_to_cpu(linkstatus.linkstatus);
  
                connected = (newstatus == HERMES_LINKSTATUS_CONNECTED)
  
                if (connected)
                        netif_carrier_on(dev);
-               else
+               else if (!ignore_disconnect)
                        netif_carrier_off(dev);
  
                if (newstatus != priv->last_linkstatus)
@@@ -1351,6 -1358,8 +1359,8 @@@ int __orinoco_up(struct net_device *dev
        struct hermes *hw = &priv->hw;
        int err;
  
+       netif_carrier_off(dev); /* just to make sure */
        err = __orinoco_program_rids(dev);
        if (err) {
                printk(KERN_ERR "%s: Error %d configuring card\n",
@@@ -1414,7 -1423,7 +1424,7 @@@ int orinoco_reinit_firmware(struct net_
                return err;
  
        err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
-       if (err == -EIO) {
+       if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) {
                /* Try workaround for old Symbol firmware bug */
                printk(KERN_WARNING "%s: firmware ALLOC bug detected "
                       "(old Symbol firmware?). Trying to work around... ",
@@@ -1611,17 -1620,15 +1621,15 @@@ static int __orinoco_program_rids(struc
                return err;
        }
        /* Set the channel/frequency */
-       if (priv->channel == 0) {
-               printk(KERN_DEBUG "%s: Channel is 0 in __orinoco_program_rids()\n", dev->name);
-               if (priv->createibss)
-                       priv->channel = 10;
-       }
-       err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFOWNCHANNEL,
-                                  priv->channel);
-       if (err) {
-               printk(KERN_ERR "%s: Error %d setting channel\n",
-                      dev->name, err);
-               return err;
+       if (priv->channel != 0 && priv->iw_mode != IW_MODE_INFRA) {
+               err = hermes_write_wordrec(hw, USER_BAP,
+                                          HERMES_RID_CNFOWNCHANNEL,
+                                          priv->channel);
+               if (err) {
+                       printk(KERN_ERR "%s: Error %d setting channel %d\n",
+                              dev->name, err, priv->channel);
+                       return err;
+               }
        }
  
        if (priv->has_ibss) {
@@@ -1917,7 -1924,7 +1925,7 @@@ static void orinoco_reset(struct net_de
  {
        struct orinoco_private *priv = netdev_priv(dev);
        struct hermes *hw = &priv->hw;
-       int err = 0;
+       int err;
        unsigned long flags;
  
        if (orinoco_lock(priv, &flags) != 0)
  
        orinoco_unlock(priv, &flags);
  
-       if (priv->hard_reset)
+       if (priv->hard_reset) {
                err = (*priv->hard_reset)(priv);
-       if (err) {
-               printk(KERN_ERR "%s: orinoco_reset: Error %d "
-                      "performing  hard reset\n", dev->name, err);
-               /* FIXME: shutdown of some sort */
-               return;
+               if (err) {
+                       printk(KERN_ERR "%s: orinoco_reset: Error %d "
+                              "performing hard reset\n", dev->name, err);
+                       goto disable;
+               }
        }
  
        err = orinoco_reinit_firmware(dev);
        if (err) {
                printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n",
                       dev->name, err);
-               return;
+               goto disable;
        }
  
        spin_lock_irq(&priv->lock); /* This has to be called from user context */
        spin_unlock_irq(&priv->lock);
  
        return;
+  disable:
+       hermes_set_irqmask(hw, 0);
+       netif_device_detach(dev);
+       printk(KERN_ERR "%s: Device has been disabled!\n", dev->name);
  }
  
  /********************************************************************/
@@@ -2057,7 -2068,7 +2069,7 @@@ irqreturn_t orinoco_interrupt(int irq, 
                if (events & HERMES_EV_ALLOC)
                        __orinoco_ev_alloc(dev, hw);
                
-               hermes_write_regn(hw, EVACK, events);
+               hermes_write_regn(hw, EVACK, evstat);
  
                evstat = hermes_read_regn(hw, EVSTAT);
                events = evstat & hw->inten;
@@@ -2216,6 -2227,8 +2228,8 @@@ static int determine_firmware(struct ne
                               firmver >= 0x31000;
                priv->has_preamble = (firmver >= 0x20000);
                priv->ibss_port = 4;
+               priv->broken_disableport = (firmver == 0x25013) ||
+                                          (firmver >= 0x30000 && firmver <= 0x31000);
                /* Tested with Intel firmware : 0x20015 => Jean II */
                /* Tested with 3Com firmware : 0x15012 & 0x22001 => Jean II */
                break;
@@@ -2265,10 -2278,10 +2279,10 @@@ static int orinoco_init(struct net_devi
  
        /* No need to lock, the hw_unavailable flag is already set in
         * alloc_orinocodev() */
 -      priv->nicbuf_size = IEEE802_11_FRAME_LEN + ETH_HLEN;
 +      priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN;
  
        /* Initialize the firmware */
-       err = hermes_init(hw);
+       err = orinoco_reinit_firmware(dev);
        if (err != 0) {
                printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n",
                       dev->name, err);
        /* By default use IEEE/IBSS ad-hoc mode if we have it */
        priv->prefer_port3 = priv->has_port3 && (! priv->has_ibss);
        set_port_type(priv);
-       priv->channel = 10; /* default channel, more-or-less arbitrary */
+       priv->channel = 0; /* use firmware default */
  
        priv->promiscuous = 0;
        priv->wep_on = 0;
        priv->tx_key = 0;
  
-       err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
-       if (err == -EIO) {
-               /* Try workaround for old Symbol firmware bug */
-               printk(KERN_WARNING "%s: firmware ALLOC bug detected "
-                      "(old Symbol firmware?). Trying to work around... ",
-                      dev->name);
-               
-               priv->nicbuf_size = TX_NICBUF_SIZE_BUG;
-               err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
-               if (err)
-                       printk("failed!\n");
-               else
-                       printk("ok.\n");
-       }
-       if (err) {
-               printk("%s: Error %d allocating Tx buffer\n", dev->name, err);
-               goto out;
-       }
        /* Make the hardware available, as long as it hasn't been
         * removed elsewhere (e.g. by PCMCIA hot unplug) */
        spin_lock_irq(&priv->lock);
@@@ -2451,7 -2445,7 +2446,7 @@@ struct net_device *alloc_orinocodev(in
        priv = netdev_priv(dev);
        priv->ndev = dev;
        if (sizeof_card)
-               priv->card = (void *)((unsigned long)netdev_priv(dev)
+               priv->card = (void *)((unsigned long)priv
                                      + sizeof(struct orinoco_private));
        else
                priv->card = NULL;
@@@ -2556,6 -2550,7 +2551,7 @@@ static int orinoco_hw_get_essid(struct 
        }
  
        len = le16_to_cpu(essidbuf.len);
+       BUG_ON(len > IW_ESSID_MAX_SIZE);
  
        memset(buf, 0, IW_ESSID_MAX_SIZE+1);
        memcpy(buf, p, len);
@@@ -2924,13 -2919,14 +2920,14 @@@ static int orinoco_ioctl_setessid(struc
        memset(&essidbuf, 0, sizeof(essidbuf));
  
        if (erq->flags) {
-               if (erq->length > IW_ESSID_MAX_SIZE)
+               /* iwconfig includes the NUL in the specified length */
+               if (erq->length > IW_ESSID_MAX_SIZE+1)
                        return -E2BIG;
                
                if (copy_from_user(&essidbuf, erq->pointer, erq->length))
                        return -EFAULT;
  
-               essidbuf[erq->length] = '\0';
+               essidbuf[IW_ESSID_MAX_SIZE] = '\0';
        }
  
        if (orinoco_lock(priv, &flags) != 0)
@@@ -3856,7 -3852,6 +3853,6 @@@ orinoco_ioctl(struct net_device *dev, s
                                { SIOCIWFIRSTPRIV + 0x7, 0,
                                  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
                                  "get_ibssport" },
-                               { SIOCIWLASTPRIV, 0, 0, "dump_recs" },
                        };
  
                        wrq->u.data.length = sizeof(privtab) / sizeof(privtab[0]);
                err = orinoco_ioctl_getibssport(dev, wrq);
                break;
  
-       case SIOCIWLASTPRIV:
-               err = orinoco_debug_dump_recs(dev);
-               if (err)
-                       printk(KERN_ERR "%s: Unable to dump records (%d)\n",
-                              dev->name, err);
-               break;
        default:
                err = -EOPNOTSUPP;
        }
        return err;
  }
  
- struct {
-       u16 rid;
-       char *name;
-       int displaytype;
- #define DISPLAY_WORDS 0
- #define DISPLAY_BYTES 1
- #define DISPLAY_STRING        2
- #define DISPLAY_XSTRING       3
- } record_table[] = {
- #define DEBUG_REC(name,type) { HERMES_RID_##name, #name, DISPLAY_##type }
-       DEBUG_REC(CNFPORTTYPE,WORDS),
-       DEBUG_REC(CNFOWNMACADDR,BYTES),
-       DEBUG_REC(CNFDESIREDSSID,STRING),
-       DEBUG_REC(CNFOWNCHANNEL,WORDS),
-       DEBUG_REC(CNFOWNSSID,STRING),
-       DEBUG_REC(CNFOWNATIMWINDOW,WORDS),
-       DEBUG_REC(CNFSYSTEMSCALE,WORDS),
-       DEBUG_REC(CNFMAXDATALEN,WORDS),
-       DEBUG_REC(CNFPMENABLED,WORDS),
-       DEBUG_REC(CNFPMEPS,WORDS),
-       DEBUG_REC(CNFMULTICASTRECEIVE,WORDS),
-       DEBUG_REC(CNFMAXSLEEPDURATION,WORDS),
-       DEBUG_REC(CNFPMHOLDOVERDURATION,WORDS),
-       DEBUG_REC(CNFOWNNAME,STRING),
-       DEBUG_REC(CNFOWNDTIMPERIOD,WORDS),
-       DEBUG_REC(CNFMULTICASTPMBUFFERING,WORDS),
-       DEBUG_REC(CNFWEPENABLED_AGERE,WORDS),
-       DEBUG_REC(CNFMANDATORYBSSID_SYMBOL,WORDS),
-       DEBUG_REC(CNFWEPDEFAULTKEYID,WORDS),
-       DEBUG_REC(CNFDEFAULTKEY0,BYTES),
-       DEBUG_REC(CNFDEFAULTKEY1,BYTES),
-       DEBUG_REC(CNFMWOROBUST_AGERE,WORDS),
-       DEBUG_REC(CNFDEFAULTKEY2,BYTES),
-       DEBUG_REC(CNFDEFAULTKEY3,BYTES),
-       DEBUG_REC(CNFWEPFLAGS_INTERSIL,WORDS),
-       DEBUG_REC(CNFWEPKEYMAPPINGTABLE,WORDS),
-       DEBUG_REC(CNFAUTHENTICATION,WORDS),
-       DEBUG_REC(CNFMAXASSOCSTA,WORDS),
-       DEBUG_REC(CNFKEYLENGTH_SYMBOL,WORDS),
-       DEBUG_REC(CNFTXCONTROL,WORDS),
-       DEBUG_REC(CNFROAMINGMODE,WORDS),
-       DEBUG_REC(CNFHOSTAUTHENTICATION,WORDS),
-       DEBUG_REC(CNFRCVCRCERROR,WORDS),
-       DEBUG_REC(CNFMMLIFE,WORDS),
-       DEBUG_REC(CNFALTRETRYCOUNT,WORDS),
-       DEBUG_REC(CNFBEACONINT,WORDS),
-       DEBUG_REC(CNFAPPCFINFO,WORDS),
-       DEBUG_REC(CNFSTAPCFINFO,WORDS),
-       DEBUG_REC(CNFPRIORITYQUSAGE,WORDS),
-       DEBUG_REC(CNFTIMCTRL,WORDS),
-       DEBUG_REC(CNFTHIRTY2TALLY,WORDS),
-       DEBUG_REC(CNFENHSECURITY,WORDS),
-       DEBUG_REC(CNFGROUPADDRESSES,BYTES),
-       DEBUG_REC(CNFCREATEIBSS,WORDS),
-       DEBUG_REC(CNFFRAGMENTATIONTHRESHOLD,WORDS),
-       DEBUG_REC(CNFRTSTHRESHOLD,WORDS),
-       DEBUG_REC(CNFTXRATECONTROL,WORDS),
-       DEBUG_REC(CNFPROMISCUOUSMODE,WORDS),
-       DEBUG_REC(CNFBASICRATES_SYMBOL,WORDS),
-       DEBUG_REC(CNFPREAMBLE_SYMBOL,WORDS),
-       DEBUG_REC(CNFSHORTPREAMBLE,WORDS),
-       DEBUG_REC(CNFWEPKEYS_AGERE,BYTES),
-       DEBUG_REC(CNFEXCLUDELONGPREAMBLE,WORDS),
-       DEBUG_REC(CNFTXKEY_AGERE,WORDS),
-       DEBUG_REC(CNFAUTHENTICATIONRSPTO,WORDS),
-       DEBUG_REC(CNFBASICRATES,WORDS),
-       DEBUG_REC(CNFSUPPORTEDRATES,WORDS),
-       DEBUG_REC(CNFTICKTIME,WORDS),
-       DEBUG_REC(CNFSCANREQUEST,WORDS),
-       DEBUG_REC(CNFJOINREQUEST,WORDS),
-       DEBUG_REC(CNFAUTHENTICATESTATION,WORDS),
-       DEBUG_REC(CNFCHANNELINFOREQUEST,WORDS),
-       DEBUG_REC(MAXLOADTIME,WORDS),
-       DEBUG_REC(DOWNLOADBUFFER,WORDS),
-       DEBUG_REC(PRIID,WORDS),
-       DEBUG_REC(PRISUPRANGE,WORDS),
-       DEBUG_REC(CFIACTRANGES,WORDS),
-       DEBUG_REC(NICSERNUM,XSTRING),
-       DEBUG_REC(NICID,WORDS),
-       DEBUG_REC(MFISUPRANGE,WORDS),
-       DEBUG_REC(CFISUPRANGE,WORDS),
-       DEBUG_REC(CHANNELLIST,WORDS),
-       DEBUG_REC(REGULATORYDOMAINS,WORDS),
-       DEBUG_REC(TEMPTYPE,WORDS),
- /*    DEBUG_REC(CIS,BYTES), */
-       DEBUG_REC(STAID,WORDS),
-       DEBUG_REC(CURRENTSSID,STRING),
-       DEBUG_REC(CURRENTBSSID,BYTES),
-       DEBUG_REC(COMMSQUALITY,WORDS),
-       DEBUG_REC(CURRENTTXRATE,WORDS),
-       DEBUG_REC(CURRENTBEACONINTERVAL,WORDS),
-       DEBUG_REC(CURRENTSCALETHRESHOLDS,WORDS),
-       DEBUG_REC(PROTOCOLRSPTIME,WORDS),
-       DEBUG_REC(SHORTRETRYLIMIT,WORDS),
-       DEBUG_REC(LONGRETRYLIMIT,WORDS),
-       DEBUG_REC(MAXTRANSMITLIFETIME,WORDS),
-       DEBUG_REC(MAXRECEIVELIFETIME,WORDS),
-       DEBUG_REC(CFPOLLABLE,WORDS),
-       DEBUG_REC(AUTHENTICATIONALGORITHMS,WORDS),
-       DEBUG_REC(PRIVACYOPTIONIMPLEMENTED,WORDS),
-       DEBUG_REC(OWNMACADDR,BYTES),
-       DEBUG_REC(SCANRESULTSTABLE,WORDS),
-       DEBUG_REC(PHYTYPE,WORDS),
-       DEBUG_REC(CURRENTCHANNEL,WORDS),
-       DEBUG_REC(CURRENTPOWERSTATE,WORDS),
-       DEBUG_REC(CCAMODE,WORDS),
-       DEBUG_REC(SUPPORTEDDATARATES,WORDS),
-       DEBUG_REC(BUILDSEQ,BYTES),
-       DEBUG_REC(FWID,XSTRING)
- #undef DEBUG_REC
- };
- #define DEBUG_LTV_SIZE                128
- static int orinoco_debug_dump_recs(struct net_device *dev)
- {
-       struct orinoco_private *priv = netdev_priv(dev);
-       hermes_t *hw = &priv->hw;
-       u8 *val8;
-       u16 *val16;
-       int i,j;
-       u16 length;
-       int err;
-       /* I'm not sure: we might have a lock here, so we'd better go
-            atomic, just in case. */
-       val8 = kmalloc(DEBUG_LTV_SIZE + 2, GFP_ATOMIC);
-       if (! val8)
-               return -ENOMEM;
-       val16 = (u16 *)val8;
-       for (i = 0; i < ARRAY_SIZE(record_table); i++) {
-               u16 rid = record_table[i].rid;
-               int len;
-               memset(val8, 0, DEBUG_LTV_SIZE + 2);
-               err = hermes_read_ltv(hw, USER_BAP, rid, DEBUG_LTV_SIZE,
-                                     &length, val8);
-               if (err) {
-                       DEBUG(0, "Error %d reading RID 0x%04x\n", err, rid);
-                       continue;
-               }
-               val16 = (u16 *)val8;
-               if (length == 0)
-                       continue;
-               printk(KERN_DEBUG "%-15s (0x%04x): length=%d (%d bytes)\tvalue=",
-                      record_table[i].name,
-                      rid, length, (length-1)*2);
-               len = min(((int)length-1)*2, DEBUG_LTV_SIZE);
-               switch (record_table[i].displaytype) {
-               case DISPLAY_WORDS:
-                       for (j = 0; j < len / 2; j++)
-                               printk("%04X-", le16_to_cpu(val16[j]));
-                       break;
-               case DISPLAY_BYTES:
-               default:
-                       for (j = 0; j < len; j++)
-                               printk("%02X:", val8[j]);
-                       break;
-               case DISPLAY_STRING:
-                       len = min(len, le16_to_cpu(val16[0])+2);
-                       val8[len] = '\0';
-                       printk("\"%s\"", (char *)&val16[1]);
-                       break;
-               case DISPLAY_XSTRING:
-                       printk("'%s'", (char *)val8);
-               }
-               printk("\n");
-       }
-       kfree(val8);
-       return 0;
- }
  
  /********************************************************************/
  /* Debugging                                                        */
@@@ -4219,7 -4025,6 +4026,6 @@@ EXPORT_SYMBOL(free_orinocodev)
  
  EXPORT_SYMBOL(__orinoco_up);
  EXPORT_SYMBOL(__orinoco_down);
- EXPORT_SYMBOL(orinoco_stop);
  EXPORT_SYMBOL(orinoco_reinit_firmware);
  
  EXPORT_SYMBOL(orinoco_interrupt);