⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wavelan_cs.h

📁 pcmcia source code
💻 H
📖 第 1 页 / 共 3 页
字号:
/* *	Wavelan Pcmcia driver * *		Jean II - HPLB '96 * * Reorganisation and extension of the driver. * * This file contain all definition and declarations necessary for the * wavelan pcmcia driver. This file is a private header, so it should * be included only on wavelan_cs.c !!! */#ifndef WAVELAN_CS_H#define WAVELAN_CS_H/************************** DOCUMENTATION **************************//* * This driver provide a Linux interface to the Wavelan Pcmcia hardware * The Wavelan is a product of Lucent (http://www.wavelan.com/). * This division was formerly part of NCR and then AT&T. * Wavelan are also distributed by DEC (RoamAbout DS)... * * To know how to use this driver, read the PCMCIA HOWTO. * If you want to exploit the many other fonctionalities, look comments * in the code... * * This driver is the result of the effort of many peoples (see below). *//* ------------------------ SPECIFIC NOTES ------------------------ *//* * Web page * -------- *	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 are SMP compliant (I eventually fixed the remaining bugs). *	The driver has been tested on a dual P6-150 and survived my usual *	set of torture tests. *	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 *	on the driver behaviour and the debug messages printed. *	The main options are : *	o WAVELAN_ROAMING, for the experimental roaming support. *	o SET_PSA_CRC, to have your card correctly recognised by *	  an access point and the Point-to-Point diagnostic tool. *	o USE_PSA_CONFIG, to read configuration from the PSA (EEprom) *	  (otherwise we always start afresh with some defaults) * * wavelan_cs.o is darn too big * ------------------------- *	That's true ! There is a very simple way to reduce the driver *	object by 33% (yes !). Comment out the following line : *		#include <linux/wireless.h> *	Other compile options can also reduce the size of it... * * MAC address and hardware detection : * ---------------------------------- *	The detection code of the wavelan chech that the first 3 *	octets of the MAC address fit the company code. This type of *	detection work well for AT&T cards (because the AT&T code is *	hardcoded in wavelan.h), but of course will fail for other *	manufacturer. * *	If you are sure that your card is derived from the wavelan, *	here is the way to configure it : *	1) Get your MAC address *		a) With your card utilities (wfreqsel, instconf, ...) *		b) With the driver : *			o compile the kernel with DEBUG_CONFIG_INFO enabled *			o Boot and look the card messages *	2) Set your MAC code (3 octets) in MAC_ADDRESSES[][3] (wavelan.h) *	3) Compile & verify *	4) Send me the MAC code - I will include it in the next version... * *//* --------------------- WIRELESS EXTENSIONS --------------------- *//* * This driver is the first one to support "wireless extensions". * This set of extensions provide you some way to control the wireless * 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 * configure the device and play a bit. *//* ---------------------------- FILES ---------------------------- *//* * wavelan_cs.c :	The actual code for the driver - C functions * * wavelan_cs.h :	Private header : local types / vars for the driver * * wavelan.h :		Description of the hardware interface & structs * * i82593.h :		Description if the Ethernet controller *//* --------------------------- HISTORY --------------------------- *//* * The history of the Wavelan drivers is as complicated as history of * 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 * Welling <welling@paul.rutgers.edu> had also worked on it. * Keith Moore modify this for the Pcmcia hardware. *  * Robert Morris <rtm@das.harvard.edu> port these two drivers to BSDI * and add specific Pcmcia support (there is currently no equivalent * of the PCMCIA package under BSD...). * * Jim Binkley <jrb@cs.pdx.edu> port both BSDI drivers to FreeBSD. * * Bruce Janson <bruce@cs.usyd.edu.au> port the BSDI ISA driver to Linux. * * Anthony D. Joseph <adj@lcs.mit.edu> started modify Bruce driver * (with help of the BSDI PCMCIA driver) for PCMCIA. * Yunzhou Li <yunzhou@strat.iol.unh.edu> finished is work. * Joe Finney <joe@comp.lancs.ac.uk> patched the driver to start * correctly 2.00 cards (2.4 GHz with frequency selection). * David Hinds <dahinds@users.sourceforge.net> integrated the whole in his * Pcmcia package (+ bug corrections). * * I (Jean Tourrilhes - jt@hplb.hpl.hp.com) then started to make some * patchs to the Pcmcia driver. After, I added code in the ISA driver * for Wireless Extensions and full support of frequency selection * cards. Now, I'm doing the same to the Pcmcia driver + some * reorganisation. * Loeke Brederveld <lbrederv@wavelan.com> from Lucent has given me * much needed informations on the Wavelan hardware. *//* By the way : for the copyright & legal stuff : * Almost everybody wrote code under GNU or BSD license (or alike), * and want that their original copyright remain somewhere in the * code (for myself, I go with the GPL). * Nobody want to take responsibility for anything, except the fame... *//* --------------------------- CREDITS --------------------------- *//* * Credits: *    Special thanks to Jan Hoogendoorn of AT&T GIS Utrecht and *	Loeke Brederveld of Lucent for providing extremely useful *	information about WaveLAN PCMCIA hardware * *    This driver is based upon several other drivers, in particular: *	David Hinds' Linux driver for the PCMCIA 3c589 ethernet adapter *	Bruce Janson's Linux driver for the AT-bus WaveLAN adapter *	Anders Klemets' PCMCIA WaveLAN adapter driver *	Robert Morris' BSDI driver for the PCMCIA WaveLAN adapter * * Additional Credits: * *    This software was originally developed under Linux 1.2.3 *	(Slackware 2.0 distribution). *    And then under Linux 2.0.x (Debian 1.1 -> 2.2 - pcmcia 2.8.18+) *	with an HP OmniBook 4000 and then a 5500. * *    It is based on other device drivers and information either written *    or supplied by: *	James Ashton (jaa101@syseng.anu.edu.au), *	Ajay Bakre (bakre@paul.rutgers.edu), *	Donald Becker (becker@super.org), *	Jim Binkley <jrb@cs.pdx.edu>, *	Loeke Brederveld <lbrederv@wavelan.com>, *	Allan Creighton (allanc@cs.su.oz.au), *	Brent Elphick <belphick@uwaterloo.ca>, *	Joe Finney <joe@comp.lancs.ac.uk>, *	Matthew Geier (matthew@cs.su.oz.au), *	Remo di Giovanni (remo@cs.su.oz.au), *	Mark Hagan (mhagan@wtcpost.daytonoh.NCR.COM), *	David Hinds <dahinds@users.sourceforge.net>, *	Jan Hoogendoorn (c/o marteijn@lucent.com), *      Bruce Janson <bruce@cs.usyd.edu.au>, *	Anthony D. Joseph <adj@lcs.mit.edu>, *	Anders Klemets (klemets@paul.rutgers.edu), *	Yunzhou Li <yunzhou@strat.iol.unh.edu>, *	Marc Meertens (mmeertens@lucent.com), *	Keith Moore, *	Robert Morris (rtm@das.harvard.edu), *	Ian Parkin (ian@cs.su.oz.au), *	John Rosenberg (johnr@cs.su.oz.au), *	George Rossi (george@phm.gov.au), *	Arthur Scott (arthur@cs.su.oz.au), *	Stanislav Sinyagin <stas@isf.ru> *	Peter Storey, *	Jean Tourrilhes <jt@hpl.hp.com>, *	Girish Welling (welling@paul.rutgers.edu) *	Clark Woodworth <clark@hiway1.exit109.com> *	Yongguang Zhang <ygz@isl.hrl.hac.com>... *//* ------------------------- IMPROVEMENTS ------------------------- *//* * I proudly present : * * Changes made in 2.8.22 : * ---------------------- *	- improved wv_set_multicast_list *	- catch spurious interrupt *	- correct release of the device * * Changes mades in release : * ------------------------ *	- Reorganisation of the code, function name change *	- Creation of private header (wavelan_cs.h) *	- Reorganised debug messages *	- More comments, history, ... *	- Configure earlier (in "insert" instead of "open") *        and do things only once *	- mmc_init : configure the PSA if not done *	- mmc_init : 2.00 detection better code for 2.00 init *	- better info at startup *	- Correct a HUGE bug (volatile & uncalibrated busy loop) *	  in wv_82593_cmd => config speedup *	- Stop receiving & power down on close (and power up on open) *	  use "ifconfig down" & "ifconfig up ; route add -net ..." *	- Send packets : add watchdog instead of pooling *	- Receive : check frame wrap around & try to recover some frames *	- wavelan_set_multicast_list : avoid reset *	- add wireless extensions (ioctl & get_wireless_stats) *	  get/set nwid/frequency on fly, info for /proc/net/wireless *	- Suppress useless stuff from lp (net_local), but add link *	- More inlines *	- Lot of others minor details & cleanups * * Changes made in second release : * ------------------------------ *	- Optimise wv_85893_reconfig stuff, fix potential problems *	- Change error values for ioctl *	- Non blocking wv_ru_stop() + call wv_reset() in case of problems *	- Remove development printk from wavelan_watchdog() *	- Remove of the watchdog to wavelan_close instead of wavelan_release *	  fix potential problems... *	- Start debugging suspend stuff (but it's still a bit weird) *	- Debug & optimize dump header/packet in Rx & Tx (debug) *	- Use "readb" and "writeb" to be kernel 2.1 compliant *	- Better handling of bogus interrupts *	- Wireless extension : SETSPY and GETSPY *	- Remove old stuff (stats - for those needing it, just ask me...) *	- Make wireless extensions optional * * Changes made in third release : * ----------------------------- *	- cleanups & typos *	- modif wireless ext (spy -> only one pointer) *	- new private ioctl to set/get quality & level threshold *	- Init : correct default value of level threshold for pcmcia *	- kill watchdog in hw_reset *	- more 2.1 support (copy_to/from_user instead of memcpy_to/fromfs) *	- Add message level (debug stuff in /var/adm/debug & errors not *	  displayed at console and still in /var/adm/messages) * * Changes made in fourth release : * ------------------------------ *	- multicast support (yes !) thanks to Yongguang Zhang. * * Changes made in fifth release (2.9.0) :

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -