/********************************************************************* * * Filename: netwave_cs.c * Version: 0.4.1 * Description: Netwave AirSurfer Wireless LAN PC Card driver * Status: Experimental. * Authors: John Markus Bjørndalen <johnm@cs.uit.no> * Dag Brattli <dagb@cs.uit.no> * David Hinds <dahinds@users.sourceforge.net> * Created at: A long time ago! * Modified at: Mon Nov 10 11:54:37 1997 * Modified by: Dag Brattli <dagb@cs.uit.no> * * Copyright (c) 1997 University of Tromsø, Norway * * Revision History: * * 08-Nov-97 15:14:47 John Markus Bjørndalen <johnm@cs.uit.no> * - Fixed some bugs in netwave_rx and cleaned it up a bit. * (One of the bugs would have destroyed packets when receiving * multiple packets per interrupt). * - Cleaned up parts of newave_hw_xmit. * - A few general cleanups. * 24-Oct-97 13:17:36 Dag Brattli <dagb@cs.uit.no> * - Fixed netwave_rx receive function (got updated docs) * Others: * - Changed name from xircnw to netwave, take a look at * http://www.netwave-wireless.com * - Some reorganizing of the code * - Removed possible race condition between interrupt handler and transmit * function * - Started to add wireless extensions, but still needs some coding * - Added watchdog for better handling of transmission timeouts * (hopefully this works better) ********************************************************************//* To have statistics (just packets sent) define this */#undef NETWAVE_STATS#include<linux/module.h>#include<linux/kernel.h>#include<linux/init.h>#include<linux/types.h>#include<linux/fcntl.h>#include<linux/interrupt.h>#include<linux/ptrace.h>#include<linux/ioport.h>#include<linux/in.h>#include<linux/slab.h>#include<linux/string.h>#include<linux/timer.h>#include<linux/errno.h>#include<linux/netdevice.h>#include<linux/etherdevice.h>#include<linux/skbuff.h>#include<linux/bitops.h>#include<linux/wireless.h>#include<net/iw_handler.h>#include<pcmcia/cs_types.h>#include<pcmcia/cs.h>#include<pcmcia/cistpl.h>#include<pcmcia/cisreg.h>#include<pcmcia/ds.h>#include<pcmcia/mem_op.h>#include<asm/system.h>#include<asm/io.h>#include<asm/dma.h>#define NETWAVE_REGOFF 0x8000/* The Netwave IO registers, offsets to iobase */#define NETWAVE_REG_COR 0x0#define NETWAVE_REG_CCSR 0x2#define NETWAVE_REG_ASR 0x4#define NETWAVE_REG_IMR 0xa#define NETWAVE_REG_PMR 0xc#define NETWAVE_REG_IOLOW 0x6#define NETWAVE_REG_IOHI 0x7#define NETWAVE_REG_IOCONTROL 0x8#define NETWAVE_REG_DATA 0xf/* The Netwave Extended IO registers, offsets to RamBase */#define NETWAVE_EREG_ASCC 0x114#define NETWAVE_EREG_RSER 0x120#define NETWAVE_EREG_RSERW 0x124#define NETWAVE_EREG_TSER 0x130#define NETWAVE_EREG_TSERW 0x134#define NETWAVE_EREG_CB 0x100#define NETWAVE_EREG_SPCQ 0x154#define NETWAVE_EREG_SPU 0x155#define NETWAVE_EREG_LIF 0x14e#define NETWAVE_EREG_ISPLQ 0x156#define NETWAVE_EREG_HHC 0x158#define NETWAVE_EREG_NI 0x16e#define NETWAVE_EREG_MHS 0x16b#define NETWAVE_EREG_TDP 0x140#define NETWAVE_EREG_RDP 0x150#define NETWAVE_EREG