wl1251: rename reg.h to wl1251_reg.h
[safe/jmp/linux-2.6] / drivers / net / wireless / wavelan_cs.p.h
index 4ac359e..706fd30 100644 (file)
  * caracteristics of the hardware in a standard way and support for
  * applications for taking advantage of it (like Mobile IP).
  *
- * You will need to enable the CONFIG_NET_RADIO define in the kernel
- * configuration to enable the wireless extensions (this is the one
- * giving access to the radio network device choice).
- *
- * It might also be a good idea as well to fetch the wireless tools to
+ * It might be a good idea as well to fetch the wireless tools to
  * configure the device and play a bit.
  */
 
  * the Wavelan itself (NCR -> AT&T -> Lucent).
  *
  * All started with Anders Klemets <klemets@paul.rutgers.edu>,
- * writting a Wavelan ISA driver for the MACH microkernel. Girish
+ * writing a Wavelan ISA driver for the MACH microkernel. Girish
  * Welling <welling@paul.rutgers.edu> had also worked on it.
  * Keith Moore modify this for the Pcmcia hardware.
  * 
 /***************************** INCLUDES *****************************/
 
 /* Linux headers that we need */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/fcntl.h>
 #include <linux/ethtool.h>
-
-#ifdef CONFIG_NET_RADIO
 #include <linux/wireless.h>            /* Wireless extensions */
 #include <net/iw_handler.h>            /* New driver API */
-#endif
 
 /* Pcmcia headers that we need */
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
-#include <pcmcia/version.h>
 
 /* Wavelan declarations */
 #include "i82593.h"    /* Definitions for the Intel chip */
 #undef WAVELAN_ROAMING_EXT     /* Enable roaming wireless extensions */
 #undef SET_PSA_CRC             /* Set the CRC in PSA (slower) */
 #define USE_PSA_CONFIG         /* Use info from the PSA */
-#undef STRUCT_CHECK            /* Verify padding of structures */
 #undef EEPROM_IS_PROTECTED     /* Doesn't seem to be necessary */
 #define MULTICAST_AVOID                /* Avoid extra multicast (I'm sceptical) */
 #undef SET_MAC_ADDRESS         /* Experimental */
 
-#ifdef WIRELESS_EXT    /* If wireless extension exist in the kernel */
 /* Warning : these stuff will slow down the driver... */
 #define WIRELESS_SPY           /* Enable spying addresses */
 #undef HISTOGRAM               /* Enable histogram of sig level... */
-#endif
 
 /****************************** DEBUG ******************************/
 
@@ -559,7 +547,7 @@ typedef struct wavepoint_beacon
                        spec_id2,       /* Unused */
                        pdu_type,       /* Unused */
                        seq;            /* WavePoint beacon sequence number */
-  unsigned short       domain_id,      /* WavePoint Domain ID */
+  __be16               domain_id,      /* WavePoint Domain ID */
                        nwid;           /* WavePoint NWID */
 } wavepoint_beacon;
 
@@ -588,7 +576,6 @@ struct wavepoint_table
 /****************************** TYPES ******************************/
 
 /* Shortcuts */
-typedef struct net_device_stats        en_stats;
 typedef struct iw_statistics   iw_stats;
 typedef struct iw_quality      iw_qual;
 typedef struct iw_freq         iw_freq;
@@ -604,16 +591,13 @@ typedef u_char            mac_addr[WAVELAN_ADDR_SIZE];    /* Hardware address */
  * For each network interface, Linux keep data in two structure. "device"
  * keep the generic data (same format for everybody) and "net_local" keep
  * the additional specific data.
- * Note that some of this specific data is in fact generic (en_stats, for
- * example).
  */
 struct net_local
 {
   dev_node_t   node;           /* ???? What is this stuff ???? */
   struct net_device *  dev;            /* Reverse link... */
   spinlock_t   spinlock;       /* Serialize access to the hardware (SMP) */
-  dev_link_t * link;           /* pcmcia structure */
-  en_stats     stats;          /* Ethernet interface statistics */
+  struct pcmcia_device *       link;           /* pcmcia structure */
   int          nresets;        /* Number of hw resets */
   u_char       configured;     /* If it is configured */
   u_char       reconfig_82593; /* Need to reconfigure the controller */
@@ -625,12 +609,10 @@ struct net_local
   int          rfp;            /* Last DMA machine receive pointer */
   int          overrunning;    /* Receiver overrun flag */
 
-#ifdef WIRELESS_EXT
   iw_stats     wstats;         /* Wireless specific stats */
 
   struct iw_spy_data   spy_data;
   struct iw_public_data        wireless_data;
-#endif
 
 #ifdef HISTOGRAM
   int          his_number;             /* Number of intervals */
@@ -651,7 +633,7 @@ struct net_local
 /* ----------------- MODEM MANAGEMENT SUBROUTINES ----------------- */
 static inline u_char           /* data */
        hasr_read(u_long);      /* Read the host interface : base address */
-static inline void
+static void
        hacr_write(u_long,      /* Write to host interface : base address */
                   u_char),     /* data */
        hacr_write_slow(u_long,
@@ -665,7 +647,7 @@ static void
                  int,          /* Offset in psa */
                  u_char *,     /* Buffer in memory */
                  int);         /* Length of buffer */
-static inline void
+static void
        mmc_out(u_long,         /* Write 1 byte to the Modem Manag Control */
                u_short,
                u_char),
@@ -673,10 +655,10 @@ static inline void
                  u_char,
                  u_char *,
                  int);
-static inline u_char           /* Read 1 byte from the MMC */
+static u_char                  /* Read 1 byte from the MMC */
        mmc_in(u_long,
               u_short);
-static inline void
+static void
        mmc_read(u_long,        /* Read n bytes from the MMC */
                 u_char,
                 u_char *,
@@ -702,28 +684,26 @@ static int
                     int,
                     char *,
                     int);
-static inline void
+static void
        wv_82593_reconfig(struct net_device *); /* Reconfigure the controller */
 /* ------------------- DEBUG & INFO SUBROUTINES ------------------- */
-static inline void
+static void
        wv_init_info(struct net_device *);      /* display startup info */
 /* ------------------- IOCTL, STATS & RECONFIG ------------------- */
-static en_stats        *
-       wavelan_get_stats(struct net_device *); /* Give stats /proc/net/dev */
 static iw_stats *
        wavelan_get_wireless_stats(struct net_device *);
 /* ----------------------- PACKET RECEPTION ----------------------- */
-static inline int
+static int
        wv_start_of_frame(struct net_device *,  /* Seek beggining of current frame */
                          int,  /* end of frame */
                          int); /* start of buffer */
-static inline void
+static void
        wv_packet_read(struct net_device *,     /* Read a packet from a frame */
                       int,
                       int),
        wv_packet_rcv(struct net_device *);     /* Read all packets waiting */
 /* --------------------- PACKET TRANSMISSION --------------------- */
-static inline void
+static void
        wv_packet_write(struct net_device *,    /* Write a packet to the Tx buffer */
                        void *,
                        short);
@@ -731,48 +711,38 @@ static int
        wavelan_packet_xmit(struct sk_buff *,   /* Send a packet */
                            struct net_device *);
 /* -------------------- HARDWARE CONFIGURATION -------------------- */
-static inline int
+static int
        wv_mmc_init(struct net_device *);       /* Initialize the modem */
 static int
        wv_ru_stop(struct net_device *),        /* Stop the i82593 receiver unit */
        wv_ru_start(struct net_device *);       /* Start the i82593 receiver unit */
 static int
        wv_82593_config(struct net_device *);   /* Configure the i82593 */
-static inline int
+static int
        wv_pcmcia_reset(struct net_device *);   /* Reset the pcmcia interface */
 static int
        wv_hw_config(struct net_device *);      /* Reset & configure the whole hardware */
-static inline void
+static void
        wv_hw_reset(struct net_device *);       /* Same, + start receiver unit */
-static inline int
-       wv_pcmcia_config(dev_link_t *); /* Configure the pcmcia interface */
+static int
+       wv_pcmcia_config(struct pcmcia_device *);       /* Configure the pcmcia interface */
 static void
-       wv_pcmcia_release(dev_link_t *);/* Remove a device */
+       wv_pcmcia_release(struct pcmcia_device *);/* Remove a device */
 /* ---------------------- INTERRUPT HANDLING ---------------------- */
 static irqreturn_t
        wavelan_interrupt(int,  /* Interrupt handler */
-                         void *,
-                         struct pt_regs *);
+                         void *);
 static void
        wavelan_watchdog(struct net_device *);  /* Transmission watchdog */
 /* ------------------- CONFIGURATION CALLBACKS ------------------- */
 static int
        wavelan_open(struct net_device *),              /* Open the device */
        wavelan_close(struct net_device *);     /* Close the device */
-static dev_link_t *
-       wavelan_attach(void);           /* Create a new device */
 static void
-       wavelan_detach(dev_link_t *);   /* Destroy a removed device */
-static int
-       wavelan_event(event_t,          /* Manage pcmcia events */
-                     int,
-                     event_callback_args_t *);
+       wavelan_detach(struct pcmcia_device *p_dev);    /* Destroy a removed device */
 
 /**************************** VARIABLES ****************************/
 
-static dev_info_t dev_info = "wavelan_cs";
-static dev_link_t *dev_list = NULL;    /* Linked list of devices */
-
 /*
  * Parameters that can be set with 'insmod'
  * The exact syntax is 'insmod wavelan_cs.o <var>=<value>'