summaryrefslogtreecommitdiffstats
path: root/drivers/net/wavelan.p.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wavelan.p.h')
-rw-r--r--drivers/net/wavelan.p.h59
1 files changed, 48 insertions, 11 deletions
diff --git a/drivers/net/wavelan.p.h b/drivers/net/wavelan.p.h
index e4b722cf1..3e20776fb 100644
--- a/drivers/net/wavelan.p.h
+++ b/drivers/net/wavelan.p.h
@@ -34,6 +34,25 @@
* I try to maintain a web page with the Wireless LAN Howto at :
* http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
*
+ * SMP
+ * ---
+ * We now *should* be SMP compliant.
+ * I don't have a SMP box to verify that (my Pentium 90 is not), so
+ * someone has to certify that from me.
+ * Anyway, I spent enough time chasing interrupt re-entrancy during
+ * errors or reconfigure, and I designed the locked/unlocked sections
+ * of the driver with great care, and with the recent addition of
+ * the spinlock (thanks to the new API), we should be quite close to
+ * the truth.
+ * The SMP/IRQ locking is quite coarse and conservative (i.e. not fast),
+ * but better safe than sorry (especially at 2 Mb/s ;-).
+ *
+ * I have also looked into disabling only our interrupt on the card
+ * (via HACR) instead of all interrupts in the processor (via cli),
+ * so that other driver are not impacted, and it look like it's
+ * possible, but it's very tricky to do right (full of races). As
+ * the gain would be mostly for SMP systems, it can wait...
+ *
* Debugging and options
* ---------------------
* You will find below a set of '#define" allowing a very fine control
@@ -171,7 +190,7 @@
*
* Thanks go also to:
* James Ashton <jaa101@syseng.anu.edu.au>,
- * Alan Cox <iialan@iiit.swan.ac.uk>,
+ * Alan Cox <alan@redhat.com>,
* Allan Creighton <allanc@cs.usyd.edu.au>,
* Matthew Geier <matthew@cs.usyd.edu.au>,
* Remo di Giovanni <remo@cs.usyd.edu.au>,
@@ -188,8 +207,9 @@
*
* Additional Credits:
*
- * My development has been done under Linux 2.0.x (Debian 1.1) with
- * an HP Vectra XP/60.
+ * My development has been done initially under Debian 1.1 (Linux 2.0.x)
+ * and now under Debian 2.2, initially with an HP Vectra XP/60, and now
+ * an HP Vectra XP/90.
*
*/
@@ -305,6 +325,21 @@
* - Fix check for root permission (break instead of exit)
* - New nwid & encoding setting (Wireless Extension 9)
*
+ * Changes made for release in 2.3.49 :
+ * ----------------------------------
+ * - Indentation reformating (Alan)
+ * - Update to new network API (softnet - 2.3.43) :
+ * o replace dev->tbusy (Alan)
+ * o replace dev->tstart (Alan)
+ * o remove dev->interrupt (Alan)
+ * o add SMP locking via spinlock in splxx (me)
+ * o add spinlock in interrupt handler (me)
+ * o use kernel watchdog instead of ours (me)
+ * o increase watchdog timeout (kernel is more sensitive) (me)
+ * o verify that all the changes make sense and work (me)
+ * - Fixup a potential gotcha when reconfiguring and thighten a bit
+ * the interactions with Tx queue.
+ *
* Wishes & dreams:
* ----------------
* - roaming (see Pcmcia driver)
@@ -395,11 +430,11 @@
/************************ CONSTANTS & MACROS ************************/
#ifdef DEBUG_VERSION_SHOW
-static const char *version = "wavelan.c : v21 (wireless extensions) 16/10/99\n";
+static const char *version = "wavelan.c : v22 (wireless extensions) 21/02/00\n";
#endif
/* Watchdog temporisation */
-#define WATCHDOG_JIFFIES (256*HZ/100)
+#define WATCHDOG_JIFFIES (512*HZ/100)
/* Macro to get the number of elements in an array */
#define NELS(a) (sizeof(a) / sizeof(a[0]))
@@ -441,12 +476,12 @@ struct net_local
{
net_local * next; /* linked list of the devices */
device * dev; /* reverse link */
+ spinlock_t spinlock; /* Serialize access to the hardware (SMP) */
en_stats stats; /* Ethernet interface statistics */
int nresets; /* number of hardware resets */
u_char reconfig_82586; /* We need to reconfigure the controller. */
u_char promiscuous; /* promiscuous mode */
int mc_count; /* number of multicast addresses */
- timer_list watchdog; /* to avoid blocking state */
u_short hacr; /* current host interface state */
int tx_n_in_use;
@@ -475,10 +510,12 @@ struct net_local
/**************************** PROTOTYPES ****************************/
/* ----------------------- MISC. SUBROUTINES ------------------------ */
-static inline unsigned long /* flags */
- wv_splhi(void); /* Disable interrupts */
static inline void
- wv_splx(unsigned long); /* Enable interrupts: flags */
+ wv_splhi(net_local *, /* Disable interrupts, lock driver */
+ unsigned long *); /* flags */
+static inline void
+ wv_splx(net_local *, /* Enable interrupts, unlock driver */
+ unsigned long *); /* flags */
static u_char
wv_irq_to_psa(int);
static int
@@ -580,7 +617,7 @@ static inline void
int),
wv_receive(device *); /* Read all packets waiting. */
/* --------------------- PACKET TRANSMISSION --------------------- */
-static inline void
+static inline int
wv_packet_write(device *, /* Write a packet to the Tx buffer. */
void *,
short);
@@ -607,7 +644,7 @@ static void
void *,
struct pt_regs *);
static void
- wavelan_watchdog(u_long); /* transmission watchdog */
+ wavelan_watchdog(device *); /* transmission watchdog */
/* ------------------- CONFIGURATION CALLBACKS ------------------- */
static int
wavelan_open(device *), /* Open the device. */