summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:10:26 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:10:26 -0800
commitbb5b6e6c4dea4242f6ff75fa7adecea4f34935f1 (patch)
treedbdda6fdd7f0bfadb4c10a997bfb15660f3223c0 /drivers/net/wireless
parent0b9ded43ee424791d9283cee2a33dcb4a97da57d (diff)
v2.4.8.4 -> v2.4.9
- David Miller: sparc updates, FAT fs fixes, btaudio build fix - David Gibson: Orinoco driver update - Kevin Fleming: more disks the HPT controller doesn't like - David Miller: "min()/max()" cleanups. Understands signs and sizes. - Ben LaHaise: make vma merging more generous, help Mozilla /proc/<>/maps - Jens Axboe: CD updates - Trond Myklebust: save away NFS credentials in inode, so that mmap can writeout. - Mark Hemment: HIGHMEM ops cleanups - Jes Sorensen: use "unsigned long" for flags in various drivers
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo.c10
-rw-r--r--drivers/net/wireless/airport.c12
-rw-r--r--drivers/net/wireless/hermes.c34
-rw-r--r--drivers/net/wireless/hermes.h2
-rw-r--r--drivers/net/wireless/orinoco.c182
-rw-r--r--drivers/net/wireless/orinoco.h4
-rw-r--r--drivers/net/wireless/orinoco_cs.c41
7 files changed, 195 insertions, 90 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ff2ac1ccd2d6..78b666462b01 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -259,8 +259,6 @@ MODULE_PARM_DESC(proc_perm, "The permission bits of the files in /proc");
#include <asm/uaccess.h>
-#define min(x,y) ((x<y)?x:y)
-
/* This is a kind of sloppy hack to get this information to OUT4500 and
IN4500. I would be extremely interested in the situation where this
doesnt work though!!! */
@@ -1755,7 +1753,7 @@ static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len)
// read the rid length field
bap_read(ai, pBuf, 2, BAP1);
// length for remaining part of rid
- len = min(len, le16_to_cpu(*(u16*)pBuf)) - 2;
+ len = min(unsigned int, len, le16_to_cpu(*(u16*)pBuf)) - 2;
if ( len <= 2 ) {
printk( KERN_ERR
@@ -3998,7 +3996,8 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {
* 9/22/2000 Honor user given length
*/
- if (copy_to_user(comp->data, iobuf, min (comp->len, sizeof(iobuf))))
+ if (copy_to_user(comp->data, iobuf,
+ min(unsigned int, comp->len, sizeof(iobuf))))
return -EFAULT;
return 0;
}
@@ -4057,7 +4056,8 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
PC4500_readrid(dev->priv,ridcode,iobuf,sizeof(iobuf));
- if (copy_to_user(comp->data,iobuf,min(comp->len,sizeof(iobuf))))
+ if (copy_to_user(comp->data, iobuf,
+ min(unsigned int, comp->len, sizeof(iobuf))))
return -EFAULT;
return 0;
diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c
index daa24801b818..3cd86b130d4a 100644
--- a/drivers/net/wireless/airport.c
+++ b/drivers/net/wireless/airport.c
@@ -1,4 +1,4 @@
-/* airport.c 0.05
+/* airport.c 0.06f
*
* A driver for "Hermes" chipset based Apple Airport wireless
* card.
@@ -32,6 +32,10 @@
#include "hermes.h"
#include "orinoco.h"
+static const char version[] __initdata = "airport.c 0.06f (Benjamin Herrenschmidt <benh@kernel.crashing.org>)";
+MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
+MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
+
typedef struct dldwd_card {
struct device_node* node;
int irq_requested;
@@ -40,8 +44,6 @@ typedef struct dldwd_card {
struct dldwd_priv priv;
} dldwd_card_t;
-static char *version = "airport.c 0.05 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)";
-
/*
* Function prototypes
*/
@@ -186,7 +188,7 @@ airport_attach(struct device_node* of_node)
printk(KERN_ERR "airport: register_netdev() failed\n");
goto failed;
}
- printk(KERN_INFO "airport: card registered for interface %s\n", ndev->name);
+ printk(KERN_DEBUG "airport: card registered for interface %s\n", ndev->name);
card->ndev_registered = 1;
SET_MODULE_OWNER(ndev);
@@ -242,7 +244,7 @@ init_airport(void)
{
struct device_node* airport_node;
- printk(KERN_INFO "%s\n", version);
+ printk(KERN_DEBUG "%s\n", version);
MOD_INC_USE_COUNT;
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c
index 923850119e41..c6a684b7a579 100644
--- a/drivers/net/wireless/hermes.c
+++ b/drivers/net/wireless/hermes.c
@@ -3,21 +3,19 @@
* Driver core for the "Hermes" wireless MAC controller, as used in
* the Lucent Orinoco and Cabletron RoamAbout cards. It should also
* work on the hfa3841 and hfa3842 MAC controller chips used in the
- * Prism I & II chipsets.
+ * Prism II chipsets.
*
* This is not a complete driver, just low-level access routines for
* the MAC controller itself.
*
* Based on the prism2 driver from Absolute Value Systems' linux-wlan
* project, the Linux wvlan_cs driver, Lucent's HCF-Light
- * (wvlan_hcf.c) library, and the NetBSD wireless driver.
+ * (wvlan_hcf.c) library, and the NetBSD wireless driver (in no
+ * particular order).
*
* Copyright (C) 2000, David Gibson, Linuxcare Australia <hermes@gibson.dropbear.id.au>
*
- * This file distributed under the GPL, version 2.
- */
-
-static const char *version = "hermes.c: 12 Dec 2000 David Gibson <hermes@gibson.dropbear.id.au>";
+ * This file distributed under the GPL, version 2. */
#include <linux/module.h>
#include <linux/types.h>
@@ -32,6 +30,10 @@ static const char *version = "hermes.c: 12 Dec 2000 David Gibson <hermes@gibson.
#include "hermes.h"
+static const char version[] __initdata = "hermes.c: 1 Aug 2001 David Gibson <hermes@gibson.dropbear.id.au>";
+MODULE_DESCRIPTION("Low-level driver helper for Lucent Hermes chipset and Prism II HFA384x wireless MAC controller");
+MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
+
/* These are maximum timeouts. Most often, card wil react much faster */
#define CMD_BUSY_TIMEOUT (100) /* In iterations of ~1us */
#define CMD_INIT_TIMEOUT (50000) /* in iterations of ~10us */
@@ -70,10 +72,6 @@ static const char *version = "hermes.c: 12 Dec 2000 David Gibson <hermes@gibson.
static int hermes_issue_cmd(hermes_t *hw, uint16_t cmd, uint16_t param0);
/*
- * Internal inline functions
- */
-
-/*
* Internal functions
*/
@@ -87,7 +85,6 @@ static int hermes_issue_cmd(hermes_t *hw, uint16_t cmd, uint16_t param0);
static int hermes_issue_cmd(hermes_t *hw, uint16_t cmd, uint16_t param0)
{
uint16_t reg;
-/* unsigned long k = CMD_BUSY_TIMEOUT; */
/* First check that the command register is not busy */
reg = hermes_read_regn(hw, CMD);
@@ -124,9 +121,12 @@ int hermes_reset(hermes_t *hw)
hermes_write_regn(hw, INTEN, 0);
hermes_write_regn(hw, EVACK, 0xffff);
- /* Because we hope we can reset the card even if it gets into
- a stupid state, we actually wait to see if the command
- register will unbusy itself */
+ /* Normally it's a "can't happen" for the command register to
+ be busy when we go to issue a command because we are
+ serializing all commands. However we want to have some
+ chance of resetting the card even if it gets into a stupid
+ state, so we actually wait to see if the command register
+ will unbusy itself here. */
k = CMD_BUSY_TIMEOUT;
reg = hermes_read_regn(hw, CMD);
while (k && (reg & HERMES_CMD_BUSY)) {
@@ -139,8 +139,8 @@ int hermes_reset(hermes_t *hw)
reg = hermes_read_regn(hw, CMD);
}
- /* No need to explicitly handle the timeout - hermes_issue_cmd() will
- probably return -EBUSY */
+ /* No need to explicitly handle the timeout - if we've timed
+ out hermes_issue_cmd() will probably return -EBUSY below */
/* According to the documentation, EVSTAT may contain
obsolete event occurrence information. We have to acknowledge
@@ -503,7 +503,7 @@ EXPORT_SYMBOL(hermes_write_ltv);
static int __init init_hermes(void)
{
- printk(KERN_INFO "%s\n", version);
+ printk(KERN_DEBUG "%s\n", version);
return 0;
}
diff --git a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h
index 10c841316743..bc74036f247c 100644
--- a/drivers/net/wireless/hermes.h
+++ b/drivers/net/wireless/hermes.h
@@ -101,7 +101,7 @@
#define HERMES_STATUS_CMDCODE (0x003f)
/*
- * OFFSET refister bitmasks
+ * OFFSET register bitmasks
*/
#define HERMES_OFFSET_BUSY (0x8000)
#define HERMES_OFFSET_ERR (0x4000)
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 76a913335ba9..2560a38c884d 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -1,4 +1,4 @@
-/* orinoco.c 0.06 - (formerly known as dldwd_cs.c and orinoco_cs.c)
+/* orinoco.c 0.06f - (formerly known as dldwd_cs.c and orinoco_cs.c)
*
* A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
* as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
@@ -33,10 +33,10 @@
* Reserved.
*
* Alternatively, the contents of this file may be used under the
- * terms of the GNU Public License version 2 (the "GPL"), in which
- * case the provisions of the GPL are applicable instead of the above.
- * If you wish to allow the use of your version of this file only
- * under the terms of the GPL and not to allow others to use your
+ * terms of the GNU General Public License version 2 (the "GPL"), in
+ * which case the provisions of the GPL are applicable instead of the
+ * above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice and
* other provisions required by the GPL. If you do not delete the
@@ -166,6 +166,24 @@
* v0.06b -> v0.06c - 29/5/2001 - Jean II
* o Show first spy address in /proc/net/wireless for IBSS mode as well
*
+ * v0.06c -> v0.06d - 6/7/2001 - David Gibson
+ * o Change a bunch of KERN_INFO messages to KERN_DEBUG, as per Linus'
+ * wishes to reduce the number of unecessary messages.
+ * o Removed bogus message on CRC error.
+ * o Merged fixeds for v0.08 Prism 2 firmware from William Waghorn
+ * <willwaghorn@yahoo.co.uk>
+ * o Slight cleanup/re-arrangement of firmware detection code.
+ *
+ * v0.06d -> v0.06e - 1/8/2001 - David Gibson
+ * o Removed some redundant global initializers (orinoco_cs.c).
+ * o Added some module metadataa
+ *
+ * v0.06e -> v0.06f - 14/8/2001 - David Gibson
+ * o Wording fix to license
+ * o Added a 'use_alternate_encaps' module parameter for APs which need an oui of
+ * 00:00:00. We really need a better way of handling this, but the module flag
+ * is better than nothing for now.
+ *
* TODO - Jean II
* o inline functions (lot's of candidate, need to reorder code)
* o Test PrismII/Symbol cards & firmware versions
@@ -202,7 +220,9 @@
#include "hermes.h"
#include "orinoco.h"
-static char *version = "orinoco.c 0.06c (David Gibson <hermes@gibson.dropbear.id.au> and others)";
+static const char version[] __initdata = "orinoco.c 0.06f (David Gibson <hermes@gibson.dropbear.id.au> and others)";
+MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
+MODULE_DESCRIPTION("Driver for Lucent Orinoco, Prism II based and similar wireless cards");
/* Level of debugging. Used in the macros in orinoco.h */
#ifdef ORINOCO_DEBUG
@@ -210,6 +230,11 @@ int dldwd_debug = ORINOCO_DEBUG;
MODULE_PARM(dldwd_debug, "i");
#endif
+/* FIXME: We need a better way of handling this */
+/* Set this flag to use 00:00:00 for the encapsulation oui instead of 00:00:F8 */
+static int use_alternate_encaps; /* =0 */
+MODULE_PARM(use_alternate_encaps, "i");
+
const long channel_frequency[] = {
2412, 2417, 2422, 2427, 2432, 2437, 2442,
2447, 2452, 2457, 2462, 2467, 2472, 2484
@@ -274,6 +299,9 @@ struct dldwd_frame_hdr {
struct p8022_hdr encaps_hdr = {
0xaa, 0xaa, 0x03, {0x00, 0x00, 0xf8}
};
+struct p8022_hdr alternate_encaps_hdr = {
+ 0xaa, 0xaa, 0x03, {0x00, 0x00, 0x00}
+};
/*
* Function prototypes
@@ -396,6 +424,7 @@ set_port_type(dldwd_priv_t *priv)
priv->port_type = 4;
else
priv->port_type = 1;
+ priv->port_type = priv->ibss_port;
priv->allow_ibss = 1;
}
break;
@@ -1050,8 +1079,7 @@ static void __dldwd_ev_rx(dldwd_priv_t *priv, hermes_t *hw)
if (status & HERMES_RXSTAT_ERR) {
if ((status & HERMES_RXSTAT_ERR) == HERMES_RXSTAT_BADCRC) {
stats->rx_crc_errors++;
- printk(KERN_WARNING "%s: Bad CRC on Rx. Frame dropped.\n",
- dev->name);
+ DEBUG(1, "%s: Bad CRC on Rx. Frame dropped.\n", dev->name);
show_rx_frame(&hdr);
} else if ((status & HERMES_RXSTAT_ERR)
== HERMES_RXSTAT_UNDECRYPTABLE) {
@@ -1198,34 +1226,14 @@ static void __dldwd_ev_alloc(dldwd_priv_t *priv, hermes_t *hw)
/* hermes_write_regn(hw, ALLOCFID, 0); */
}
-/*
- * struct net_device methods
- */
-
-int
-dldwd_init(struct net_device *dev)
+static void determine_firmware(struct net_device *dev)
{
dldwd_priv_t *priv = dev->priv;
hermes_t *hw = &priv->hw;
- int err = 0;
- hermes_id_t nickbuf;
- uint16_t reclen;
- int len;
- char *vendor_str;
+ int err;
uint32_t firmver;
+ char *vendor_str;
- TRACE_ENTER("dldwd");
-
- dldwd_lock(priv);
-
- /* Do standard firmware reset */
- err = hermes_reset(hw);
- if (err != 0) {
- printk(KERN_ERR "%s: failed to reset hardware (err = %d)\n",
- dev->name, err);
- goto out;
- }
-
/* Get the firmware version */
err = hermes_read_staidentity(hw, USER_BAP, &priv->firmware_info);
if (err) {
@@ -1361,18 +1369,54 @@ dldwd_init(struct net_device *dev)
priv->has_pm = 0;
priv->has_preamble = 0;
}
+
+ if (priv->firmware_type == FIRMWARE_TYPE_SYMBOL)
+ priv->ibss_port = 4;
+ else if ( (priv->firmware_type == FIRMWARE_TYPE_PRISM2) && (firmver >= 0x00008) )
+ priv->ibss_port = 0;
+ else
+ priv->ibss_port = 1;
- printk(KERN_INFO "%s: Firmware ID %02X vendor 0x%x (%s) version %d.%02d\n",
+ printk(KERN_DEBUG "%s: Firmware ID %02X vendor 0x%x (%s) version %d.%02d\n",
dev->name, priv->firmware_info.id, priv->firmware_info.vendor,
vendor_str, priv->firmware_info.major, priv->firmware_info.minor);
+}
+
+/*
+ * struct net_device methods
+ */
+
+int
+dldwd_init(struct net_device *dev)
+{
+ dldwd_priv_t *priv = dev->priv;
+ hermes_t *hw = &priv->hw;
+ int err = 0;
+ hermes_id_t nickbuf;
+ uint16_t reclen;
+ int len;
+
+ TRACE_ENTER("dldwd");
+
+ dldwd_lock(priv);
+
+ /* Do standard firmware reset */
+ err = hermes_reset(hw);
+ if (err != 0) {
+ printk(KERN_ERR "%s: failed to reset hardware (err = %d)\n",
+ dev->name, err);
+ goto out;
+ }
+
+ determine_firmware(dev);
if (priv->has_port3)
- printk(KERN_INFO "%s: Ad-hoc demo mode supported.\n", dev->name);
+ printk(KERN_DEBUG "%s: Ad-hoc demo mode supported.\n", dev->name);
if (priv->has_ibss)
- printk(KERN_INFO "%s: IEEE standard IBSS ad-hoc mode supported.\n",
+ printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported.\n",
dev->name);
if (priv->has_wep) {
- printk(KERN_INFO "%s: WEP supported, ", dev->name);
+ printk(KERN_DEBUG "%s: WEP supported, ", dev->name);
if (priv->has_big_wep)
printk("\"128\"-bit key.\n");
else
@@ -1388,7 +1432,7 @@ dldwd_init(struct net_device *dev)
goto out;
}
- printk(KERN_INFO "%s: MAC address %02X:%02X:%02X:%02X:%02X:%02X\n",
+ printk(KERN_DEBUG "%s: MAC address %02X:%02X:%02X:%02X:%02X:%02X\n",
dev->name, dev->dev_addr[0], dev->dev_addr[1],
dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4],
dev->dev_addr[5]);
@@ -1408,7 +1452,7 @@ dldwd_init(struct net_device *dev)
memcpy(priv->nick, &nickbuf.val, len);
priv->nick[len] = '\0';
- printk(KERN_INFO "%s: Station name \"%s\"\n", dev->name, priv->nick);
+ printk(KERN_DEBUG "%s: Station name \"%s\"\n", dev->name, priv->nick);
/* Get allowed channels */
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CHANNEL_LIST, &priv->channel_mask);
@@ -1482,7 +1526,7 @@ dldwd_init(struct net_device *dev)
priv->wep_on = 0;
priv->tx_key = 0;
- printk(KERN_INFO "%s: ready\n", dev->name);
+ printk(KERN_DEBUG "%s: ready\n", dev->name);
out:
dldwd_unlock(priv);
@@ -1668,7 +1712,11 @@ dldwd_xmit(struct sk_buff *skb, struct net_device *dev)
hdr.p8023.h_proto = htons(data_len + ENCAPS_OVERHEAD);
/* 802.2 header */
- memcpy(&hdr.p8022, &encaps_hdr, sizeof(encaps_hdr));
+ /* FIXME: ugh, what a hack for the 00:00:00 APs. Need to find a better way */
+ if (use_alternate_encaps)
+ memcpy(&hdr.p8022, &alternate_encaps_hdr, sizeof(alternate_encaps_hdr));
+ else
+ memcpy(&hdr.p8022, &encaps_hdr, sizeof(encaps_hdr));
hdr.ethertype = eh->h_proto;
err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr),
@@ -2546,6 +2594,33 @@ static int dldwd_ioctl_getretry(struct net_device *dev, struct iw_param *rrq)
}
#endif /* WIRELESS_EXT > 10 */
+static int dldwd_ioctl_setibssport(struct net_device *dev, struct iwreq *wrq)
+{
+ dldwd_priv_t *priv = dev->priv;
+ int val = *( (int *) wrq->u.name );
+
+ dldwd_lock(priv);
+ priv->ibss_port = val ;
+
+ /* Actually update the mode we are using */
+ set_port_type(priv);
+
+ dldwd_unlock(priv);
+ return 0;
+}
+
+static int dldwd_ioctl_getibssport(struct net_device *dev, struct iwreq *wrq)
+{
+ dldwd_priv_t *priv = dev->priv;
+ int *val = (int *)wrq->u.name;
+
+ dldwd_lock(priv);
+ *val = priv->ibss_port;
+ dldwd_unlock(priv);
+
+ return 0;
+}
+
static int dldwd_ioctl_setport3(struct net_device *dev, struct iwreq *wrq)
{
dldwd_priv_t *priv = dev->priv;
@@ -2941,7 +3016,13 @@ dldwd_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
0, "set_preamble" },
{ SIOCDEVPRIVATE + 0x5, 0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_preamble" }
+ "get_preamble" },
+ { SIOCDEVPRIVATE + 0x6,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0, "set_ibssport" },
+ { SIOCDEVPRIVATE + 0x7, 0,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ "get_ibssport" }
};
err = verify_area(VERIFY_WRITE, wrq->u.data.pointer, sizeof(privtab));
@@ -3038,6 +3119,25 @@ dldwd_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
} else
err = -EOPNOTSUPP;
break;
+ case SIOCDEVPRIVATE + 0x6: /* set_ibssport */
+ DEBUG(1, "%s: SIOCDEVPRIVATE + 0x6 (set_ibssport)\n",
+ dev->name);
+ if (! capable(CAP_NET_ADMIN)) {
+ err = -EPERM;
+ break;
+ }
+
+ err = dldwd_ioctl_setibssport(dev, wrq);
+ if (! err)
+ changed = 1;
+ break;
+
+ case SIOCDEVPRIVATE + 0x7: /* get_ibssport */
+ DEBUG(1, "%s: SIOCDEVPRIVATE + 0x7 (get_ibssport)\n",
+ dev->name);
+ err = dldwd_ioctl_getibssport(dev, wrq);
+ break;
+
default:
err = -EOPNOTSUPP;
@@ -3601,7 +3701,7 @@ static int __init init_dldwd(void)
err = dldwd_proc_init();
- printk(KERN_INFO "%s\n", version);
+ printk(KERN_DEBUG "%s\n", version);
return 0;
}
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
index b90d323d2fa1..db2b6638cc4a 100644
--- a/drivers/net/wireless/orinoco.h
+++ b/drivers/net/wireless/orinoco.h
@@ -69,7 +69,7 @@ typedef struct dldwd_priv {
#define FIRMWARE_TYPE_LUCENT 1
#define FIRMWARE_TYPE_PRISM2 2
#define FIRMWARE_TYPE_SYMBOL 3
- int has_ibss, has_port3, prefer_port3, has_ibss_any;
+ int has_ibss, has_port3, prefer_port3, has_ibss_any, ibss_port;
int has_wep, has_big_wep;
int has_mwo;
int has_pm;
@@ -107,10 +107,10 @@ typedef struct dldwd_priv {
/*====================================================================*/
-extern int dldwd_debug;
extern struct list_head dldwd_instances;
#ifdef ORINOCO_DEBUG
+extern int dldwd_debug;
#define DEBUG(n, args...) if (dldwd_debug>(n)) printk(KERN_DEBUG args)
#define DEBUGMORE(n, args...) do { if (dldwd_debug>(n)) printk(args); } while (0)
#else
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 8bf94dc46acd..2a26a07c4c1c 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -1,4 +1,4 @@
-/* orinoco_cs.c 0.06 - (formerly known as dldwd_cs.c)
+/* orinoco_cs.c 0.06f - (formerly known as dldwd_cs.c)
*
* A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
* as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
@@ -40,20 +40,12 @@
#include "hermes.h"
#include "orinoco.h"
-/* Pcmcia specific structure */
-typedef struct dldwd_card {
- dev_link_t link;
- dev_node_t node;
- int instance;
-
- /* Common structure (fully included), see orinoco.h */
- struct dldwd_priv priv;
-} dldwd_card_t;
+/*====================================================================*/
-static char version[] __initdata =
-"orinoco_cs.c 0.06 (David Gibson <hermes@gibson.dropbear.id.au> and others)";
+static const char version[] __initdata = "orinoco_cs.c 0.06f (David Gibson <hermes@gibson.dropbear.id.au> and others)";
-/*====================================================================*/
+MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
+MODULE_DESCRIPTION("Driver for PCMCIA Lucent Orinoco, Prism II based and similar wireless cards");
/* Parameters that can be set with 'insmod' */
@@ -66,13 +58,24 @@ static int irq_list[4] = { -1 };
static int reset_cor = 0;
/* Some D-Link cards have buggy CIS. They do work at 5v properly, but
* don't have any CIS entry for it. This workaround it... */
-static int ignore_cis_vcc = 0;
+static int ignore_cis_vcc; /* = 0 */
MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
MODULE_PARM(reset_cor, "i");
MODULE_PARM(ignore_cis_vcc, "i");
+
+/* Pcmcia specific structure */
+typedef struct dldwd_card {
+ dev_link_t link;
+ dev_node_t node;
+ int instance;
+
+ /* Common structure (fully included), see orinoco.h */
+ struct dldwd_priv priv;
+} dldwd_card_t;
+
/*
* Function prototypes
*/
@@ -108,8 +111,8 @@ static dev_info_t dev_info = "orinoco_cs";
device numbers are used to derive the corresponding array index.
*/
-static dev_link_t *dev_list;
-static int num_instances;
+static dev_link_t *dev_list; /* = NULL */
+static int num_instances; /* = 0 */
/*====================================================================*/
@@ -595,7 +598,7 @@ dldwd_cs_config(dev_link_t * link)
strcpy(card->node.dev_name, ndev->name);
/* Finally, report what we've done */
- printk(KERN_INFO "%s: index 0x%02x: Vcc %d.%d",
+ printk(KERN_DEBUG "%s: index 0x%02x: Vcc %d.%d",
ndev->name, link->conf.ConfigIndex,
link->conf.Vcc / 10, link->conf.Vcc % 10);
if (link->conf.Vpp1)
@@ -777,8 +780,8 @@ init_dldwd_cs(void)
TRACE_ENTER("dldwd");
- printk(KERN_INFO "dldwd: David's Less Dodgy WaveLAN/IEEE Driver\n"
- KERN_INFO "%s\n", version);
+ printk(KERN_DEBUG "dldwd: David's Less Dodgy WaveLAN/IEEE Driver\n"
+ KERN_DEBUG "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {