Staging: wlags49_h2: add Agere driver for HERMES II and HERMES II.5 chipsets

WLAN driver for cards using the HERMES II and HERMES II.5 chipset

Based on Agere Systems Linux LKM Wireless Driver Source Code,
Version 7.22; complies with Open Source BSD License.

The software is a modified version of wl_lkm_722_abg.tar.gz from the
Agere Systems website, addapted for Ubuntu 9.04 and modified to
fit in the current Linux kernel (2.6.31).

Modified for kernel 2.6 by Henk de Groot <pe1dnn@amsat.org>
Based on 7.18 version by Andrey Borzenkov <arvidjaar@mail.ru> $Revision: 39 $

Signed-off-by: Henk de Groot <pe1dnn@amsat.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Henk de Groot 2009-09-27 11:12:52 +02:00 committed by Greg Kroah-Hartman
parent 349f535cbd
commit 68c0bdff7a
83 changed files with 50250 additions and 0 deletions

View File

@ -125,6 +125,10 @@ source "drivers/staging/iio/Kconfig"
source "drivers/staging/ramzswap/Kconfig"
source "drivers/staging/wlags49_h2/Kconfig"
source "drivers/staging/wlags49_h25/Kconfig"
source "drivers/staging/strip/Kconfig"
source "drivers/staging/arlan/Kconfig"

View File

@ -44,6 +44,8 @@ obj-$(CONFIG_RAR_REGISTER) += rar/
obj-$(CONFIG_DX_SEP) += sep/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_RAMZSWAP) += ramzswap/
obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/
obj-$(CONFIG_WLAGS49_H25) += wlags49_h25/
obj-$(CONFIG_STRIP) += strip/
obj-$(CONFIG_ARLAN) += arlan/
obj-$(CONFIG_WAVELAN) += wavelan/

View File

@ -0,0 +1,8 @@
config WLAGS49_H2
tristate "Agere Systems HERMES II Wireless PC Card Model 0110"
depends on WLAN_80211 && WIRELESS_EXT
---help---
Driver for wireless cards using Agere's HERMES II chipset
which are identified with Manufacture ID: 0156,0003
The software is a modified version of wl_lkm_722_abg.tar.gz
from the Agere Systems website, addapted for Ubuntu 9.04.

View File

@ -0,0 +1,81 @@
#
# Makefile for wlags49_h2_cs.ko and wlags49_h25_cs.ko
#
# Default build for Hermes-II base cards (possibly identified with
# "manfid: 0x0156, 0x0003" in "pccardctl ident" output), comment
# -DHERMES25 below
#
# If you want to build for Hermes-II.5 base cards (possibly identified with
# "manfid: 0x0156, 0x0004" in "pccardctl ident" output), uncomment
# -DHERMES25 below
#
# If you want to build AP support (untested), comment out -DSTA_ONLY
INSTALLDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless
EXTRA_CFLAGS += -I$(KERNELDIR)/include
EXTRA_CFLAGS += -I$(src) \
-DBUS_PCMCIA \
-DUSE_WPA \
-DUSE_WEXT \
-DSTA_ONLY \
-DWVLAN_49 \
# -DHERMES25 \
# -DDBG \
# -DDBG_LVL=5 \
# -DUSE_UIL \
# -DUSE_PROFILE \
ifeq ($(findstring HERMES25,$(EXTRA_CFLAGS)),)
WLNAME := wlags49_h2_cs
$(WLNAME)-y := sta_h2.o
ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),)
$(WLNAME)-y += ap_h2.o
endif
else
WLNAME=wlags49_h25_cs
$(WLNAME)-y := sta_h25.o
ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),)
$(WLNAME)-y += ap_h25.o
endif
endif
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m += $(WLNAME).o
$(WLNAME)-y += wl_profile.o \
wl_wext.o \
wl_priv.o \
wl_main.o \
wl_enc.o \
wl_util.o \
wl_netdev.o \
wl_cs.o \
mmd.o \
hcf.o \
dhf.o
$(WLNAME)-$(CONFIG_SYSFS) += wl_sysfs.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
clean:
rm -fr *.o *.ko *.mod.c *.mod.o .*.*.cmd Module.symvers \
Module.markers modules.order .tmp_versions
install: default
-rmmod $(WLNAME)
install -d $(INSTALLDIR)
install -m 0644 -o root -g root $(WLNAME).ko $(INSTALLDIR)
/sbin/depmod -aq

View File

@ -0,0 +1,180 @@
=======================================================================
WLAN driver for cards using the HERMES II and HERMES II.5 chipset
HERMES II Card
PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110"
Manufacture ID: 0156,0003
HERMES II.5 Card
PCMCIA Info: "Linksys" "WCF54G_Wireless-G_CompactFlash_Card"
Manufacture ID: 0156,0004
Based on Agere Systems Linux LKM Wireless Driver Source Code,
Version 7.22; complies with Open Source BSD License.
=======================================================================
DESCRIPTION
The software is a modified version of wl_lkm_722_abg.tar.gz from the
Agere Systems website, addapted for Ubuntu 9.04.
Modified for kernel 2.6 by Henk de Groot <pe1dnn@amsat.org>
Based on 7.18 version by Andrey Borzenkov <arvidjaar@mail.ru> $Revision: 39 $
INSTALLATION
Unpack in a new directory.
Open a terminal screen.
Change directory to the source directory
Type command
make
and wait until it is finshed. Now you have build the module
wlags49_h2_cs; this module is meant for a HERMES II card.
The driver is tested with a Thomson SpeedTouch 110 Wireless PC Card.
For the test Station mode was used with WEP. The driver is supposed
to support WAP and as accesspoint that is NOT tested.
If you have a card using the HERMES II.5 chip you have to make
changes to the Makefile and uncomment -DHERMES25. This will build
driver wlags49_h25_cs.
Note: You can detemine the type with command "pccardctrl info"
MANIFID: 0156,0002 = HERMES - not supported by this driver
MANIFID: 0156,0003 = HERMES II (Wireless B)
MANIFID: 0156,0004 = HERMES II.5 (Wireless B/G)
After succesfull compile type command
sudo make install
to install the module.
Now the card should be recognized. It should be able to configure
and use the card with NetworkManager. Wpa_supplicant also works, as does
manual configuration using the iwconfig/iwlist programs.
Note: I only tested Station mode with WEP but if I didn't break anything
WPA and AP mode should also work; note however that WPA was experimental
in the original Agere driver!
Note: to compile as AP change the makefile and remove the line
-DSTA_ONLY \
(or comment it, but in that case make sure to move it after all the
flags you want to use)
CHANGES
The HCF functions to control the card are virtually unchanged, the only
changes are meant to fix compiler warnings. The only real change is in
HCF_WAIT_WHILE which now has a udelay(2) added to give a small delay.
The linux driver files (wl_xxxx.c) are changed in the following ways:
- Addaptations of Andrey Borzenkov applied to 7.22 source
- Alterations to avoid most HCF_ASSERTs
-- Switching interrupts off and on in the HCF
-- Bugfixes, things that were aparently wrong like reporting link status
change which checked a variable that was not changed in HCF anymore.
-- Used on WEP but setting keys via SIOCSIWENCODEEXT was not supported
-- Recovery actions added
The major problem was the order in which calls can be made. The original
looks like a traditonal UNIX driver. To call an "ioctl" function you
have to "open" the device first to get a handle and after "close" no
"ioctl" function can be called anymore. With the 2.6 driver this all
changed; the former ioctl functions are now called before "open" and
after "close", which was not expected. One of the problems was enable/
disable of interrupts in the HCF. Interrupt handling starts at "open"
so if a former "ioctl" routinge is called before "open" or after "close"
then nothing should be done with interrupt switching in the HCF. Once
this was solved most HCF_ASSERTS went away.
The last point, recovery actions added, needs some clarification.
Starting the card works most of the time, but unfortunately not always.
At a few times recovery code was added; when the card starts to
misbehave or the communication between the HCF and the card is
out of sync and the HCF enters DEFUNCT mode everything is reset and
reinitialized. Note, hcf.c contains a lot of documentation. It takes
some time but slowly some things become clear. Also some unresolved
issues are mentioned in hcf.c, so there are still unknown bugs.
The card problems are almost in all cases when starting up and before
the first association with an AP, once the card is in operation it
seems to stay that way; when debugging no HCF_ASSERTS appear anymore.
Note: some HCF_ASSERTS still appear, in a number of cases it is a real
error, for example at card removal the missing card is detected.
LICENSE
The Agere Systems license applies. This is why I include the original
README.wlags49. The instructions in that file are bogus now. I also
include the man page. Eventhough setting parameters on the module
does not work anymore but it provides some information about all the
settings.
I have not have personal contact with Agere, but others have. Agere
agreed to make their software available under the BSD licence.
This driver is based on the 7.22 version.
The following was mailed by Agere to Andrey Borzenkov about this:
--- Begin Message ---
* From: TJ <tj@xxxxxxxxxxx>
* Date: Mon, 05 Feb 2007 19:28:59 +0000
Hi Andrey,
I've got some good news for you/us/the world of Hermes :)
I got a reply from the legal representative at Agere confirming that
their source-code is BSD licensed, and I've included the contents of the
email here.
I hope this re-assures you so that your excellent work on the drivers
can be made widely available for other hackers to work with.
Regards,
TJ.
---------
On Mon, 2007-02-05 at 13:54 -0500, Pathare, Viren M (Viren) wrote:
"I would like to confirm that the two drivers; Linux LKM Wireless Driver
Source Code, Version 7.18 and Linux LKM Wireless Driver Source Code,
Version 7.22 comply with Open Source BSD License. Therefore the source
code can be distributed in unmodified or modified form consistent with
the terms of the license.
The Linux driver architecture was based on two modules, the MSF (Module
specific functions) and the HCF (Hardware Control Functions). Included
in the HCF is run-time firmware (binary format) which is downloaded into
the RAM of the Hermes 1/2/2.5 WMAC.
This hex coded firmware is not based on any open source software and
hence it is not subject to any Open Source License. The firmware was
developed by Agere and runs on the DISC processor embedded within the
Hermes 1/2/2.5 Wireless MAC devices.
Hope this helps.
Sincerely,
Viren Pathare
Intellectual Property Licensing Manager
Agere"
--- End Message ---

View File

@ -0,0 +1,641 @@
==============================================================================
Agere Systems Inc. July 2004
Readme for Linux Driver Source for Wavelan Version: 7.22-abg
==============================================================================
This text file includes update information, installation instructions,
limitations to the current version of the product, and suggestions to solve
known issues or problems.
TABLE OF CONTENTS.
1. DESCRIPTION
2. SYSTEM REQUIREMENTS
3. NEW IN THIS RELEASE
4. INSTALLATION NOTES
5. TECHNICAL CONSTRAINTS
6. KNOWN ISSUES
7. TECHNICAL SUPPORT
------------------------------------------------------------------------------
1. DESCRIPTION
With this package, you can build and install a Wireless driver for a
specific Linux kernel.
The driver in this package supports the network interface cards based on:
- WL60010, a.k.a. Hermes-II
- WL60040, a.k.a. Hermes-II.5
Although derived from the Hermes-I/II Linux driver, this release ONLY
Supports Hermes-II/II.5 chipsets. Hermes-I is no longer supported.
The software is distributed in a compressed source file archive:
- wl_lkm_7_22_abg.tar.gz
Because this release supports more than one Hermes CPU and bus
architecture, a naming convention is used for the resulting binaries that
can be built from this source code. Driver binaries are named as follows:
wlags49_<hermes_type>_<bus_arch>.o
where 'wlags49' denotes an Agere WaveLan Linux build,
<hermes_type> is: 'h2' for Hermes-II, 'h25' for Hermes-II.5
<bus_arch> is: 'cs' for Card Services (PCMCIA, Compact Flash), PCI for
PCI or MiniPCI.
For example, a driver built for Hermes-II Card Services (PCMCIA/Compact
Flash) is named wlags49_h2_cs.o, whereas a driver built for Hermes-II
MiniPCI is named wlags49_h2_pci.o.
The following software is included with this distribution:
General information:
* README.wlags49 This file
* LICENSE.wlags49 License
* wlags49.mk Top level Makefile
* Build Script to build driver
* Install Script to install driver
Driver source:
* wireless/ MSF source
* hcf/ HCF and F/W source
* wireless/wlags49_cs.mk Driver Makefile, PC Card
* wireless/wlags49_pci.mk Driver Makefile, PCI
* include/hcf/debug.h Driver debug support
* include/hcf/hcfcfg.h Header to configure HCF
* include/wireless/*.h Driver source headers
Driver online manual page:
* man/wlags49.4 Driver manual page
PCMCIA configuration update:
* etc/wlags49.conf Add-on config file
* etc/wlags49.mk config update Makefile
* etc/wlags49.patch config update patch file
The driver is build up of 2 modules:
- a higher module called Module Specific Functions (MSF), which contains
the functions of the driver that are network driver interface and
Operating System specific.
- a lower module called Hardware Control Functions (HCF), which contains
the functions to interface to the Network Interface Card (NIC). The HCF
provides for all WaveLAN NIC types one standard interface to the MSF.
This I/F is called the Wireless Connection Interface (WCI) and is the
subject of a seperate document (025726).
The HCF directory contains firmware images to allow the card to operate in
either station (STA) or Access Point (AP) mode. In the build process, the
files fw_h2.c and fw_h25.c are used for Hermes-II and Hermes-II.5
respectively. The firmware images in this release are identified as:
- HII Station F/W: fw_h2.c.sta
- HII.5 Station F/W: fw_h25.c.sta
- HII AccesPoint F/W: fw_h2.c.ap
- HII.5 AccesPoint F/W: fw_h25.c.ap
To build a STA or AP mode driver, the suffix .sta or .ap must be removed.
The files as distributed by this release build STA drivers by default.
------------------------------------------------------------------------------
2. SYSTEM REQUIREMENTS
2.1 Operating System
This software can be compiled and installed with Linux kernel versions
2.4.x. Although this driver should compile for other CPUs as well, as of
the date of this release, no CPU architectures other than x86 have been
verified.
wl_lkm_7_22_abg is tested with the following Linux Distributions:
* Red Hat version 9.0
* Suse version 9.0
If you're building for PC Card or Compact Flash, you need the Card Services
from David Hinds.
wl_lkm_7_22_abg is tested with:
* pcmcia-cs-3.2.7.tar.gz
2.2 Free Disk Space
To compile the software you need to have the full set of Linux kernel
source files installed, as well as a sane build environment which includes
all tools necessary for compiling and linking code. Depending on the exact
version of the kernel, you need approximately 150 MB of free disk space.
Once compiled, the driver uses about 150-200 KB. Please note, this size is
approximate and can vary depending on which version of the driver is built.
In addition, adding debug tracing support increases this size.
------------------------------------------------------------------------------
3. NEW IN THIS RELEASE
Version 7.22 abg - July 28, 2004
------------------------------------------------------------------------------
4. INSTALLATION NOTES
The driver files for the Linux driver are not "ready" for direct
installation onto any Linux computer. To build and install the driver you
need some expertise on the Linux operating system in general and the type
and version installed of the kernel installed on your computer. With this
knowledge you can use the driver source files provided to build your own
Linux driver for your specific computer and kernel.
4.1 Before you start
1) Determine the type and version of the Linux kernel of your computer and
check whether it meets the system requirements listed in section 2 of this
README.
2) If you're building for PC Card or Compact Flash, read the Linux
PCMCIA-HOWTO by David Hinds. This document is probably provided on the
CD-ROM of your Linux distribution. You can download the latest version
from:
http://pcmcia-cs.sourceforge.net
Please read the section titled "Prerequisites and kernel setup" of the
PCMCIA-HOWTO.
4.2 Build the driver for PC Card / Compact Flash
1) Obtain a copy of the Linux PCMCIA package from a CD-ROM of your Linux
distribution or download the latest version.
For your convenience, the Agere Systems Wireless CD-ROM contains a copy of
the PCMCIA package in sub-directory: Xtras/Linux/PCMCIA
2) To unpack the Linux PCMCIA package, copy it to the current working
directory and type:
% tar xzvf pcmcia-cs-x.y.z.tar.gz
% mv pcmcia-cs-x.y.z pcmcia-cs
Note: If you use the archive supplied on the CDROM, use archive name
"pc3_2_1.tgz" instead of "pcmcia-cs-3.2.7.tar.gz".
Note: even though PCMCIA code exists in the kernel source tree, the PCMCIA
Card Services package needs to be unpacked locally to build drivers based
on it.
3) Extract the wlags49 distribution archive on top of the Linux PCMCIA
package.
% cd pcmcia-cs
% tar xzvf ../wl_lkm_7_22_abg.tar.gz
4) To build and install the driver, follow the procedure below:
% ./Configure
Answer the presented questions. Usually the default answers are OK and
pressing "Enter" is enough.
On newer RedHat systems, however, you should specify "/usr/src/linux-2.4"
as the Linux source directory instead of the default "/usr/src/linux".
For more detailed information on configuration, building and installing,
see the PCMCIA-HOWTO.
To build the default drivers, which support Hermes-II in station mode, run
the Build script:
% ./Build
This script determines whether your system uses in-kernel PCMCIA and either
builds the full PCMCIA package or just the driver.
Before installing the driver with the Install script, you must become
'root':
% su
..
% ./Install
This script determines whether your system uses in-kernel PCMCIA and either
installs the full PCMCIA package or just the driver.
5) If it becomes necessary to clean the build, issue the following
commands:
% make clean
% make -C lib clean
4.3 Build the driver for PCI
1) Extract the wlags49 to the current working directory.
% tar xzvf wl_lkm_7_22.tar.gz
Note: there is no need to unpack the driver source into a PCMCIA build
directory.
2) To build the PCI driver:
% make -f wlags49.mk wlags49_h2_pci
or
% make -f wlags49.mk wlags49_h25_pci
3) Install the driver.
% insmod ./wireless/wlags49_h25.o
4) If it becomes necessary to clean the build.
% make -f wlags49.mk pci_clean
4.4 Configure your Wireless PC Card
There are 3 ways to configure the driver
- module parameters (/etc/pcmcia/config.opts)
- wireless extension (/etc/pcmcia/wireless.opts)
- Agere configuration file (/etc/agere/iwconfig-eth#)
4.4.1 Configure through /etc/pcmcia/config.opts
To use this method, make sure that /etc/pcmcia/wireless.opts file is either
absent or contains blank parameter values as shown below.
*,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
INFO=""
ESSID=""
MODE=""
KEY=""
;;
1) To configure the Wireless PC Card, please refer to:
* The online manual page (wlags49.4)
% man wlags49
* The network adapter sections of the PCMCIA documentation.
% more PCMCIA-HOWTO
2) Use an editor to configure the module parameters:
# vi /etc/pcmcia/config.opts
a) To connect your computer to a wireless infrastructure that includes
access points such as the AP-1000 or AP-500, you need to identify the
network name of the wireless infrastructure.
For example if your infrastructure uses the network name "My Network",
edit the config.opts file to include the following:
module "<driver_name>" opts "network_name=My\ Network"
Notice that the space character needs to be escaped with a backslash.
b) To connect your computer to a Residential Gateway RG-1000, you need
to know the RG ID (=network_name) and the encryption key. You can find
the RG ID on a small label on the rear of the unit.
For example if your RG-1000 has ID 225ccf and you did not change the
encryption key yet, edit the config.opts file to include the following:
module "<driver_name>" opts "network_name=\"225ccf\" key_1=\"25ccf\"
enable_encryption=Y"
If you changed your encryption key, you should specify this key as key_1
on the parameter line.
c) To connect your computer to a peer-to-peer network, in an environment
without access points, the IBSS mode is recommended.
For example to connect to a peer-to-peer network called "My Network",
enter the following in the config.opts file:
module "<driver_name>" opts "create_ibss=Y network_name=My\ Network"
d) Optionally you can also include a "Station Name" value that can be
used to indentify your computer on the wireless network.
For example if you wish to name your computer "Wave1" when connecting it
to a wireless infrastructure, edit the config.opts file to include the
following:
module "<driver_name>" opts "network_name=Ocean station_name=Wave1"
e) To connect your computer to an Ad-Hoc workgroup of wireless
computers, enter the following in the config.opts file:
module "<driver_name>" opts "port_type=3"
Note that the "Ad-Hoc Demo Mode" is not the recommended mode for a
peer-to-peer network. The configuration of this non-interoperable mode
is only explained here for special applications (e.g. research, or
compatibility with other / previous WaveLAN/IEEE products).
The IBSS mode described in c) is the preferred and interoperable mode
for creating a peer-to-peer network.
3) Use an editor to modify the network options for your adapter.
# vi /etc/pcmcia/network.opts
The parameters need to be correct for the connected network. Check with
your system administrator for the correct network information. Refer to
the PCMCIA-HOWTO for more configuration information.
For example:
*,*,*,*)
IF_PORT=""
BOOTP="n"
IPADDR="10.0.0.5"
NETMASK="255.255.255.0"
NETWORK="10.0.0.0"
BROADCAST="10.0.0.255"
GATEWAY="10.0.0.1"
DOMAIN="domain.org"
DNS_1="dns1.domain.org"
;;
RedHat and Suse do not use the network.opts to configure the driver.
Instead RedHat uses a GUI-based tool called 'neat' ('net.cfg' in older
versions) and SuSE Linux uses 'YaST'. These tools creates scripts, like
ifcfg-eth0, in the directory /etc/sysconfig/network-scripts. Using the
default GNOME menu, you can start netcfg from: Programs->System->Network
Configuration.
4) Restart the PCMCIA services.
# /etc/rc.d/rc.pcmcia restart
or
# /etc/rc.d/init.d/pcmcia restart
For a more detailed description about the various configuration options and
definitions, please consult the Wireless documentation.
4.4.2 Configure through /etc/pcmcia/wireless.opts
This driver has support for the "Wireless Extensions". This interface
allows the "Wireless Tools" to get statistics from the driver and allows to
change the configuration of the driver on the fly.
The latest versions of the PCMCIA package contain scripts that use the
wireless extension to configure the driver as an alternative to the
configuration through module parameters as described in section 4.4.1.
Read the /etc/pcmcia/wireless.opts file for the theory of operation. When
the driver is configured, go to section 4.4.1 step 3 to configure the
network parameters.
For more information, refer to the following WEB pages:
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
4.4.3 Configure through /etc/agere/iwconfig-eth#
In addition to using either the module options or the wireless extensions
methods to configure a wireless device, this version of the software also
supports an Agere specific implementation. This was done because:
* Module options configures multiple devices the same.
* Wireless extensions parameters do not cover all of the available options
in the driver.
For each wireless ethernet device (identified by eth<n>, where n is a
positive integer), a file /etc/agere/iwconfig-eth<n> can be created which
contains configuration information for a wireless device. For example, the
file /etc/agere/iwconfig-eth1 is the config file for eth1. This file should
contain Key/Value pairs in the format:
<Key>=<Value>
where <Key> is the parameter to configure and <Value> is the value to
assign it. For example, if the config file /etc/agere/iwconfig-eth1
described above contains the following:
DesiredSSID=some_network
EnableEncryption=Y
Key1=net01
TxKey=1
this configures eth1 to associate to the ESSID 'some_network' with
encryption on, where the the first encryption key is 'net01' and the key to
use for encryption is Key 1.
Note that this only works on Agere hardware which uses this driver. For
other wireless drivers, or non-wireless devices, this file can be present,
but has no effect.
Please refer to the man page for more information on this configuration
file and the parameters that can be set.
4.5 Configuring your Wireless PCI card
Note that the above method of configuring the card using
/etc/pcmcia/config.opts is only valid for PCMCIA/CF cards. For [mini]PCI
and CardBus cards, refer to your system's documentation on modules.conf to
load the driver with the proper options for a given wireless ethernet
interface. In addition, network configuration tools like 'netcfg', 'neat',
or 'YaST' (see Section 4.4.1, Step 3) can be used to configure the miniPCI
card. Lastly, the Agere configuration file described in Section 4.4.3 may
also be used for [mini]PCI and CardBus devices.
4.6 Troubleshooting
When the Wireless PC Card is inserted, the card manager emit beeps in
different tones to indicate success or failure of particular configuration
steps.
a) Two high beeps
- The card was identified and configured successfully.
b) One high beep followed by a low beep
- The card was identified, but could not be configured.
- Examine the system log (dmesg) for PCMCIA error or warning messages.
c) One low beep
- The card could not be identified.
- Execute "cardctl ident" to display the adapter PnP information.
Verify the PnP information matches an entry in the PCMCIA
configuration file (/etc/pcmcia/config).
- Examine the system log (dmesg) for PCMCIA error or warning messages.
The Wireless PC Card has two LEDs that indicate the state of the adapter
and network.
* Power LED (toward the middle of the adapter)
- This LED indicates power has been applied, and the card is
functional. In normal operation mode with Card Power Management
disabled, it is steady-on. With Card Power Management enabled, it
blinks rapidly (several times per second).
* Transmit/Receive LED (closer to the edge of the adapter)
- This LED flashes when it detects transmit or receive packets.
* Both LEDs blink at the same time every 10 seconds.
- The adapter was unable to make contact with the named wireless
network. Verify the network_name, in the config.opts file matches the
network name of the access point.
* LEDs indicate normal operation with the Power LED
steady-on or blinking rapidly and Transmit/Receive LED flashing, but no
traffic.
- If the network is operating in normal mode (ie. port_type = 0 or not
specified), and a network_name has been specified, verify the
workstation network parameters (ifconfig, route, etc.) are correct
for the wireless network.
- If the network is operating in Ad-Hoc (peer-to-peer) mode (ie.
port_type = 3), the adapter needs another workstation/adapter to
communicate with. Verify the network parameters on both of the
workstations (ifconfig, route, etc.) are correct.
Refer to the online manual page for additional configuration, feature and
support information.
% man wlags49
or
% man 4 wlags49
or
% nroff -man wlags49.4 | more
4.7 Identifying the software
This section explains how to identify the version of this software once it
is unpacked or installed.
The Linux Driver Source/Library distribution consist of two main
components, the driver source and the HCF module.
* To quickly identify the version of the source, type:
% grep DRV.*VERSION include/wireless/wl_version.h
#define DRV_MAJOR_VERSION 7
#define DRV_MINOR_VERSION 22
* To identify the revision of the HCF library contained in the driver,
type:
% grep HCF.Revision hcf/hcf.c
#define HCF_VERSION TEXT( "HCF$Revision: 1.8 $" )
To identify a compiled wlags49 driver, go to the directory where the driver
is located. Card Services drivers (wlags49_h2_cs.o and wlags49_h25_cs.o)
are located in:
/lib/modules/<kernel-version>/pcmcia
PCI drivers (wlags49_h2.o) are located in:
/lib/modules/<kernel-version>/kernel/drivers/net
* To retrieve the version of the source used to compile the driver, type:
% strings <driver_name>.o | grep Agere
<driver_name> v7.22-abg-Beta for PCMCIA
<driver_name> v7.22-abg-Beta for PCI
* Likewise, to retrieve the revision of the HCF used to compile the driver,
type:
% strings <driver_name>.o | grep Revision
HCF$Revision: 5.15
At startup the wlags49 driver reports its version in the system log file
(/var/log/messages).
------------------------------------------------------------------------------
5. TECHNICAL CONSTRAINTS
At the time of release of this software, the following constraints are
identified:
5.1 Using the ISA adapter
Description: To allow operation in desktop computers Agere also provides an
optional ISA bus to PC Card adapter (also referred to as "swapbox").
This ISA Adapter can be configured for two different I/O Address values:
* 3E2 (factory-set default)
* 3E0
Impact: By default the i82365 module of the Linux pcmcia package only
probes at 3E0.
Actions:
1) Read the manual page on the probing of the i82365 module, by typing the
command:
man i82365
2) Apply one of the two following options:
a) Change the I/O address strapping of the ISA adapter by replacing the
jumper on the ISA adapter. The correct jumper setting is pictured in
the electronic "Wireless ISA Adapter, Getting Started Guide" provided
on the Wireless Software CD-ROM. This guide is provided in Adobe's
Acrobat PDF format.
b) Alternatively, you can load the i82365 module with the
"extra_sockets" parameter set to 1.
On a RedHat 5.x thru 7.x, system, put this in the file
"/etc/sysconfig/pcmcia":
PCMCIA=yes
PCIC=i82365
PCIC_OPTS="extra_sockets=1"
CORE_OPTS=
CARDMGR_OPTS=
For other Linux distributions, you are advised to consult the
"PCMCIA-HOWTO" notes for information about changing the I/O Address
probing.
5.2 Using the PCI Adapter
Description: To allow operation in desktop computers Agere also provides an
optional PCI bus to PC Card adapter (also referred to as "swapbox").
For correct interrupt assignment, the system should support PCIBIOS 2.2.
It is recommended to use PCMCIA package version 3.2.7 or higher.
The default configuration of the interrupt routing method of the PCI
Adapter's TI CardBus Controller is incorrect.
Actions:
1) Read the manual page on the "Options specific for TI CardBus
Controllers" of the i82365 module, by typing the command:
man i82365
2) Load the i82365 module with the "irq_mode" parameter set to 0.
On a RedHat 5.x thru 7.x system, put this in the file
"/etc/sysconfig/pcmcia":
PCMCIA=yes
PCIC=i82365
PCIC_OPTS="irq_mode=0"
CORE_OPTS=
CARDMGR_OPTS=
For the location of the PCMCIA scripts on other Linux distributions, you
are advised to consult the "PCMCIA-HOWTO", "Notes about specific Linux
distributions".
------------------------------------------------------------------------------
6. KNOWN ISSUES
This is the current list of known issues for this release, and will be
addressed in the near future:
1. This driver release contains a version of Hermes-II.5 firmware which
REQUIRES calibrated cards. If there is no calibration data present in the
PDA of the hardware, the firmware does not operate.
2. WDS is not yet supported.
3. DMA is not yet supported.
4. WPA is not yet supported.
5. 32-bits I/O is not yet supported.
6. The current Build script also builds the PCI drivers.
7. The current Install script also copies the PCI drivers to the lib
directory.
8. If F/W files are required from outside this release, the entry points
inside these F/W files have to be renamed from "ap" and "station" to
"fw_image" and they have to be renamed to fw_h2.c and fw_h25.c for
Hermes-II and Hermes-II.5.
------------------------------------------------------------------------------
7. TECHNICAL SUPPORT
7.1 Finding Information
On the Agere Systems Web Site you can find the most recent device drivers,
software updates and user documentation.
World Wide Web: http://www.agere.com
7.2 Contact Technical Support
If you encounter problems when installing or using this product, or would
like information about our other "Wireless" products, please contact your
local Authorized "Wireless" Reseller or Agere Systems sales office.
Addresses and telephone numbers of the Agere Systems sales offices are
listed on our Agere Systems web site.
When contacting Technical Support, please use the Problem Report Form and
send it to us by Fax or E-Mail. The Problem Report Form 'REPORT.TXT'
(Plain text format) is included on the disk. Alternatively, you can
download the Problem Report Form from the Agere Systems web site.
Include Product Name, Serial Number and software version number with each
request to help the Support Group helping you.
==============================================================================
END OF FILE

View File

@ -0,0 +1,3 @@
These sources are shared with the wlags49_h25 driver. Some files are even
exclusively used by that driver. Do not delete them here without looking
at that other driver.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,229 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* This file contains definitions and macros for debugging.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/20 09:29:45 $
* $Revision: 1.3 $
* $Source: /usr/local/cvs/wl_lkm/include/hcf/debug.h,v $
*
******************************************************************************/
#ifndef _DEBUG_H
#define _DEBUG_H
/* Turn on debugging here if not done with a preprocessor define */
#ifndef DBG
#define DBG 0
#else
#undef DBG
#define DBG 1
#endif //DBG
#if DBG
/****************************************************************************/
/* Set the level of debugging if not done with a preprocessor define. See
wl_main.c, init_module() for how the debug level translates into the
the types of messages displayed */
#ifndef DBG_LVL
#define DBG_LVL 5 /* yields nothing via init_module,
original value of 5 yields DBG_TRACE_ON and DBG_VERBOSE_ON */
#endif // DBG_LVL
#define DBG_ERROR_ON 0x00000001L
#define DBG_WARNING_ON 0x00000002L
#define DBG_NOTICE_ON 0x00000004L
#define DBG_TRACE_ON 0x00000008L
#define DBG_VERBOSE_ON 0x00000010L
#define DBG_PARAM_ON 0x00000020L
#define DBG_BREAK_ON 0x00000040L
#define DBG_RX_ON 0x00000100L
#define DBG_TX_ON 0x00000200L
#define DBG_DS_ON 0x00000400L
#define DBG_DEFAULTS (DBG_ERROR_ON | DBG_WARNING_ON | DBG_BREAK_ON)
#define DBG_FLAGS(A) (A)->DebugFlag
#define DBG_NAME(A) (A)->dbgName
#define DBG_LEVEL(A) (A)->dbgLevel
#ifndef PRINTK
# define PRINTK(S...) printk(S)
#endif // PRINTK
#ifndef DBG_PRINT
# define DBG_PRINT(S...) PRINTK(KERN_DEBUG S)
#endif // DBG_PRINT
#ifndef DBG_PRINTC
# define DBG_PRINTC(S...) PRINTK(S)
#endif // DBG_PRINTC
#ifndef DBG_TRAP
# define DBG_TRAP {}
#endif // DBG_TRAP
#define _ENTER_STR ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
#define _LEAVE_STR "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
#define _DBG_ENTER(A) DBG_PRINT("%s:%.*s:%s\n",DBG_NAME(A),++DBG_LEVEL(A),_ENTER_STR,__FUNC__)
#define _DBG_LEAVE(A) DBG_PRINT("%s:%.*s:%s\n",DBG_NAME(A),DBG_LEVEL(A)--,_LEAVE_STR,__FUNC__)
#define DBG_FUNC(F) static const char *__FUNC__ = F;
#define DBG_ENTER(A) {if (DBG_FLAGS(A) & DBG_TRACE_ON) _DBG_ENTER(A);}
#define DBG_LEAVE(A) {if (DBG_FLAGS(A) & DBG_TRACE_ON) _DBG_LEAVE(A);}
#define DBG_PARAM(A,N,F,S...) {if (DBG_FLAGS(A) & DBG_PARAM_ON) \
DBG_PRINT(" %s -- "F"\n",N,S);}
#define DBG_ERROR(A,S...) {if (DBG_FLAGS(A) & DBG_ERROR_ON) \
{DBG_PRINT("%s:ERROR:%s ",DBG_NAME(A),__FUNC__);DBG_PRINTC(S);DBG_TRAP;}}
#define DBG_WARNING(A,S...) {if (DBG_FLAGS(A) & DBG_WARNING_ON) \
{DBG_PRINT("%s:WARNING:%s ",DBG_NAME(A),__FUNC__);DBG_PRINTC(S);}}
#define DBG_NOTICE(A,S...) {if (DBG_FLAGS(A) & DBG_NOTICE_ON) \
{DBG_PRINT("%s:NOTICE:%s ",DBG_NAME(A),__FUNC__);DBG_PRINTC(S);}}
#define DBG_TRACE(A,S...) do {if (DBG_FLAGS(A) & DBG_TRACE_ON) \
{DBG_PRINT("%s:%s ",DBG_NAME(A),__FUNC__);DBG_PRINTC(S);}} while (0)
#define DBG_RX(A,S...) {if (DBG_FLAGS(A) & DBG_RX_ON) \
{DBG_PRINT(S);}}
#define DBG_TX(A,S...) {if (DBG_FLAGS(A) & DBG_TX_ON) \
{DBG_PRINT(S);}}
#define DBG_DS(A,S...) {if (DBG_FLAGS(A) & DBG_DS_ON) \
{DBG_PRINT(S);}}
#define DBG_ASSERT(C) {if (!(C)) \
{DBG_PRINT("ASSERT(%s) -- %s#%d (%s)\n", \
#C,__FILE__,__LINE__,__FUNC__); \
DBG_TRAP;}}
typedef struct {
char *dbgName;
int dbgLevel;
unsigned long DebugFlag;
} dbg_info_t;
/****************************************************************************/
#else // DBG
/****************************************************************************/
#define DBG_DEFN
#define DBG_TRAP
#define DBG_FUNC(F)
#define DBG_PRINT(S...)
#define DBG_ENTER(A)
#define DBG_LEAVE(A)
#define DBG_PARAM(A,N,F,S...)
#define DBG_ERROR(A,S...)
#define DBG_WARNING(A,S...)
#define DBG_NOTICE(A,S...)
#define DBG_TRACE(A,S...)
#define DBG_RX(A,S...)
#define DBG_TX(A,S...)
#define DBG_DS(A,S...)
#define DBG_ASSERT(C)
#endif // DBG
/****************************************************************************/
#endif // _DEBUG_H

View File

@ -0,0 +1,390 @@
// vim:tw=110:ts=4:
/**************************************************************************************************************
*
* FILE : DHF.C
*
* DATE : $Date: 2004/07/19 08:16:14 $ $Revision: 1.2 $
* Original : 2004/05/28 14:05:34 Revision: 1.36 Tag: hcf7_t20040602_01
* Original : 2004/05/11 06:22:57 Revision: 1.32 Tag: hcf7_t7_20040513_01
* Original : 2004/04/15 09:24:42 Revision: 1.28 Tag: hcf7_t7_20040415_01
* Original : 2004/04/08 15:18:16 Revision: 1.27 Tag: t7_20040413_01
* Original : 2004/04/01 15:32:55 Revision: 1.25 Tag: t7_20040401_01
* Original : 2004/03/10 15:39:28 Revision: 1.21 Tag: t20040310_01
* Original : 2004/03/04 11:03:37 Revision: 1.19 Tag: t20040304_01
* Original : 2004/03/02 09:27:11 Revision: 1.17 Tag: t20040302_03
* Original : 2004/02/24 13:00:28 Revision: 1.15 Tag: t20040224_01
* Original : 2004/02/19 10:57:28 Revision: 1.14 Tag: t20040219_01
* Original : 2003/11/27 09:00:09 Revision: 1.3 Tag: t20021216_01
*
* AUTHOR : John Meertens
* Nico Valster
*
* SPECIFICATION: ........
*
* DESC : generic functions to handle the download of NIC firmware
* Local Support Routines for above procedures
*
* Customizable via HCFCFG.H, which is included by HCF.H
*
*
* DHF is (intended to be) platform-independent.
* DHF is a module that provides a number of routines to download firmware
* images (the names primary, station, access point, secondary and tertiary
* are used or have been used) to volatile or nonvolatile memory
* in WaveLAN/IEEE NICs. To achieve this DHF makes use of the WaveLAN/IEEE
* WCI as implemented by the HCF-module.
*
* Download to non-volatile memory is used to update a WaveLAN/IEEE NIC to new
* firmware. Normally this will be an upgrade to newer firmware, although
* downgrading to older firmware is possible too.
*
* Note: relative to Asserts, the following can be observed:
* Since the IFB is not known inside the routine, the macro HCFASSERT is replaced with MMDASSERT.
* Also the line number reported in the assert is raised by FILE_NAME_OFFSET (10000) to discriminate the
* DHF Asserts from HCF and MMD asserts.
*
***************************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 1999 - 2000 by Lucent Technologies. All Rights Reserved
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
**************************************************************************************************************/
#include "hcf.h"
#include "hcfdef.h"
#include "dhf.h"
#include "mmd.h"
//to distinguish MMD from HCF asserts by means of line number
#undef FILE_NAME_OFFSET
#define FILE_NAME_OFFSET MMD_FILE_NAME_OFFSET
/*-----------------------------------------------------------------------------
*
* Defines, data structures, and global variables
*
*---------------------------------------------------------------------------*/
// 12345678901234
char signature[14] = "FUPU7D37dhfwci";
//The binary download function "relocates" the image using constructions like:
// fw->identity = (CFG_IDENTITY_STRCT FAR *)((char FAR *)fw->identity + (hcf_32)fw );
//under some of the memory models under MSVC 1.52 these constructions degrade to 16-bits pointer arithmetic.
//fw->identity is limited, such that adding it to fw, does not need to carry over from offset to segment.
//However the segment is not set at all.
//As a workaround the PSEUDO_CHARP macro is introduced which is a char pointer except for MSVC 1.52, in
//which case we know that a 32-bit quantity is adequate as a pointer.
//Note that other platforms may experience comparable problems when using the binary download feature.
#if defined(_MSC_VER) && _MSC_VER == 800 // Visual C++ 1.5
#define PSEUDO_CHARP hcf_32
#else
#define PSEUDO_CHARP hcf_8*
#endif
/*-----------------------------------------------------------------------------
*
* LTV-records retrieved from the NIC to:
* - determine compatibility between NIC and image
* - ((setup the buffer size dynamically for non-volatile download (see note below) ))
* - supply plugging information contained in the PDA (H-I only)
*
*---------------------------------------------------------------------------*/
// for USB/H1 we needed a smaller value than the CFG_DL_BUF_STRCT reported 8192
// for the time being it seems simpler to always use 2000 for USB/H1 as well as all other cases rather than
// using the "fixed anyway" CFG_DL_BUF_STRCT.
#define DL_SIZE 2000
//CFG_IDENTITY_STRCT pri_identity = { LOF(CFG_IDENTITY_STRCT), CFG_PRI_IDENTITY };
CFG_SUP_RANGE_STRCT mfi_sup = { LOF(CFG_SUP_RANGE_STRCT), CFG_NIC_MFI_SUP_RANGE };
CFG_SUP_RANGE_STRCT cfi_sup = { LOF(CFG_SUP_RANGE_STRCT), CFG_NIC_CFI_SUP_RANGE };
/* Note: could be used rather than the above explained and defined DL_SIZE if need arises
* CFG_DL_BUF_STRCT dl_buf = { LOF(CFG_DL_BUF_STRCT), CFG_DL_BUF };
*/
/*-----------------------------------------------------------------------------
* Array ltv_info stores NIC information (in the form of LTV-records)
* needed for download. A NULL record indicates the end of the array.
*---------------------------------------------------------------------------*/
/* The LTV_INFO_STRUCT is needed to save the sizes of the structs, because after a GET_INFO()
* the len field is changed to the real len of the RID by the called routine.
* This is only relevant if the DHF used without reloading the driver/utility.
*/
LTV_INFO_STRUCT ltv_info[] = {
{ (LTVP)&mfi_sup, LOF(CFG_SUP_RANGE_STRCT) } ,
{ (LTVP)&cfi_sup, LOF(CFG_SUP_RANGE_STRCT) } ,
{ (LTVP) NULL, 0 }
};
/***********************************************************************************************************/
/*************************************** PROTOTYPES ******************************************************/
/***********************************************************************************************************/
static int check_comp_fw( memimage *fw );
/************************************************************************************************************
*.SUBMODULE int check_comp_fw( memimage *fw )
*.PURPOSE Checks compatibility of CFI and MFI, NIC as supplier, station/AP firmware image as supplier.
*
*.ARGUMENTS
* fw F/W image to be downloaded
*
*.RETURNS
* HFC_SUCCESS - firmware OK
* DHF_ERR_INCOMP_FW
*
*.DESCRIPTION
* This function uses compatibility and identity information that has been
* retrieved from the card which is currently inserted to check whether the
* station firmware image to be downloaded is compatible.
*.ENDDOC END DOCUMENTATION
*************************************************************************************************************/
int
check_comp_fw( memimage *fw )
{
CFG_RANGE20_STRCT *p;
int rc = HCF_SUCCESS;
CFG_RANGE_SPEC_STRCT* i;
switch( fw->identity->typ ) {
case CFG_FW_IDENTITY: //Station F/W
case COMP_ID_FW_AP_FAKE: //;?is this useful (used to be: CFG_AP_IDENTITY)
break;
default:
MMDASSERT( DO_ASSERT, fw->identity->typ ) //unknown/unsupported firmware_type:
rc = DHF_ERR_INCOMP_FW;
return rc; /* ;? how useful is this anyway,
* till that is sorted out might as well violate my own single exit principle
*/
}
p = fw->compat;
i = NULL;
while( p->len && i == NULL ) { // check the MFI ranges
if ( p->typ == CFG_MFI_ACT_RANGES_STA ) {
i = mmd_check_comp( (void*)p, &mfi_sup );
}
p++;
}
MMDASSERT( i, 0 ) //MFI: NIC Supplier not compatible with F/W image Actor
if ( i ) {
p = fw->compat;
i = NULL;
while ( p->len && i == NULL ) { // check the CFI ranges
if ( p->typ == CFG_CFI_ACT_RANGES_STA ) {
i = mmd_check_comp( (void*)p, &cfi_sup );
}
p++;
}
MMDASSERT( i, 0 ) //CFI: NIC Supplier not compatible with F/W image Actor
}
if ( i == NULL ) {
rc = DHF_ERR_INCOMP_FW;
}
return rc;
} // check_comp_fw
/*-----------------------------------------------------------------------------
*
* Exported functions
*
*---------------------------------------------------------------------------*/
/*************************************************************************************************************
*
*.MODULE int dhf_download_binary( void *ifbp, memimage *fw )
*.PURPOSE Downloads a complete (primary, station, or access point) firmware image to the NIC.
*
*.ARGUMENTS
* ifbp address of the Interface Block
* fw F/W image to be downloaded
*
*.RETURNS
* HCF_SUCCESS - download completed successfully.
* DHF_ERR_INCOMP_FW - firmware not compatible
*
*.DESCRIPTION
* Initialize global variables
* Connect to the DHF
* Check the compatibility of the image (For primary firmware images it is checked first
* whether download is necessary).
* If everything's download the firmware.
* Disconnect from the DHF.
*
*
*.DIAGRAM
*
*.NOTICE:
MMDASSERT is unacceptable because some drivers call dhf_download_binary before hcf_connect
* The old comment was:
*.ENDDOC END DOCUMENTATION
*************************************************************************************************************/
int
dhf_download_binary( memimage *fw )
{
int rc = HCF_SUCCESS;
CFG_PROG_STRCT *p;
int i;
//validate the image
for ( i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++ ) /*NOP*/;
if ( i != sizeof(signature) ||
fw->signature[i] != 0x01 ||
//test for Little/Big Endian Binary flag
fw->signature[i+1] != ( /*HCF_BIG_ENDIAN ? 'B' : */ 'L' ) ) rc = DHF_ERR_INCOMP_FW;
else { //Little Endian Binary format
fw->codep = (CFG_PROG_STRCT FAR *)((PSEUDO_CHARP)fw->codep + (hcf_32)fw );
fw->identity = (CFG_IDENTITY_STRCT FAR *)((PSEUDO_CHARP)fw->identity + (hcf_32)fw );
fw->compat = (CFG_RANGE20_STRCT FAR *)((PSEUDO_CHARP)fw->compat + (hcf_32)fw );
for ( i = 0; fw->p[i]; i++ ) fw->p[i] = ((PSEUDO_CHARP)fw->p[i] + (hcf_32)fw );
p = fw->codep;
while ( p->len ) {
p->host_addr = (PSEUDO_CHARP)p->host_addr + (hcf_32)fw;
p++;
}
}
return rc;
} // dhf_download_binary
/*************************************************************************************************************
*
*.MODULE int dhf_download_fw( void *ifbp, memimage *fw )
*.PURPOSE Downloads a complete (primary or tertiary) firmware image to the NIC.
*
*.ARGUMENTS
* ifbp address of the Interface Block
* fw F/W image to be downloaded
*
*.RETURNS
* HCF_SUCCESS - download completed successfully.
* HCF_ERR_NO_NIC - no NIC present
* DHF_ERR_INCOMP_FW - firmware not compatible
*
*.DESCRIPTION
* - check the signature of the image
* - get the compatibility information from the components on the NIC
* - Primary Firmware Identity
* - Modem - Firmware I/F
* - Controller - Firmware I/F
*!! - if necessary ( i.e. H-I) get the PDA contents from the NIC
* - check the compatibility of the MFI and CFI of the NIC with the F/W image
* Note: the Primary F/W compatibility is only relevant for the "running" HCF and is already verified in
* hcf_connect
*!! - if necessary ( i.e. H-I)
*!! - verify the sumcheck of the PDA
*!! - plug the image (based on the PDA and the default plug records)
* - loop over all the download LTVs in the image which consists of a sequence of
* - CFG_PROG_VOLATILE/CFG_PROG_NON_VOLATILE
* - 1 or more sequences of CFG_PROG_ADDR, CFG_PROG_DATA,....,CFG_PROG_DATA
* - CFG_PROG_STOP
*
*.DIAGRAM
*
*.NOTICE
* The old comment was:
* // Download primary firmware if necessary and allowed. This is done silently (without telling
* // the user) and only if the firmware in the download image is newer than the firmware in the
* // card. In Major version 4 of the primary firmware functions of Hermes and Shark were
* // combined. Prior to that two separate versions existed. We only have to download primary
* // firmware if major version of primary firmware in the NIC < 4.
* // download = pri_identity.version_major < 4;
* // if ( download ) {
* // rc = check_comp_primary( fw );
* // }
* It is my understanding that Pri Variant 1 must be updated by Pri Variant 2. The test on
* major version < 4 should amount to the same result but be "principally" less correct
* In deliberation with the Architecture team, it was decided that this upgrade for old H-I
* NICs, is an aspect which belongs on the WSU level not on the DHF level
*
*.ENDDOC END DOCUMENTATION
*************************************************************************************************************/
int
dhf_download_fw( void *ifbp, memimage *fw )
{
int rc = HCF_SUCCESS;
LTV_INFO_STRUCT_PTR pp = ltv_info;
CFG_PROG_STRCT *p = fw->codep;
LTVP ltvp;
int i;
MMDASSERT( fw != NULL, 0 )
//validate the image
for ( i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++ ) /*NOP*/;
if ( i != sizeof(signature) ||
fw->signature[i] != 0x01 ||
//check for binary image
( fw->signature[i+1] != 'C' && fw->signature[i+1] != ( /*HCF_BIG_ENDIAN ? 'B' : */ 'L' ) ) )
rc = DHF_ERR_INCOMP_FW;
// Retrieve all information needed for download from the NIC
while ( ( rc == HCF_SUCCESS ) && ( ( ltvp = pp->ltvp) != NULL ) ) {
ltvp->len = pp++->len; // Set len to original len. This len is changed to real len by GET_INFO()
rc = GET_INFO( ltvp );
MMDASSERT( rc == HCF_SUCCESS, rc )
MMDASSERT( rc == HCF_SUCCESS, ltvp->typ )
MMDASSERT( rc == HCF_SUCCESS, ltvp->len )
}
if ( rc == HCF_SUCCESS ) rc = check_comp_fw( fw );
if ( rc == HCF_SUCCESS ) {
while ( rc == HCF_SUCCESS && p->len ) {
rc = PUT_INFO( p );
p++;
}
}
MMDASSERT( rc == HCF_SUCCESS, rc )
return rc;
} // dhf_download_fw

View File

@ -0,0 +1,226 @@
// vim:tw=110:ts=4:
#ifndef DHF_H
#define DHF_H
/**************************************************************************************************************
*
* FILE : DHF.H
*
* DATE : $Date: 2004/07/19 08:16:14 $ $Revision: 1.2 $
* Original : 2004/05/17 07:33:13 Revision: 1.25 Tag: hcf7_t20040602_01
* Original : 2004/05/11 06:03:14 Revision: 1.24 Tag: hcf7_t7_20040513_01
* Original : 2004/04/15 09:24:42 Revision: 1.22 Tag: hcf7_t7_20040415_01
* Original : 2004/04/09 14:35:52 Revision: 1.21 Tag: t7_20040413_01
* Original : 2004/04/01 15:32:55 Revision: 1.18 Tag: t7_20040401_01
* Original : 2004/03/10 15:39:28 Revision: 1.15 Tag: t20040310_01
* Original : 2004/03/04 11:03:38 Revision: 1.13 Tag: t20040304_01
* Original : 2004/02/25 14:14:37 Revision: 1.11 Tag: t20040302_03
* Original : 2004/02/24 13:00:28 Revision: 1.10 Tag: t20040224_01
* Original : 2004/02/19 10:57:28 Revision: 1.8 Tag: t20040219_01
*
* AUTHOR : John Meertens
* Nico Valster
*
* SPECIFICATION: .........
*
* DESC : structure definitions and function prototypes for unit DHF.
*
* Customizable via HCFCFG.H, which is included indirectly via HCF.H
*
***************************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
* COPYRIGHT © 1999 - 2000 by Lucent Technologies. All Rights Reserved
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
**************************************************************************************************************/
#ifdef _WIN32_WCE
#include <windef.h>
#endif
#include "hcf.h" // includes HCFCFG.H too
#ifdef DHF_UIL
#define GET_INFO( pp ) uil_get_info( (LTVP)pp )
#define PUT_INFO( pp ) uil_put_info( (LTVP)pp )
#else
#define GET_INFO( pp ) hcf_get_info( ifbp, (LTVP)pp )
#define PUT_INFO( pp ) hcf_put_info( ifbp, (LTVP)pp )
#endif
/*---- Defines --------------------------------------------------------------*/
#define CODEMASK 0x0000FFFFL // Codemask for plug records
/*---- Error numbers --------------------------------------------------------*/
#define DHF_ERR_INCOMP_FW 0x40 //Image not compatible with NIC
/*---- Type definitions -----------------------------------------------------*/
//* needed by dhf_wrap.c
//
typedef struct {
LTVP ltvp;
hcf_16 len;
} LTV_INFO_STRUCT , *LTV_INFO_STRUCT_PTR;
/*
* Type: plugrecord
*
* Abstract: This structure represents a Plug Data Record.
*
* Description:
* This structure is used to overlay the plug records in the firmware memory image.
*/
typedef struct {
hcf_32 code; // Code to plug
hcf_32 addr; // Address within the memory image to plug it in
hcf_32 len; // The # of bytes which are available to store it
} plugrecord;
/*
* Type: stringrecord
*
* Abstract: This structure represents a Firmware debug/assert string
*
* Description:
* This structure is used to get assert and debug outputs in the driver and/or utility to be
* able to get more visability of the FW.
*/
#define MAX_DEBUGSTRINGS 1024
#define MAX_DEBUGSTRING_LEN 82
typedef struct {
hcf_32 id;
char str[MAX_DEBUGSTRING_LEN];
} stringrecord;
/*
* Type: exportrecord
*
* Abstract: This structure represents a Firmware export of a variable
*
* Description:
* This structure is used to get the address and name of a FW variable.
*/
#define MAX_DEBUGEXPORTS 2048
#define MAX_DEBUGEXPORT_LEN 12
typedef struct {
hcf_32 id;
char str[MAX_DEBUGEXPORT_LEN];
} exportrecord;
// Offsets in memimage array p[]
#define FWSTRINGS_FUNCTION 0
#define FWEXPORTS_FUNCTION 1
/*
* Type: memimage
*
* Abstract: The "root" description of a complete memory image
*
* Description:
* This type represents an entire memory image. The image is built up of several
* segments. These segments need not be contiguous areas in memory, in other words
* the image may contain 'holes'.
*
* The 'codep' field points to an array of segment_descriptor structures.
* The end of the array is indicated by a segment_descriptor of which all fields are zero.
* The 'execution' field is a 32-bit address representing the execution address
* of the firmware within the memory image. This address is zero in case of non-volatile
* memory download.
* The 'compat' field points to an array of TODO
* The end of the array is indicated by a plug record of which all fields are zero.
* The 'identity' field points to an array of TODO
* The end of the array is indicated by a plug record of which all fields are zero.
* The Hermes-I specific 'pdaplug' field points to an array of Production Data Plug record structures.
* The end of the array is indicated by a plug record of which all fields are zero.
* The Hermes-I specific 'priplug' field points to an array of Primary Information Plug record structures.
* The end of the array is indicated by a plug record of which all fields are zero.
*/
typedef struct {
char signature[14+1+1]; // signature (see DHF.C) + C/LE-Bin/BE-Bin-flag + format version
CFG_PROG_STRCT FAR *codep; //
hcf_32 execution; // Execution address of the firmware
void FAR *place_holder_1;
void FAR *place_holder_2;
CFG_RANGE20_STRCT FAR *compat; // Pointer to the compatibility info records
CFG_IDENTITY_STRCT FAR *identity; // Pointer to the identity info records
void FAR *p[2]; /* (Up to 9) pointers for (future) expansion
* currently in use:
* - F/W printf information
*/
} memimage;
/*-----------------------------------------------------------------------------
*
* DHF function prototypes
*
*---------------------------------------------------------------------------*/
EXTERN_C int dhf_download_fw( void *ifbp, memimage *fw ); // ifbp, ignored when using the UIL
EXTERN_C int dhf_download_binary( memimage *fw );
/*-----------------------------------------------------------------------------
*
* Functions to be provided by the user of the DHF module.
*
*---------------------------------------------------------------------------*/
// defined in DHF.C; see there for comments
EXTERN_C hcf_16 *find_record_in_pda( hcf_16 *pdap, hcf_16 code );
#endif // DHF_H

View File

@ -0,0 +1,175 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* This file contains DHF configuration info.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 07:08:33 $
* $Revision: 1.1.1.1 $
* $Source: /usr/local/cvs/wl_lkm/include/hcf/dhfcfg.h,v $
*
******************************************************************************/
#ifndef DHFCFG_H
#define DHFCFG_H
/*-----------------------------------------------------------------------------
* File DHFCFG.H
*
* Contents: #defines for the DHF module
*
* Comments:
* Some combinations of the #defines in this file are illegal (as noted below).
* If an illegal combinations of #defines is specified a compile error is
* generated. See document DHFUG.DOC for more information.
*
* Author: John Meertens
* Date: 11-01-2000
*
* Change history:
*---------------------------------------------------------------------------*/
// Define DHF_WCI if you want to use the WCI to access the ORiNOCO card.
// Define DHF_UIL if you want to use the UIL to access the ORiNOCO card.
// You must define either DHF_WCI or DHF_UIL. If neither of the two is defined
// or both a compile error is generated.
#define DHF_WCI
//!!!#define DHF_UIL
// Define DHF_BIG_ENDIAN if you are working on a big endian platform.
// Define DHF_LITTLE_ENDIAN if you are working on a little endian platform.
// You must define either DHF_BIG_ENDIAN or DHF_LITTLE_ENDIAN. If neither of
// the two is defined or both a compile error is generated.
#ifdef USE_BIG_ENDIAN
#define DHF_BIG_ENDIAN
#else
#define DHF_LITTLE_ENDIAN
#endif /* USE_BIG_ENDIAN */
// Define DHF_WIN if you are working on Windows platform.
// Define DHF_DOS if you are working on DOS.
// You must define either DHF_WIN or DHF_DOS. If neither of
// the two is defined or both a compile error is generated.
//!!!#define DHF_WIN
//!!!#define DHF_DOS
// Define if you want the DHF to users. Not defining DHF_GET_RES_MSG
// leads to a decrease in code size as message strings are not included.
//!!!#define DHF_GET_RES_MSG
// Linux driver specific
// Prevent inclusion of stdlib.h and string.h
#define _INC_STDLIB
#define _INC_STRING
//-----------------------------------------------------------------------------
// Define one or more of the following DSF #defines if you want to implement
// the related DSF-function. Function dsf_callback must allways be implemented.
// See file DHF.H for prototypes of the functions.
// Define DSF_ALLOC if you want to manage memory allocation and de-allocation
// for the DHF. If DSF_ALLOC is defined you must implement dsf_alloc and dsf_free.
//!!!#define DSF_ALLOC
// Define DSF_CONFIRM if you want the DHF to ask the user for confirmation in a
// number of situations. If DSF_CONFIRM is defined you must implement dsf_confirm.
// Not defining DSF_CONFIRM leads to a decrease in code size as confirmation
// strings are not included.
//!!!#define DSF_CONFIRM
// Define DSF_DEBUG_MESSAGE if you want debug messages added to your output.
// If you define DSF_DEBUG_MESSAGE then you must implement function
// dsf_debug_message.
//#define DSF_DEBUG_MESSAGE
// Define DSF_ASSERT if you want asserts to be activated.
// If you define DSF_ASSERT then you must implement function dsf_assert.
//#define DBG 1
//#define DSF_ASSERT
// Define DSF_DBWIN if you want asserts and debug messages to be send to a debug
// window like SOFTICE or DebugView from SysInternals.
//!!!#define DSF_DBWIN
//!!! Not implemented yet!
// Define DSF_VOLATILE_ONLY if you only wants to use valatile functions
// This is a typical setting for a AP and a driver.
#define DSF_VOLATILE_ONLY
// Define DSF_HERMESII if you want to use the DHF for the Hermes-II
#ifdef HERMES2
#define DSF_HERMESII
#else
#undef DSF_HERMESII
#endif // HERMES2
// Define DSF_BINARY_FILE if you want to use the DHF in combination with
// reading the Firmware from a separate binary file.
//!!!#define DSF_BINARY_FILE
#endif // DHFCFG_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,405 @@
// vim:tw=110:ts=4:
#ifndef HCF_H
#define HCF_H 1
/************************************************************************************************************
*
* FILE : hcf.h
*
* DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.7 $
* Original: 2004/05/19 07:26:01 Revision: 1.56 Tag: hcf7_t20040602_01
* Original: 2004/05/12 08:47:23 Revision: 1.53 Tag: hcf7_t7_20040513_01
* Original: 2004/04/15 09:24:42 Revision: 1.46 Tag: hcf7_t7_20040415_01
* Original: 2004/04/08 15:18:16 Revision: 1.45 Tag: t7_20040413_01
* Original: 2004/04/01 15:32:55 Revision: 1.43 Tag: t7_20040401_01
* Original: 2004/03/10 15:39:28 Revision: 1.39 Tag: t20040310_01
* Original: 2004/03/04 11:03:38 Revision: 1.37 Tag: t20040304_01
* Original: 2004/03/02 14:51:21 Revision: 1.35 Tag: t20040302_03
* Original: 2004/02/24 13:00:28 Revision: 1.28 Tag: t20040224_01
* Original: 2004/02/09 14:50:14 Revision: 1.26 Tag: t20040219_01
*
* AUTHOR : Nico Valster
*
* SPECIFICATION: ..........
*
* DESC : Definitions and Prototypes for MSF as well as HCF sources
*
* Customizable via HCFCFG.H
*
*
**************************************************************************************************************
**************************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
* COPYRIGHT © 1996 - 2000 by Lucent Technologies. All Rights Reserved
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
*************************************************************************************************************/
#include "hcfcfg.h" // System Constants to be defined by the MSF-programmer to tailor the HCF
#include "mdd.h" // Include file common for HCF, MSF
/************************************************************************************************/
/************************************** MACROS ************************************************/
/************************************************************************************************/
#define LOF(x) (sizeof(x)/sizeof(hcf_16)-1)
/* Endianess
* Little Endian (a.k.a. Intel), least significant byte first
* Big Endian (a.k.a. Motorola), most significant byte first
*
* The following macros are supplied
* o CNV_LITTLE_TO_SHORT(w) interprets the 16-bits input value as Little Endian, returns an hcf_16
* o CNV_BIG_TO_SHORT(w) interprets the 16-bits input value as Big Endian, returns an hcf_16
*
*/
/* To increase portability, use unsigned char and unsigned char * when accessing parts of larger
* types to convert their Endianess
*/
#define CNV_END_SHORT(w) (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
#define CNV_END_LONG(dw) (hcf_32)( (dw >> 24) | ((dw >> 8) & 0xff00) | ((dw << 8) & 0xff0000) | (dw << 24) )
#if HCF_BIG_ENDIAN
//******************************************** B I G E N D I A N *******************************************
#define CNV_LITTLE_TO_SHORT(w) CNV_END_SHORT(w) // endianess conversion needed
#define CNV_BIG_TO_SHORT(w) (w) // no endianess conversion needed
#define CNV_LITTLE_TO_LONG(dw) CNV_END_LONG(dw)
#define CNV_LONG_TO_LITTLE(dw) CNV_END_LONG(dw)
#else
//****************************************** L I T T L E E N D I A N ****************************************
#define CNV_LITTLE_TO_SHORT(w) (w) // no endianess conversion needed
#define CNV_BIG_TO_SHORT(w) CNV_END_SHORT(w) // endianess conversion needed
#define CNV_LITTLE_TO_LONG(dw) (dw)
#define CNV_LONG_TO_LITTLE(dw) (dw)
#if defined HCF_ALIGN && HCF_ALIGN > 1
#define CNV_SHORTP_TO_LITTLE(pw) ((hcf_16)(*(hcf_8 *)pw)) | ((hcf_16)(*((hcf_8 *)pw+1)) << 8)
#define CNV_LONGP_TO_LITTLE(pdw) ((hcf_32)(*(hcf_8 *)pdw)) | ((hcf_32)(*((hcf_8 *)pdw+1)) << 8) | \
((hcf_32)(*((hcf_8 *)pdw+2)) << 16) | ((hcf_32)(*((hcf_8 *)pdw+3)) << 24)
#else
#define CNV_LONGP_TO_LITTLE(pdw) (*(hcf_32 *)pdw)
#define CNV_SHORTP_TO_LITTLE(pw) (*(hcf_16 *)pw)
#endif
#endif // HCF_BIG_ENDIAN
// conversion macros which can be expressed in other macros
#define CNV_SHORT_TO_LITTLE(w) CNV_LITTLE_TO_SHORT(w)
#define CNV_SHORT_TO_BIG(w) CNV_BIG_TO_SHORT(w)
/************************************************************************************************/
/************************************** END OF MACROS *****************************************/
/************************************************************************************************/
/***********************************************************************************************************/
/***************** ****************************************/
/***********************************************************************************************************/
// offsets Transmit/Receive Frame Structure
#define HFS_STAT 0x0000
#define HFS_SWSUP 0x0006 //SW Support
#define HFS_Q_INFO 0x0006 //Signal/Silence level
#define HFS_RATE 0x0008 //RxFlow/Rate
#define HFS_STAT_ERR RX_STAT_ERR //link "natural" HCF name to "natural" MSF name
#define HFS_TX_CNTL 0x0036
// H-I H-II
#define HFS_DAT_LEN (HFS_ADDR_DEST - 2) // 0x002C 0x0038
#define HFS_ADDR_DEST 0x003A // 0x002E 0x003A
#define HFS_ADDR_SRC (HFS_ADDR_DEST + 6) // 0x0034 0x0040
#define HFS_LEN (HFS_ADDR_SRC + 6) // 0x003A 0x0046
#define HFS_DAT (HFS_LEN + 2) // 0x003C 0x0048
#define HFS_TYPE (HFS_DAT + 6) // 0x0042 0x004E
//============================= D E S C R I P T O R S T R U C T U R E ==============================
//;?MDD.H stuff ;?
#if HCF_BIG_ENDIAN
#define DESC_STRCT_CNT 0
#define DESC_STRCT_SIZE 1
#else
#define DESC_STRCT_CNT 1
#define DESC_STRCT_SIZE 0
#endif // HCF_BIG_ENDIAN
#define BUF_CNT buf_dim[DESC_STRCT_CNT]
#define BUF_SIZE buf_dim[DESC_STRCT_SIZE]
typedef struct DESC_STRCT {
hcf_16 buf_dim[2];
hcf_32 buf_phys_addr;
hcf_32 next_desc_phys_addr; // physical address of next descriptor
hcf_32 desc_phys_addr; // physical address of this descriptor
struct DESC_STRCT *next_desc_addr;
hcf_8 FAR *buf_addr;
#if (HCF_EXT) & HCF_EXT_DESC_STRCT
void FAR *DESC_MSFSup; // pointer for arbitrary use by the MSF
#endif // HCF_DESC_STRCT_EXT
} DESC_STRCT;
#define HCF_DASA_SIZE 12 //size in bytes for DA/SA
#define DESC_CNT_MASK 0x0FFF
#define GET_BUF_SIZE(descp) ((descp)->BUF_SIZE)
#define GET_BUF_CNT(descp) ((descp)->BUF_CNT)
#define SET_BUF_SIZE(descp, size) (descp)->BUF_SIZE = size;
#define SET_BUF_CNT(descp, count) (descp)->BUF_CNT = count;
//========================================= T A L L I E S ===================================================
typedef struct { //Hermes Tallies (IFB substructure)
hcf_32 TxUnicastFrames;
hcf_32 TxMulticastFrames;
hcf_32 TxFragments;
hcf_32 TxUnicastOctets;
hcf_32 TxMulticastOctets;
hcf_32 TxDeferredTransmissions;
hcf_32 TxSingleRetryFrames;
hcf_32 TxMultipleRetryFrames;
hcf_32 TxRetryLimitExceeded;
hcf_32 TxDiscards;
hcf_32 RxUnicastFrames;
hcf_32 RxMulticastFrames;
hcf_32 RxFragments;
hcf_32 RxUnicastOctets;
hcf_32 RxMulticastOctets;
hcf_32 RxFCSErrors;
hcf_32 RxDiscardsNoBuffer;
hcf_32 TxDiscardsWrongSA;
hcf_32 RxWEPUndecryptable;
hcf_32 RxMsgInMsgFragments;
hcf_32 RxMsgInBadMsgFragments;
hcf_32 RxDiscardsWEPICVError;
hcf_32 RxDiscardsWEPExcluded;
#if (HCF_EXT) & HCF_EXT_TALLIES_FW
hcf_32 TalliesExtra[32];
#endif // HCF_EXT_TALLIES_FW
} CFG_HERMES_TALLIES_STRCT;
typedef struct { //HCF Tallies (IFB substructure)
hcf_32 NoBufInfo; //No buffer available for unsolicited Notify frame
hcf_32 NoBufMB; //No space available in MailBox
hcf_32 MiscErr; /* Command errors
* - time out on completion synchronous part Hermes Command
* - completed Hermes Command doesn't match original command
* - status of completed Hermes Command contains error bits
*/
#if (HCF_EXT) & HCF_EXT_TALLIES_FW
hcf_32 EngCnt[8];
#endif // HCF_EXT_TALLIES_FW
} CFG_HCF_TALLIES_STRCT;
//Note this way to define ..._TAL_CNT implies that all tallies must keep the same (hcf_32) size
#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
#if (HCF_TALLIES) & HCF_TALLIES_NIC //Hermes tally support
#define HCF_NIC_TAL_CNT (sizeof(CFG_HERMES_TALLIES_STRCT)/ sizeof(hcf_32))
#else
#define HCF_NIC_TAL_CNT 0
#endif // HCF_TALLIES
#if (HCF_TALLIES) & HCF_TALLIES_HCF //HCF tally support
#define HCF_HCF_TAL_CNT (sizeof(CFG_HCF_TALLIES_STRCT) / sizeof(hcf_32))
#else
#define HCF_HCF_TAL_CNT 0
#endif // HCF_TALLIES
#define HCF_TOT_TAL_CNT ( HCF_NIC_TAL_CNT + HCF_NIC_TAL_CNT )
#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
/***********************************************************************************************************/
/********************************** I N T E R F A C E B L O C K ******************************************/
/***********************************************************************************************************/
#define IFB_VERSION 0x0E // initially 0, to be incremented by every IFB layout change
typedef struct {
hcf_io IFB_IOBase; // I/O address of Hermes chip as passed by MSF at hcf_connect call
hcf_16 IFB_IORange; // I/O Range used by Hermes chip
hcf_16 IFB_DLMode; // Download Mode state
hcf_16 IFB_Cmd; // cmd in progress flag, to be ack-ed before next cmd can be issued
hcf_16 IFB_RxFID; // FID of "current" RxFS (non-DMA mode)
//;?#if tx_delay option
hcf_16 IFB_TxFID; // fid storage during "delayed" send
//;?#endif tx_delay option
hcf_16 IFB_RxLen; //
hcf_16 IFB_DefunctStat; // BAP initialization or Cmd Completion failed
hcf_16 IFB_ErrCmd; // contents Status reg when error bits and/or mismatch in cmd_wait
hcf_16 IFB_ErrQualifier; // contents Resp0 reg when error bits and/or mismatch in cmd_wait
hcf_16 IFB_lal; // LookAhead Length
wci_bufp IFB_lap; // LookAhead Buffer pointer
hcf_16 IFB_LinkStat; // Link Status
hcf_16 IFB_DSLinkStat; // Link Status, new strategy introduced for DeepSleep
hcf_16 IFB_CarryIn; // carry and carry-flag to move 1 byte from one get_frag to the next
hcf_16 IFB_CarryOut; // carry and carry-flag to move 1 byte from one put_frag to the next
hcf_16 IFB_Version; // IFB_VERSION, incremented by every SIGNIFICANT IFB layout change
hcf_16 IFB_CardStat; // NIC error / F/W incompatibility status
hcf_16 IFB_RscInd; // non-DMA: TxFID available, DMA: always 1
hcf_16 IFB_CntlOpt; // flags: 32 bits I/O, DMA available, DMA enabled
hcf_16 IFB_BusType; // BusType, derived via CFG_NIC_BUS_TYPE
CFG_FW_IDENTITY_STRCT IFB_FWIdentity; /* keep FWIdentity/Sup and PRIIdentity/Sup in sequence
* because of the (dumb) copy in init() */
#if defined MSF_COMPONENT_ID
CFG_SUP_RANGE_STRCT IFB_FWSup;
CFG_PRI_IDENTITY_STRCT IFB_PRIIdentity;
CFG_SUP_RANGE_STRCT IFB_PRISup;
CFG_SUP_RANGE_STRCT IFB_HSISup;
#endif // MSF_COMPONENT_ID
#if (HCF_EXT) & HCF_EXT_INFO_LOG
RID_LOGP IFB_RIDLogp; // pointer to RID_LOG structure
#endif // HCF_EXT_INFO_LOG
#if HCF_PROT_TIME
hcf_32 IFB_TickIni; // initialization of S/W counter based protection loop
#endif // HCF_PROT_TIME
#if (HCF_EXT) & HCF_EXT_INT_TICK
int IFB_TickCnt; // Hermes Timer Tick Counter
#endif // HCF_EXT_INT_TICK
#if (HCF_EXT) & HCF_EXT_MB
hcf_16 *IFB_MBp; // pointer to the MailBox
hcf_16 IFB_MBSize; // size of the MailBox
hcf_16 IFB_MBWp; // zero-based write index into the MailBox
hcf_16 IFB_MBRp; // zero-based read index into the MailBox
hcf_16 IFB_MBInfoLen; // contents of L-field of the oldest available MailBoxInfoBlock
#endif // HCF_EXT_MB
#if (HCF_TYPE) & HCF_TYPE_WPA
hcf_16 IFB_MICTxCntl; // MIC bit and Key index in TxControl field of TxFS
hcf_32 IFB_MICTxKey[2]; // calculating key
hcf_32 IFB_MICTx[2]; // Tx MIC calculation Engine state
hcf_16 IFB_MICTxCarry; // temp length, carries over from one Tx fragment to another
hcf_16 IFB_MICRxCarry; // temp length, carries over from one Rx fragment to another
hcf_32 IFB_MICRxKey[4*2]; // 4 checking keys
hcf_32 IFB_MICRx[2]; // Rx MIC calculation Engine state
#endif // HCF_TYPE_WPA
#if HCF_ASSERT
#if (HCF_ASSERT) & HCF_ASSERT_MB
CFG_MB_INFO_RANGE1_STRCT IFB_AssertStrct; // Add some complication to the HCF as prize for the new MSF I/F
#endif // HCF_ASSERT_MB
// target of above IFB_AssertStrct
hcf_16 IFB_AssertLine; // - line number ( + encoded module name )
hcf_16 IFB_AssertTrace; // - bit based trace of all hcf_.... invocations
hcf_32 IFB_AssertQualifier; // - qualifier
hcf_16 IFB_AssertLvl; // Assert Filtering, Not yet implemented
hcf_16 IFB_AssertWhere; // Where parameter of the Assert macro
#if (HCF_ASSERT) & ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN )
MSF_ASSERT_RTNP IFB_AssertRtn; // MSF Assert Call back routine (inspired by GEF, DrDobbs Nov 1998 )
#endif // HCF_ASSERT_LNK_MSF_RTN
#if (HCF_ASSERT) & HCF_ASSERT_PRINTF // engineering facilty intended as F/W debugging aid
hcf_16 IFB_DbgPrintF_Cnt;
CFG_FW_PRINTF_BUFFER_LOCATION_STRCT IFB_FwPfBuff;
#endif // HCF_ASSERT_PRINTF
#endif // HCF_ASSERT
#if ! defined HCF_INT_OFF
hcf_16 volatile IFB_IntOffCnt; // 0xFFFF based HCF_ACT_INT_OFF nesting counter, DeepSleep flag
#endif // HCF_INT_OFF
#if (HCF_TYPE) & HCF_TYPE_CCX
hcf_16 IFB_CKIPStat; // CKIP Status flag
#endif // HCF_TYPE_CCX
#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF ) //Hermes and/or HCF tally support
hcf_32 IFB_Silly_you_should_align; //;?
hcf_16 IFB_TallyLen; // Tally length (to build an LTV)
hcf_16 IFB_TallyTyp; // Tally Type (to build an LTV)
#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
#if (HCF_TALLIES) & HCF_TALLIES_NIC //Hermes tally support
CFG_HERMES_TALLIES_STRCT IFB_NIC_Tallies;
#endif // HCF_TALLIES_NIC
#if (HCF_TALLIES) & HCF_TALLIES_HCF //HCF tally support
CFG_HCF_TALLIES_STRCT IFB_HCF_Tallies;
#endif // HCF_TALLIES_HCF
#if HCF_DMA
//used for a pool of destination_address descriptor/buffers, used during tx encapsulation points to the
//first/last descriptor in the descriptor chain, so we can easily remove and append a packet.
DESC_STRCT *IFB_FirstDesc[2];
DESC_STRCT *IFB_LastDesc[2];
DESC_STRCT *IFB_ConfinedDesc[2]; // pointers to descriptor used for host reclaim purposes.
hcf_16 IFB_DmaPackets; // HREG_EV_[TX/RX]DMA_DONE flags, reports DMA Frame availability to MSF
#endif // HCF_DMA
#if (HCF_EXT) & HCF_EXT_INT_TX_EX
hcf_16 IFB_TxFsStat; // Tx message monitoring
hcf_16 IFB_TxFsGap[2]; //;?make this robust
hcf_16 IFB_TxFsSwSup;
#endif // HCF_EXT_INT_TX_EX
hcf_16 IFB_Magic; /* "Magic" signature, to help the debugger interpret a memory dump
* also the last field cleared at hcf_connect
*/
#if (HCF_EXT) & HCF_EXT_IFB_STRCT // for usage by the MSF
void FAR *IFB_MSFSup; // pointer for arbitrary use by the MSF
#endif // HCF_EXT_IFB_STRCT_EXT
} IFB_STRCT;
typedef IFB_STRCT* IFBP;
/***********************************************************************************************************/
/********************** W C I F U N C T I O N S P R O T O T Y P E S ******************************/
/***********************************************************************************************************/
EXTERN_C int hcf_action (IFBP ifbp, hcf_16 cmd );
EXTERN_C int hcf_connect (IFBP ifbp, hcf_io io_base );
#if (HCF_ENCAP) & HCF_ENC_SUP
EXTERN_C hcf_8 hcf_encap (wci_bufp type );
#endif // HCF_ENC_SUP
EXTERN_C int hcf_get_info (IFBP ifbp, LTVP ltvp );
EXTERN_C int hcf_service_nic (IFBP ifbp, wci_bufp bufp, unsigned int len );
EXTERN_C int hcf_cntl (IFBP ifbp, hcf_16 cmd );
EXTERN_C int hcf_put_info (IFBP ifbp, LTVP ltvp );
EXTERN_C int hcf_rcv_msg (IFBP ifbp, DESC_STRCT *descp, unsigned int offset );
EXTERN_C int hcf_send_msg (IFBP ifbp, DESC_STRCT *dp, hcf_16 tx_cntl );
#if HCF_DMA
EXTERN_C void hcf_dma_tx_put (IFBP ifbp, DESC_STRCT *d, hcf_16 tx_cntl );
EXTERN_C DESC_STRCT* hcf_dma_tx_get (IFBP ifbp );
EXTERN_C DESC_STRCT* hcf_dma_rx_get (IFBP ifbp );
EXTERN_C void hcf_dma_rx_put (IFBP ifbp, DESC_STRCT *d );
#endif // HCF_DMA
#if (HCF_ASSERT) & HCF_ASSERT_LNK_MSF_RTN
EXTERN_C void msf_assert (unsigned int line_number, hcf_16 trace, hcf_32 qual );
#endif // HCF_ASSERT_LNK_MSF_RTN
#endif // HCF_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,809 @@
// vim:tw=110:ts=4:
#ifndef HCFDEFC_H
#define HCFDEFC_H 1
/*************************************************************************************************
*
* FILE : HCFDEF.H
*
* DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.8 $
* Original: 2004/05/28 14:05:35 Revision: 1.59 Tag: hcf7_t20040602_01
* Original: 2004/05/13 15:31:45 Revision: 1.53 Tag: hcf7_t7_20040513_01
* Original: 2004/04/15 09:24:42 Revision: 1.44 Tag: hcf7_t7_20040415_01
* Original: 2004/04/13 14:22:45 Revision: 1.43 Tag: t7_20040413_01
* Original: 2004/04/01 15:32:55 Revision: 1.40 Tag: t7_20040401_01
* Original: 2004/03/10 15:39:28 Revision: 1.36 Tag: t20040310_01
* Original: 2004/03/03 14:10:12 Revision: 1.34 Tag: t20040304_01
* Original: 2004/03/02 09:27:12 Revision: 1.32 Tag: t20040302_03
* Original: 2004/02/24 13:00:29 Revision: 1.29 Tag: t20040224_01
* Original: 2004/02/18 17:13:57 Revision: 1.26 Tag: t20040219_01
*
* AUTHOR : Nico Valster
*
* SPECIFICATION: ...........
*
* DESC : Definitions and Prototypes for HCF only
*
**************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
* COPYRIGHT © 1996 - 2000 by Lucent Technologies. All Rights Reserved
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
*************************************************************************************************/
/************************************************************************************************/
/********************************* P R E F I X E S ********************************************/
/************************************************************************************************/
//IFB_ Interface Block
//HCMD_ Hermes Command
//HFS_ Hermes (Transmit/Receive) Frame Structure
//HREG_ Hermes Register
/*************************************************************************************************/
#if 0 //
#define BIT0 0x0001
#define BIT1 0x0002
#define BIT2 0x0004
#define BIT3 0x0008
#define BIT4 0x0010
#define BIT5 0x0020
#define BIT6 0x0040
#define BIT7 0x0080
#define BIT8 0x0100
#define BIT9 0x0200
#define BIT10 0x0400
#define BIT11 0x0800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
#define BIT16 0x00010000
#define BIT17 0x00020000
#define BIT18 0x00040000
#define BIT19 0x00080000
#define BIT20 0x00100000
#define BIT21 0x00200000
#define BIT22 0x00400000
#define BIT23 0x00800000
#define BIT24 0x01000000
#define BIT25 0x02000000
#define BIT26 0x04000000
#define BIT27 0x08000000
#define BIT28 0x10000000
#define BIT29 0x20000000
#define BIT30 0x40000000
#define BIT31 0x80000000
#endif // 0
/************************************************************************************************/
/********************************* GENERAL EQUATES **********************************************/
/************************************************************************************************/
#define HCF_MAGIC 0x7D37 // "}7" Handle validation
#define PLUG_DATA_OFFSET 0x00000800 //needed by some test tool on top of H-II NDIS driver
#define INI_TICK_INI 0x00040000L
#define IO_IN 0 //hcfio_in_string
#define IO_OUT 1 //hcfio_out_string
//DO_ASSERT, create an artificial FALSE to force an ASSERT without the nasty compiler warning
#define DO_ASSERT ( assert_ifbp->IFB_Magic != HCF_MAGIC && assert_ifbp->IFB_Magic == HCF_MAGIC )
#define NT_ASSERT 0x0000 //, NEVER_TESTED
#define NEVER_TESTED MERGE_2( 0xEFFE, 0xFEEF )
#define SE_ASSERT 0x5EFF /* Side Effect, HCFASSERT invokation which are only called for the
* side effect and which should never trigger */
#define DHF_FILE_NAME_OFFSET 10000 //to distinguish DHF from HCF asserts by means of line number
#define MMD_FILE_NAME_OFFSET 20000 //to distinguish MMD from HCF asserts by means of line number
// trace codes used to
// 1: profile execution times via HCF_TRACE and HCF_TRACE_VALUE
// 2: hierarchical flow information via HCFLOGENTRY / HCFLOGEXIT
//#define HCF_TRACE_CONNECT useless
//#define HCF_TRACE_DISCONNECT useless
#define HCF_TRACE_ACTION 0x0000 // 0x0001
#define HCF_TRACE_CNTL 0x0001 // 0x0002
#define HCF_TRACE_DMA_RX_GET 0x0002 // 0x0004
#define HCF_TRACE_DMA_RX_PUT 0x0003 // 0x0008
#define HCF_TRACE_DMA_TX_GET 0x0004 // 0x0010
#define HCF_TRACE_DMA_TX_PUT 0x0005 // 0x0020
#define HCF_TRACE_GET_INFO 0x0006 // 0x0040
#define HCF_TRACE_PUT_INFO 0x0007 // 0x0080
#define HCF_TRACE_RCV_MSG 0x0008 // 0x0100
#define HCF_TRACE_SEND_MSG 0x0009 // 0x0200
#define HCF_TRACE_SERVICE_NIC 0x000A // 0x0400
// #define HCF_TRACE_ 0x000C // 0x1000
// #define HCF_TRACE_ 0x000D // 0x2000
// #define HCF_TRACE_ 0x000E // 0x4000
// #define HCF_TRACE_ 0x000F // 0x8000
// ============================================ HCF_TRACE_... codes below 0x0010 are asserted on re-entry
#define HCF_TRACE_ACTION_KLUDGE 0x0010 /* once you start introducing kludges there is no end to it
* this is an escape to do not assert on re-entrancy problem caused
* by HCF_ACT_INT_FORCE_ON used to get Microsofts NDIS drivers going
*/
#define HCF_TRACE_STRIO 0x0020
#define HCF_TRACE_ALLOC 0X0021
#define HCF_TRACE_DL 0X0023
#define HCF_TRACE_ISR_INFO 0X0024
#define HCF_TRACE_CALIBRATE 0x0026
#define HCF_TRACE_CMD_CPL 0x0040
#define HCF_TRACE_CMD_EXE 0x0041
#define HCF_TRACE_GET_FID 0x0042
#define HCF_TRACE_GET_FRAG 0x0043
#define HCF_TRACE_INIT 0x0044
#define HCF_TRACE_PUT_FRAG 0x0045
#define HCF_TRACE_SETUP_BAP 0x0046
#define HCF_TRACE_EXIT 0x8000 // Keil C warns "long constant truncated to int"
//#define BAP_0 HREG_DATA_0 //Used by DMA controller to access NIC RAM
#define BAP_1 HREG_DATA_1 //Used by HCF to access NIC RAM
//************************* Hermes Receive/Transmit Frame Structures
//HFS_STAT
//see MMD.H for HFS_STAT_ERR
#define HFS_STAT_MSG_TYPE 0xE000 //Hermes reported Message Type
#define HFS_STAT_MIC_KEY_ID 0x1800 //MIC key used (if any)
#define HFS_STAT_1042 0x2000 //RFC1042 Encoded
#define HFS_STAT_TUNNEL 0x4000 //Bridge-Tunnel Encoded
#define HFS_STAT_WMP_MSG 0x6000 //WaveLAN-II Management Protocol Frame
#if (HCF_TYPE) & HCF_TYPE_WPA
#define HFS_STAT_MIC 0x0010 //Frame contains MIC //;? re-instate when F/W ready
#endif
//************************* Hermes Register Offsets and Command bits
#define HREG_IO_RANGE 0x80 //I/O Range used by Hermes
//************************* Command/Status
#define HREG_CMD 0x00 //
#define HCMD_CMD_CODE 0x3F
#define HREG_PARAM_0 0x02 //
#define HREG_PARAM_1 0x04 //
#define HREG_PARAM_2 0x06 //
#define HREG_STAT 0x08 //
#define HREG_STAT_CMD_CODE 0x003F //
#define HREG_STAT_DIAG_ERR 0x0100
#define HREG_STAT_INQUIRE_ERR 0x0500
#define HREG_STAT_CMD_RESULT 0x7F00 //
#define HREG_RESP_0 0x0A //
#define HREG_RESP_1 0x0C //
#define HREG_RESP_2 0x0E //
//************************* FID Management
#define HREG_INFO_FID 0x10 //
#define HREG_RX_FID 0x20 //
#define HREG_ALLOC_FID 0x22 //
#define HREG_TX_COMPL_FID 0x24 //
//************************* BAP
//20031030 HWi Inserted this again because the dongle code uses this (GPIF.C)
//#define HREG_SELECT_0 0x18 //
//#define HREG_OFFSET_0 0x1C //
//#define HREG_DATA_0 0x36 //
//#define HREG_OFFSET_BUSY 0x8000 // use HCMD_BUSY
#define HREG_OFFSET_ERR 0x4000 //
//rsrvd #define HREG_OFFSET_DATA_OFFSET 0x0FFF //
#define HREG_SELECT_1 0x1A //
#define HREG_OFFSET_1 0x1E //
#define HREG_DATA_1 0x38 //
//************************* Event
#define HREG_EV_STAT 0x30 //
#define HREG_INT_EN 0x32 //
#define HREG_EV_ACK 0x34 //
#define HREG_EV_TICK 0x8000 //Auxiliary Timer Tick
//#define HREG_EV_RES 0x4000 //H-I only: H/W error (Wait Time-out)
#define HREG_EV_INFO_DROP 0x2000 //WMAC did not have sufficient RAM to build Unsollicited Frame
#if (HCF_TYPE) & HCF_TYPE_HII5
#define HREG_EV_ACK_REG_READY 0x0000
#else
#define HREG_EV_ACK_REG_READY 0x1000 //Workaround Kludge bit for H-II (not H-II.5)
#endif // HCF_TYPE_HII5
#if (HCF_SLEEP) & ( HCF_CDS | HCF_DDS )
#define HREG_EV_SLEEP_REQ 0x0800
#else
#define HREG_EV_SLEEP_REQ 0x0000
#endif // HCF_CDS / HCF_DDS
#if HCF_DMA
//#define HREG_EV_LPESC 0x0400 // firmware sets this bit and clears it, not for host usage.
#define HREG_EV_RDMAD 0x0200 // rx frame in host memory
#define HREG_EV_TDMAD 0x0100 // tx frame in host memory processed
//#define HREG_EV_RXDMA 0x0040 // firmware kicks off DMA engine (bit is not for host usage)
//#define HREG_EV_TXDMA 0x0020 // firmware kicks off DMA engine (bit is not for host usage)
#define HREG_EV_FW_DMA 0x0460 // firmware / DMA engine I/F (bits are not for host usage)
#else
#define HREG_EV_FW_DMA 0x0000
#endif // HCF_DMA
#define HREG_EV_INFO 0x0080 // Asynchronous Information Frame
#define HREG_EV_CMD 0x0010 // Command completed, Status and Response available
#define HREG_EV_ALLOC 0x0008 // Asynchronous part of Allocation/Reclaim completed
#define HREG_EV_TX_EXC 0x0004 // Asynchronous Transmission unsuccessful completed
#define HREG_EV_TX 0x0002 // Asynchronous Transmission successful completed
#define HREG_EV_RX 0x0001 // Asynchronous Receive Frame
#define HREG_EV_TX_EXT ( (HCF_EXT) & (HCF_EXT_INT_TX_EX | HCF_EXT_INT_TICK ) )
/* HREG_EV_TX_EXT := 0x0000 or HREG_EV_TX_EXC and/or HREG_EV_TICK
* could be extended with HREG_EV_TX */
#if HCF_EXT_INT_TX_EX != HREG_EV_TX_EXC
err: these values should match;
#endif // HCF_EXT_INT_TX_EX / HREG_EV_TX_EXC
#if HCF_EXT_INT_TICK != HREG_EV_TICK
err: these values should match;
#endif // HCF_EXT_INT_TICK / HREG_EV_TICK
//************************* Host Software
#define HREG_SW_0 0x28 //
#define HREG_SW_1 0x2A //
#define HREG_SW_2 0x2C //
//rsrvd #define HREG_SW_3 0x2E //
//************************* Control and Auxiliary Port
#define HREG_IO 0x12
#define HREG_IO_SRESET 0x0001
#define HREG_IO_WAKEUP_ASYNC 0x0002
#define HREG_IO_WOKEN_UP 0x0004
#define HREG_CNTL 0x14 //
//#define HREG_CNTL_WAKEUP_SYNC 0x0001
#define HREG_CNTL_AUX_ENA_STAT 0xC000
#define HREG_CNTL_AUX_DIS_STAT 0x0000
#define HREG_CNTL_AUX_ENA_CNTL 0x8000
#define HREG_CNTL_AUX_DIS_CNTL 0x4000
#define HREG_CNTL_AUX_DSD 0x2000
#define HREG_CNTL_AUX_ENA (HREG_CNTL_AUX_ENA_CNTL | HREG_CNTL_AUX_DIS_CNTL )
#define HREG_SPARE 0x16 //
#define HREG_AUX_PAGE 0x3A //
#define HREG_AUX_OFFSET 0x3C //
#define HREG_AUX_DATA 0x3E //
#if HCF_DMA
//************************* DMA (bus mastering)
// Be carefull to use these registers only at a genuine 32 bits NIC
// On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences
// thereof, e.g. HREG_DMA_CTRL register maps to HREG_CMD.
#define HREG_DMA_CTRL 0x0040
#define HREG_TXDMA_PTR32 0x0044
#define HREG_TXDMA_PRIO_PTR32 0x0048
#define HREG_TXDMA_HIPRIO_PTR32 0x004C
#define HREG_RXDMA_PTR32 0x0050
#define HREG_CARDDETECT_1 0x007C // contains 7D37
#define HREG_CARDDETECT_2 0x007E // contains 7DE7
#define HREG_FREETIMER 0x0058
#define HREG_DMA_RX_CNT 0x0026
/******************************************************************************
* Defines for the bits in the DmaControl register (@40h)
******************************************************************************/
#define HREG_DMA_CTRL_RXHWEN 0x80000000 // high word enable bit
#define HREG_DMA_CTRL_RXRESET 0x40000000 // tx dma init bit
#define HREG_DMA_CTRL_RXBAP1 BIT29
#define HREG_DMA_CTRL_RX_STALLED BIT28
#define HREG_DMA_CTRL_RXAUTOACK_DMADONE BIT27 // no host involvement req. for TDMADONE event
#define HREG_DMA_CTRL_RXAUTOACK_INFO BIT26 // no host involvement req. for alloc event
#define HREG_DMA_CTRL_RXAUTOACK_DMAEN 0x02000000 // no host involvement req. for TxDMAen event
#define HREG_DMA_CTRL_RXAUTOACK_RX 0x01000000 // no host involvement req. for tx event
#define HREG_DMA_CTRL_RX_BUSY BIT23 // read only bit
//#define HREG_DMA_CTRL_RX_RBUFCONT_PLAIN 0 // bits 21..20
//#define HREG_DMA_CTRL_RX_MODE_PLAIN_DMA 0 // mode 0
#define HREG_DMA_CTRL_RX_MODE_SINGLE_PACKET 0x00010000 // mode 1
#define HREG_DMA_CTRL_RX_MODE_MULTI_PACKET 0x00020000 // mode 2
//#define HREG_DMA_CTRL_RX_MODE_DISABLE (0x00020000|0x00010000) // disable tx dma engine
#define HREG_DMA_CTRL_TXHWEN 0x8000 // low word enable bit
#define HREG_DMA_CTRL_TXRESET 0x4000 // rx dma init bit
#define HREG_DMA_CTRL_TXBAP1 BIT13
#define HREG_DMA_CTRL_TXAUTOACK_DMADONE BIT11 // no host involvement req. for RxDMADONE event
#define HREG_DMA_CTRL_TXAUTOACK_DMAEN 0x00000400 // no host involvement req. for RxDMAen event
#define HREG_DMA_CTRL_TXAUTOACK_DMAALLOC 0x00000200 // no host involvement req. for info event
#define HREG_DMA_CTRL_TXAUTOACK_TX 0x00000100 // no host involvement req. for rx event
#define HREG_DMA_CTRL_TX_BUSY BIT7 // read only bit
//#define HREG_DMA_CTRL_TX_TBUFCONT_PLAIN 0 // bits 6..5
//#define HREG_DMA_CTRL_TX_MODE_PLAIN_DMA 0 // mode 0
#define HREG_DMA_CTRL_TX_MODE_SINGLE_PACKET BIT0 // mode 1
#define HREG_DMA_CTRL_TX_MODE_MULTI_PACKET 0x00000002 // mode 2
//#define HREG_DMA_CTRL_TX_MODE_DISABLE (0x00000001|0x00000002) // disable tx dma engine
//configuration DWORD to configure DMA for mode2 operation, using BAP0 as the DMA BAP.
#define DMA_CTRLSTAT_GO (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RX_MODE_MULTI_PACKET | \
HREG_DMA_CTRL_RXAUTOACK_DMAEN | HREG_DMA_CTRL_RXAUTOACK_RX | \
HREG_DMA_CTRL_TXHWEN | /*;?HREG_DMA_CTRL_TX_TBUFCONT_PLAIN |*/ \
HREG_DMA_CTRL_TX_MODE_MULTI_PACKET | HREG_DMA_CTRL_TXAUTOACK_DMAEN |\
HREG_DMA_CTRL_TXAUTOACK_DMAALLOC)
//configuration DWORD to reset both the Tx and Rx DMA engines
#define DMA_CTRLSTAT_RESET (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RXRESET | HREG_DMA_CTRL_TXHWEN | HREG_DMA_CTRL_TXRESET)
//#define DESC_DMA_OWNED 0x80000000 // BIT31
#define DESC_DMA_OWNED 0x8000 // BIT31
#define DESC_SOP 0x8000 // BIT15
#define DESC_EOP 0x4000 // BIT14
#define DMA_RX 0
#define DMA_TX 1
// #define IFB_RxFirstDesc IFB_FirstDesc[DMA_RX]
// #define IFB_TxFirstDesc IFB_FirstDesc[DMA_TX]
// #define IFB_RxLastDesc IFB_LastDesc[DMA_RX]
// #define IFB_TxLastDesc IFB_LastDesc[DMA_TX]
#endif // HCF_DMA
//
/************************************************************************************************/
/********************************** EQUATES ***************************************************/
/************************************************************************************************/
// Hermes Command Codes and Qualifier bits
#define HCMD_BUSY 0x8000 // Busy bit, applicable for all commands
#define HCMD_INI 0x0000 //
#define HCMD_ENABLE HCF_CNTL_ENABLE // 0x0001
#define HCMD_DISABLE HCF_CNTL_DISABLE // 0x0002
#define HCMD_CONNECT HCF_CNTL_CONNECT // 0x0003
#define HCMD_EXECUTE 0x0004 //
#define HCMD_DISCONNECT HCF_CNTL_DISCONNECT // 0x0005
#define HCMD_SLEEP 0x0006 //
#define HCMD_CONTINUE HCF_CNTL_CONTINUE // 0x0007
#define HCMD_RETRY 0x0100 // Retry bit
#define HCMD_ALLOC 0x000A //
#define HCMD_TX 0x000B //
#define HCMD_RECL 0x0100 // Reclaim bit, applicable for Tx and Inquire
#define HCMD_INQUIRE 0x0011 //
#define HCMD_ACCESS 0x0021 //
#define HCMD_ACCESS_WRITE 0x0100 // Write bit
#define HCMD_PROGRAM 0x0022 //
#define HCMD_READ_MIF 0x0030
#define HCMD_WRITE_MIF 0x0031
#define HCMD_THESEUS 0x0038
#define HCMD_STARTPREAMBLE 0x0E00 // Start continuous preamble Tx
#define HCMD_STOP 0x0F00 // Stop Theseus test mode
//Configuration Management
//
#define CFG_DRV_ACT_RANGES_PRI_3_BOTTOM 1 // Default Bottom Compatibility for Primary Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_PRI_3_TOP 1 // Default Top Compatibility for Primary Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_HSI_4_BOTTOM 1 // Default Bottom Compatibility for H/W - driver I/F
#define CFG_DRV_ACT_RANGES_HSI_4_TOP 1 // Default Top Compatibility for H/W - driver I/F
#define CFG_DRV_ACT_RANGES_HSI_5_BOTTOM 1 // Default Bottom Compatibility for H/W - driver I/F
#define CFG_DRV_ACT_RANGES_HSI_5_TOP 1 // Default Top Compatibility for H/W - driver I/F
#if (HCF_TYPE) & HCF_TYPE_WPA
#define CFG_DRV_ACT_RANGES_APF_1_BOTTOM 16 // Default Bottom Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_1_TOP 16 // Default Top Compatibility for AP Firmware - driver I/F
#else //;? is this REALLY O.K.
#define CFG_DRV_ACT_RANGES_APF_1_BOTTOM 1 // Default Bottom Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_1_TOP 1 // Default Top Compatibility for AP Firmware - driver I/F
#endif // HCF_TYPE_WPA
#define CFG_DRV_ACT_RANGES_APF_2_BOTTOM 2 // Default Bottom Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_2_TOP 2 // Default Top Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_3_BOTTOM 1 // Default Bottom Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_3_TOP 1 // Default Top Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_4_BOTTOM 1 // Default Bottom Compatibility for AP Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_APF_4_TOP 1 // Default Top Compatibility for AP Firmware - driver I/F
#if (HCF_TYPE) & HCF_TYPE_HII5
#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM 6 // Default Bottom Compatibility for Station Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_STA_2_TOP 6 // Default Top Compatibility for Station Firmware - driver I/F
#else // (HCF_TYPE) & HCF_TYPE_HII5
#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM 1 // Default Bottom Compatibility for Station Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_STA_2_TOP 2 // Default Top Compatibility for Station Firmware - driver I/F
#endif // (HCF_TYPE) & HCF_TYPE_HII5
#define CFG_DRV_ACT_RANGES_STA_3_BOTTOM 1 // Default Bottom Compatibility for Station Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_STA_3_TOP 1 // Default Top Compatibility for Station Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_STA_4_BOTTOM 1 // Default Bottom Compatibility for Station Firmware - driver I/F
#define CFG_DRV_ACT_RANGES_STA_4_TOP 1 // Default Top Compatibility for Station Firmware - driver I/F
//---------------------------------------------------------------------------------------------------------------------
#if defined HCF_CFG_PRI_1_TOP || defined HCF_CFG_PRI_1_BOTTOM
err: PRI_1 not supported for H-I; // Compatibility for Primary Firmware - driver I/F
#endif // HCF_CFG_PRI_1_TOP / HCF_CFG_PRI_1_BOTTOM
#if defined HCF_CFG_PRI_2_TOP || defined HCF_CFG_PRI_2_BOTTOM
err: PRI_2 not supported for H-I; // Compatibility for Primary Firmware - driver I/F
#endif // HCF_CFG_PRI_2_TOP / HCF_CFG_PRI_2_BOTTOM
#ifdef HCF_CFG_PRI_3_TOP // Top Compatibility for Primary Firmware - driver I/F
#if HCF_CFG_PRI_3_TOP == 0 || \
CFG_DRV_ACT_RANGES_PRI_3_BOTTOM <= HCF_CFG_PRI_3_TOP && HCF_CFG_PRI_3_TOP <= CFG_DRV_ACT_RANGES_PRI_3_TOP
#undef CFG_DRV_ACT_RANGES_PRI_3_TOP
#define CFG_DRV_ACT_RANGES_PRI_3_TOP HCF_CFG_PRI_3_TOP
#else
err: ;
#endif
#endif // HCF_CFG_PRI_3_TOP
#ifdef HCF_CFG_PRI_3_BOTTOM // Bottom Compatibility for Primary Firmware - driver I/F
#if CFG_DRV_ACT_RANGES_PRI_3_BOTTOM <= HCF_CFG_PRI_3_BOTTOM && HCF_CFG_PRI_3_BOTTOM <= CFG_DRV_ACT_RANGES_PRI_3_TOP
#undef CFG_DRV_ACT_RANGES_PRI_3_BOTTOM
#define CFG_DRV_ACT_RANGES_PRI_3_BOTTOM HCF_CFG_PRI_3_BOTTOM
#else
err: ;
#endif
#endif // HCF_CFG_PRI_3_BOTTOM
//---------------------------------------------------------------------------------------------------------------------
#if defined HCF_CFG_HSI_0_TOP || defined HCF_CFG_HSI_0_BOTTOM
err: HSI_0 not supported for H-I; // Compatibility for HSI I/F
#endif // HCF_CFG_HSI_0_TOP / HCF_CFG_HSI_0_BOTTOM
#if defined HCF_CFG_HSI_1_TOP || defined HCF_CFG_HSI_1_BOTTOM
err: HSI_1 not supported for H-I; // Compatibility for HSI I/F
#endif // HCF_CFG_HSI_1_TOP / HCF_CFG_HSI_1_BOTTOM
#if defined HCF_CFG_HSI_2_TOP || defined HCF_CFG_HSI_2_BOTTOM
err: HSI_2 not supported for H-I; // Compatibility for HSI I/F
#endif // HCF_CFG_HSI_2_TOP / HCF_CFG_HSI_2_BOTTOM
#if defined HCF_CFG_HSI_3_TOP || defined HCF_CFG_HSI_3_BOTTOM
err: HSI_3 not supported for H-I; // Compatibility for HSI I/F
#endif // HCF_CFG_HSI_3_TOP / HCF_CFG_HSI_3_BOTTOM
#ifdef HCF_CFG_HSI_4_TOP // Top Compatibility for HSI I/F
#if HCF_CFG_HSI_4_TOP == 0 || \
CFG_DRV_ACT_RANGES_HSI_4_BOTTOM <= CF_CFG_HSI_4_TOP && HCF_CFG_HSI_4_TOP <= CFG_DRV_ACT_RANGES_HSI_4_TOP
#undef CFG_DRV_ACT_RANGES_HSI_4_TOP
#define CFG_DRV_ACT_RANGES_HSI_4_TOP HCF_CFG_HSI_4_TOP
#else
err: ;
#endif
#endif // HCF_CFG_HSI_4_TOP
#ifdef HCF_CFG_HSI_4_BOTTOM // Bottom Compatibility for HSI I/F
#if CFG_DRV_ACT_RANGES_HSI_4_BOTTOM <= HCF_CFG_HSI_4_BOTTOM && HCF_CFG_HSI_4_BOTTOM <= CFG_DRV_ACT_RANGES_HSI_4_TOP
#undef CFG_DRV_ACT_RANGES_HSI_4_BOTTOM
#define CFG_DRV_ACT_RANGES_HSI_4_BOTTOM HCF_CFG_HSI_4_BOTTOM
#else
err: ;
#endif
#endif // HCF_CFG_HSI_4_BOTTOM
#ifdef HCF_CFG_HSI_5_TOP // Top Compatibility for HSI I/F
#if HCF_CFG_HSI_5_TOP == 0 || \
CFG_DRV_ACT_RANGES_HSI_5_BOTTOM <= CF_CFG_HSI_5_TOP && HCF_CFG_HSI_5_TOP <= CFG_DRV_ACT_RANGES_HSI_5_TOP
#undef CFG_DRV_ACT_RANGES_HSI_5_TOP
#define CFG_DRV_ACT_RANGES_HSI_5_TOP HCF_CFG_HSI_5_TOP
#else
err: ;
#endif
#endif // HCF_CFG_HSI_5_TOP
#ifdef HCF_CFG_HSI_5_BOTTOM // Bottom Compatibility for HSI I/F
#if CFG_DRV_ACT_RANGES_HSI_5_BOTTOM <= HCF_CFG_HSI_5_BOTTOM && HCF_CFG_HSI_5_BOTTOM <= CFG_DRV_ACT_RANGES_HSI_5_TOP
#undef CFG_DRV_ACT_RANGES_HSI_5_BOTTOM
#define CFG_DRV_ACT_RANGES_HSI_5_BOTTOM HCF_CFG_HSI_5_BOTTOM
#else
err: ;
#endif
#endif // HCF_CFG_HSI_5_BOTTOM
//---------------------------------------------------------------------------------------------------------------------
#if defined HCF_CFG_APF_1_TOP || defined HCF_CFG_APF_1_BOTTOM
err: APF_1 not supported for H-I; // Compatibility for AP Firmware - driver I/F
#endif // HCF_CFG_APF_1_TOP / HCF_CFG_APF_1_BOTTOM
#ifdef HCF_CFG_APF_2_TOP // Top Compatibility for AP Firmware - driver I/F
#if HCF_CFG_APF_2_TOP == 0 || \
CFG_DRV_ACT_RANGES_APF_2_BOTTOM <= HCF_CFG_APF_2_TOP && HCF_CFG_APF_2_TOP <= CFG_DRV_ACT_RANGES_APF_2_TOP
#undef CFG_DRV_ACT_RANGES_APF_2_TOP
#define CFG_DRV_ACT_RANGES_APF_2_TOP HCF_CFG_APF_2_TOP
#else
err: ;
#endif
#endif // HCF_CFG_APF_TOP
#ifdef HCF_CFG_APF_2_BOTTOM // Bottom Compatibility for AP Firmware - driver I/F
#if CFG_DRV_ACT_RANGES_APF_2_BOTTOM <= HCF_CFG_APF_2_BOTTOM && HCF_CFG_APF_2_BOTTOM <= CFG_DRV_ACT_RANGES_APF_2_TOP
#undef CFG_DRV_ACT_RANGES_APF_2_BOTTOM
#define CFG_DRV_ACT_RANGES_APF_2_BOTTOM HCF_CFG_APF_2_BOTTOM
#else
err: ;
#endif
#endif // HCF_CFG_APF_BOTTOM
//---------------------------------------------------------------------------------------------------------------------
#if defined HCF_CFG_STA_1_TOP || defined HCF_CFG_STA_1_BOTTOM
err: STA_1 not supported for H-I; // Compatibility for Station Firmware - driver I/F
#endif // HCF_CFG_STA_1_TOP / HCF_CFG_STA_1_BOTTOM
#ifdef HCF_CFG_STA_2_TOP // Top Compatibility for Station Firmware - driver I/F
#if HCF_CFG_STA_2_TOP == 0 || \
CFG_DRV_ACT_RANGES_STA_2_BOTTOM <= HCF_CFG_STA_2_TOP && HCF_CFG_STA_2_TOP <= CFG_DRV_ACT_RANGES_STA_2_TOP
#undef CFG_DRV_ACT_RANGES_STA_2_TOP
#define CFG_DRV_ACT_RANGES_STA_2_TOP HCF_CFG_STA_2_TOP
#else
err: ;
#endif
#endif // HCF_CFG_STA_TOP
#ifdef HCF_CFG_STA_2_BOTTOM // Bottom Compatibility for Station Firmware - driver I/F
#if CFG_DRV_ACT_RANGES_STA_2_BOTTOM <= HCF_CFG_STA_2_BOTTOM && HCF_CFG_STA_2_BOTTOM <= CFG_DRV_ACT_RANGES_STA_2_TOP
#undef CFG_DRV_ACT_RANGES_STA_2_BOTTOM
#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM HCF_CFG_STA_2_BOTTOM
#else
err: ;
#endif
#endif // HCF_CFG_STA_BOTTOM
/************************************************************************************************/
/************************************** MACROS ************************************************/
/************************************************************************************************/
/* min and max macros */
#if ! defined max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#if ! defined min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifdef HCF_SLEEP
#if defined MSF_WAIT
err: MSF should no longer supply this macro;
#else
#define MSF_WAIT(x) \
{ PROT_CNT_INI \
HCF_WAIT_WHILE( ( IPW( HREG_IO ) & HREG_IO_WOKEN_UP ) == 0 ); \
HCFASSERT( prot_cnt, IPW( HREG_IO ) ) \
}
#endif // MSF_WAIT
#else
#define MSF_WAIT(x) /*NOP*/
#endif // HCF_SLEEP
#define LOF(x) (sizeof(x)/sizeof(hcf_16)-1)
#define MUL_BY_2( x ) ( (x) << 1 ) //used to multiply by 2
#define DIV_BY_2( x ) ( (x) >> 1 ) //used to divide by 2
//resolve problems on for some 16 bits compilers to create 32 bit values
#define MERGE_2( hw, lw ) ( ( ((hcf_32)(hw)) << 16 ) | ((hcf_16)(lw)) )
#if ! defined HCF_STATIC
#define HCF_STATIC static
#endif // HCF_STATIC
#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
#define DAWA_ACK( mask) { \
OPW( HREG_EV_ACK, mask | HREG_EV_ACK_REG_READY ); \
OPW( HREG_EV_ACK, (mask & ~HREG_EV_ALLOC) | HREG_EV_ACK_REG_READY ); }
#define DAWA_ZERO_FID(reg) OPW( reg, 0 );
#else
#define DAWA_ACK( mask) OPW( HREG_EV_ACK, mask );
#define DAWA_ZERO_FID(reg)
#endif // HCF_TYPE_HII5
#if (HCF_TYPE) & HCF_TYPE_WPA
#define CALC_RX_MIC( p, len ) calc_mic_rx_frag( ifbp, p, len )
#define CALC_TX_MIC( p, len ) calc_mic_tx_frag( ifbp, p, len )
#define IF_SSN(x) x
#define IF_NOT_SSN(x)
#else
#define CALC_RX_MIC( p, len )
#define CALC_TX_MIC( p, len )
#define MIC_RX_RTN( mic, dw )
#define MIC_TX_RTN( mic, dw )
#define IF_SSN(x)
#define IF_NOT_SSN(x) x
#endif // HCF_TYPE_WPA
#if HCF_TALLIES & HCF_TALLIES_HCF //HCF tally support
#define IF_TALLY(x) x
#else
#define IF_TALLY(x)
#endif // HCF_TALLIES_HCF
#if HCF_DMA
#define IF_DMA(x) x
#define IF_NOT_DMA(x)
#define IF_USE_DMA(x) if ( ifbp->IFB_CntlOpt & USE_DMA ) x
#define IF_NOT_USE_DMA(x) if ( !(ifbp->IFB_CntlOpt & USE_DMA) ) x
#else
#define IF_DMA(x)
#define IF_NOT_DMA(x) x
#define IF_USE_DMA(x)
#define IF_NOT_USE_DMA(x) x
#endif // HCF_DMA
#define IPW(x) ((hcf_16)IN_PORT_WORD( ifbp->IFB_IOBase + (x) ) )
#define OPW(x, y) OUT_PORT_WORD( ifbp->IFB_IOBase + (x), y )
/* make sure the implementation of HCF_WAIT_WHILE is such that there may be multiple HCF_WAIT_WHILE calls
* in a row and that when one fails all subsequent fail immediately without reinitialization of prot_cnt
*/
#if HCF_PROT_TIME == 0
#define PROT_CNT_INI
#define IF_PROT_TIME(x)
#if defined HCF_YIELD
#define HCF_WAIT_WHILE( x ) while ( (x) && (HCF_YIELD) ) /*NOP*/;
#else
#define HCF_WAIT_WHILE( x ) while ( x ) /*NOP*/;
#endif // HCF_YIELD
#else
#define PROT_CNT_INI hcf_32 prot_cnt = ifbp->IFB_TickIni;
#define IF_PROT_TIME(x) x
#if defined HCF_YIELD
#define HCF_WAIT_WHILE( x ) while ( prot_cnt && (x) && (HCF_YIELD) ) prot_cnt--;
#else
#include <linux/delay.h>
#define HCF_WAIT_WHILE( x ) while ( prot_cnt && (x) ) { udelay(2); prot_cnt--; }
#endif // HCF_YIELD
#endif // HCF_PROT_TIME
#if defined HCF_EX_INT
//#if HCF_EX_INT & ~( HCF_EX_INT_TX_EX | HCF_EX_INT_TX_OK | HCF_EX_INT_TICK )
;? out dated checking
err: you used an invalid bitmask;
// #endif // HCF_EX_INT validation
// #else
// #define HCF_EX_INT 0x000
#endif // HCF_EX_INT
#if 0 //get compiler going
#if HCF_EX_INT_TICK != HREG_EV_TICK
;? out dated checking
err: someone redefined these macros while the implemenation assumes they are equal;
#endif
#if HCF_EX_INT_TX_OK != HFS_TX_CNTL_TX_OK || HFS_TX_CNTL_TX_OK != HREG_EV_TX_OK
;? out dated checking
err: someone redefined these macros while the implemenation assumes they are equal;
#endif
#if HCF_EX_INT_TX_EX != HFS_TX_CNTL_TX_EX || HFS_TX_CNTL_TX_EX != HREG_EV_TX_EX
;? out dated checking
err: someone redefined these macros while the implemenation assumes they are equal;
#endif
#endif // 0 get compiler going
/* The assert in HCFLOGENTRY checks against re-entrancy. Re-entrancy could be caused by MSF logic at
* task-level calling hcf_functions without shielding with HCF_ACT_ON/_OFF. When an interrupt occurs,
* the ISR could (either directly or indirectly) cause re-entering of the interrupted HCF-routine.
*
* The "(ifbp->IFB_AssertWhere = where)" test in HCFLOGENTRY services ALSO as a statement to get around:
* #pragma warning: conditional expression is constant
* on the if-statement
*/
#if HCF_ASSERT
#define HCFASSERT(x,q) {if (!(x)) {mdd_assert( ifbp, __LINE__ , q );}}
#define MMDASSERT(x,q) {if (!(x)) {mdd_assert( assert_ifbp, __LINE__ + FILE_NAME_OFFSET, q );}}
#define HCFLOGENTRY( where, what ) \
{if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \
HCF_ENTRY( ifbp ); \
HCFASSERT( (ifbp->IFB_AssertTrace & 1<<((where)&0xF)) == 0, ifbp->IFB_AssertTrace ); \
ifbp->IFB_AssertTrace |= 1<<((where)&0xF); \
} \
HCFTRACE(ifbp, where ) \
HCFTRACEVALUE(ifbp, what ) \
}
#define HCFLOGEXIT( where ) \
{if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \
HCF_EXIT( ifbp ); \
ifbp->IFB_AssertTrace &= ~(1<<((where)&0xF)); \
} \
HCFTRACE(ifbp, (where)|HCF_TRACE_EXIT ) \
}
#else // HCF_ASSERT
#define HCFASSERT( x, q )
#define MMDASSERT( x, q )
#define HCFLOGENTRY( where, what ) {HCF_ENTRY( ifbp );}
#define HCFLOGEXIT( where ) {HCF_EXIT( ifbp );}
#endif // HCF_ASSERT
#if HCF_INT_ON
/* ;? HCFASSERT_INT
* #if (HCF_SLEEP) & HCF_DDS
* #define HCFASSERT_INT HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFF && ifbp->IFB_IntOffCnt != 0xFFFE, \
* ifbp->IFB_IntOffCnt )
* #else
*/
#define HCFASSERT_INT HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFF, ifbp->IFB_IntOffCnt )
// #endif // HCF_DDS
#else
#define HCFASSERT_INT
#endif // HCF_INT_ON
#if defined HCF_TRACE
#define HCFTRACE(ifbp, where ) {OPW( HREG_SW_1, where );}
//#define HCFTRACE(ifbp, where ) {HCFASSERT( DO_ASSERT, where );}
#define HCFTRACEVALUE(ifbp, what ) {OPW( HREG_SW_2, what );}
//#define HCFTRACEVALUE(ifbp, what ) {HCFASSERT( DO_ASSERT, what );}
#else
#define HCFTRACE(ifbp, where )
#define HCFTRACEVALUE(ifbp, what )
#endif // HCF_TRACE
#if HCF_BIG_ENDIAN
#define BE_PAR(x) ,x
#else
#define BE_PAR(x)
#endif // HCF_BIG_ENDIAN
/************************************************************************************************/
/************************************** END OF MACROS *****************************************/
/************************************************************************************************/
/************************************************************************************************/
/*************************************** PROTOTYPES *******************************************/
/************************************************************************************************/
#if HCF_ASSERT
extern IFBP BASED assert_ifbp; //to make asserts easily work under MMD and DHF
EXTERN_C void mdd_assert (IFBP ifbp, unsigned int line_number, hcf_32 q );
#endif //HCF_ASSERT
#if ! ( (HCF_IO) & HCF_IO_32BITS ) // defined 16 bits only
#undef OUT_PORT_STRING_32
#undef IN_PORT_STRING_32
#endif // HCF_IO
#endif //HCFDEFC_H

View File

@ -0,0 +1,734 @@
.\" vim:tw=78:
.\" Copyright (c) 1999-2003 Agere Systems Inc. -- http://www.agere.com
.\" wlags49.4 7.20-abg 04/28/2004 13:30:00
.\"
.TH WLAGS49 4 "04/28/2004 13:30:00" "pcmcia-cs"
.SH NAME
wlags49 \- Agere Systems Wireless PC Card / PCI device drivers
wlags49_h2_cs.o \- Hermes-II Card Services (PCMCIA/CF) driver
.br
wlags49_h2.o \- Hermes-II MiniPCI driver
.br
wlags49_h25.o \- Hermes-II.5 PCI/CardBus driver
.br
wlags49_h25_cs.o\- Hermes-II.5 Card Services (PCMCIA/CF) driver
.SH SYNOPSIS
.nh
.fi
.B insmod wlags49_[h1,h2]_[cs].o
.br
.RB [ Authentication=n ]
.RB [ AuthKeyMngmtSuite=???? ]
.RB [ BRSC2GHz=b ]\p
.RB [ BRSC5GHz=b ]
.RB [ Coexistence=n ]
.RB [ Configured=???? ]\p
.RB [ ConnectionControl=???? ]
.RB [ CreateIBSS=s ]
.RB [ DebugFlag=n ]\p
.RB [ DesiredSSID=s ]
.RB [ DownloadFirmware=n ]
.RB [ DriverEnable=???? ]\p
.RB [ EnableEncryption=s ]
.RB [ Encryption=???? ]
.RB [ ExcludeUnencrypted=s ]\p
.RB [ IntraBSSRelay=s ]
.RB [ IrqList=i,j,... ]
.RB [ IrqMask=n ]\p
.RB [ Key1=s ]
.RB [ Key2=s ]
.RB [ Key3=s ]
.RB [ Key4=s ]\p
.RB [ LoadBalancing=s ]
.RB [ MaxSleepDuration=n ]
.RB [ MediumDistribution=s ]\p
.RB [ MicroWaveRobustness=s ]
.RB [ MulticastPMBuffering=s ]
.RB [ MulticastRate=n ]\p
.RB [ MulticastReceive=s ]
.RB [ NetworkAddress=n,n,n,n,n,n ]
.RB [ NetworkType=???? ]\p
.RB [ OwnATIMWindow=n ]
.RB [ OwnBeaconInterval=n ]
.RB [ OwnChannel=n ]\p
.RB [ OwnDTIMPeriod=n ]
.RB [ OwnName=s ]
.RB [ OwnSSID=s ]\p
.RB [ pc_debug=n ]
.RB [ PMEnabled=b ]
.RB [ PMHoldoverDuration=n ]\p
.RB [ PortType=n ]
.RB [ PowerMode=???? ]
.RB [ PromiscuousMode=s ]\p
.RB [ RejectANY=s ]
.RB [ RTSThreshold=n ]\p
.RB [ RTSThreshold1=n ]
.RB [ RTSThreshold2=n ]
.RB [ RTSThreshold3=n ]\p
.RB [ RTSThreshold4=n ]
.RB [ RTSThreshold5=n ]
.RB [ RTSThreshold6=n ]\p
.RB [ SRSC2GHz=b ]
.RB [ SRSC5GHz=b ]
.RB [ SystemScale=n ]\p
.RB [ TxKey=n ]
.RB [ TxRateControl=n ]\p
.RB [ TxRateControl1=n ]
.RB [ TxRateControl2=n ]
.RB [ TxRateControl3=n ]\p
.RB [ TxRateControl4=n ]
.RB [ TxRateControl5=n ]
.RB [ TxRateControl6=n ]\p
.RB [ WDSAddress=n,n,n,n,n,n ]\p
.RB [ WDSAddress1=n,n,n,n,n,n ]
.RB [ WDSAddress2=n,n,n,n,n,n ]\p
.RB [ WDSAddress3=n,n,n,n,n,n ]
.RB [ WDSAddress4=n,n,n,n,n,n ]\p
.RB [ WDSAddress5=n,n,n,n,n,n ]
.RB [ WDSAddress6=n,n,n,n,n,n ]\p
.fi
.SH DESCRIPTION
.I wlags49
is the low-level Card Services / PCI driver for the
.B Wireless PC Card, Wireless Integrated Card, Wireless Embedded Card
and other wireless adapters based on the Agere Systems Hermes-II, and Hermes-II.5 wireless MAC. When this driver is attached to a card, it
allocates the next available ethernet device (eth0..eth#). This
device name will be passed on to
.IR cardmgr (8),
or the PCI subsystem, for the card configuration, and reported in the kernel log file
with the I/O base address and MAC address used by the card.
.SH FEATURES
\- Hot plug/unplug
\- Access Point and peer-to-peer communication
\- Card power management
\- Support for Hermes-II & Hermes-II.5 based PCMCIA, Mini PCI, and CardBus cards
\- Wired Equivalent Privacy (WEP)
\- WPA-PSK support (EXPERIMENTAL)
\- Driver utility interface (UIL)
\- Wireless Extensions
\- Software AP mode
.SH PARAMETERS
.TP
.B Authentication=n
Algorithm used for Authentication.
.BR
1 \- Open System
.BR
2 \- Shared Key
.BR
Default: 1
.TP
.B Auth_key_mgmt_suite
???????????????
.TP
.B BRSC2GHz=b
Sets the card\'s Basic Rate Set in the 2.4GHz band. See SRSC2GHz
for the value\'s format.
.BR
Default: 15 (or 0x000F, only 11b rates to accept legacy 11b stations)
.TP
.B BRSC5GHz-b
Sets the card\'s Basic Rate Set in the 5.0GHz band. See SRSC2GHz for the
value\'s format
.BR
Default: 4080 (or 0x0FF0, all 11a rates)
.TP
.B Coexistence=n
Used to make the 802.11a/b/g coexistence behavior more strict.
.BR
Default \- 0 (Use standard behavior)
.TP
.B ConnectionControl=n
Configures the card\'s connection control process in dealing with multiple
bands (802.11b/g vs. 802.11a).
.BR
0 \- Single Band operation in 2GHz
.BR
1 \- Single Band operation in 5GHz
.BR
2 \- Multiple Band operation starting with 2GHz
.BR
3 \- Multiple Band operation starting with 5GHz
.BR
Default \- 2
.TP
.B Configured
???????????????
.TP
.B ConnectionControl
???????????????
.TP
.B CreateIBSS=s
Enable or disable IBSS Creation.
For correct operation, specification of a OwnSSID is required.
This mode requires firmware 6.04 or higher.
.BR
N \- Disable
.BR
Y \- Enable
.BR
Default: N
.TP
.B DebugFlag=n
Selects the driver debugging level. This parameter is only available
if the module is compiled with debugging enabled. Refer to the
file
.B debug.h
in the source directory for information on the flag values.
.BR
0x00000001L \- DBG_ERROR_ON
.BR
0x00000002L \- DBG_WARNING_ON
.BR
0x00000004L \- DBG_NOTICE_ON
.BR
0x00000008L \- DBG_TRACE_ON
.BR
0x00000010L \- DBG_VERBOSE_ON
.BR
0x00000020L \- DBG_PARAM_ON
.BR
0x00000040L \- DBG_BREAK_ON
.BR
0x00000100L \- DBG_RX_ON
.BR
0x00000200L \- DBG_TX_ON
.BR
0x00000400L \- DBG_DS_ON
.BR
If the module is compiled with debugging enabled, DebugFlag
defaults to DBG_ERROR_ON, DBG_WARNING_ON and DBG_BREAK_ON.
DebugFlag overrules pc_debug.
.TP
.B DesiredSSID=s
Same as OwnSSID.
.TP
.B DownloadFirmware=n
This release of the driver introduces the ability to perform downloads of the STA/AP
firmware. In fact, this is required for Hermes-II based cards. This parameter tells
the driver which version of the firmware to download to the card.
.BR
0 \- No download performed (Hermes-I only)
.BR
1 \- Download STA firmware
.BR
2 \- Download AP firmware
.BR
Default: 1, when STA mode functionality is
included in the build
2, when code is built exclusively for
AP mode
.TP
.B DriverEnable
???????????????
.TP
.B EnableEncryption=n
Set the method of Data encryption.
.BR
0 \- Disable
.BR
1 \- Enable WEP Encryption
.BR
2 \- Enable WPA with TKIP encryption
.BR
Default: 0
.TP
.B Encryption
???????????????
.TP
.B ExcludeUnencrypted=s
Controls how the stations must communicate with the AP.
.BR
Y \- Stations must enable encryption and provide
the proper encryption key to communicate
with the AP.
.BR
N \- Stations do not need to enable encryption
to communicate with the AP.
.BR
Default: N
.TP
.B IntraBSSRelay=s
Controls the automatic relay of received messages that are destined for other
stations in the BSS.
.BR
Y \- Messages are relayed to the appropriate
station(s).
.BR
N \- Messages are passed up to the host.
.BR
Default: Y
.TP
.B IrqList=i,j,...
Specifies the set of interrupts (up to 4) that may be allocated by
this driver. This overrides the values set in the
.B IrqMask
parameter. NOTE: This parameter is for PCMCIA only.
.TP
.B IrqMask=n
Specifies a mask of valid interrupts that may be allocated by this driver.
If
.B IrqList
is also specified, the values in
.B IrqList
are used instead. NOTE: This parameter is for PCMCIA only.
.BR
Default: 0xdeb8 (IRQ 3,4,5,7,9,10,11,12,14,15)
.TP
.B Key1=s
Specifies one of 4 possible keys for the Data encryption.
One of these keys, identified by TxKey,
is used for the enciphering of Data that is transmitted by this station.
All keys specified can be used for the deciphering of Data that is received.
.BR
The key value can be an ASCII character string or a hexadecimal value.
The length of the key value can be 5 characters or 10 hexadecimal digits for
the standard encryption (Silver or Gold card), or 13 characters or 26
hexadecimal digits for the encryption with extended keys (Gold card only).
The keys defined in the station must match the keys defined in the access
points; both on value and number (1 through 4).
.BR
In 2.0 series Linux kernel modules, values that begin with a number are
considered integers. In this case a hexadecimal value string or a character
string starting with a number, will need to be surrounded by escaped
double quotes (ie. Key1=\\"0x1122334455\\" Key2=\\"12xyz\\").
.BR
5 or 13, printable character string, or
.BR
10 or 26 hex digits if preceded by "0x".
.BR
If this parameter is omitted, the default of the MAC is used ( = 0-length).
.TP
.B Key2=s
Same as Key1.
.TP
.B Key3=s
Same as Key1.
.TP
.B Key4=s
Same as Key1.
.TP
.B LoadBalancing=s
Control for the Load Balancing algorithm for both STAs and APs. The AP
includes a load balancing element in the Probe Response and Beacon frames.
The STA uses this info to select an AP, not only based on comms quality, but
also on the load of that AP.
.BR
Default: Y
.TP
.B MaxDataLength
???????????????
.TP
.B MaxSleepDuration=n
Set the maximum Power Management sleep duration in milliseconds.
Valid values are 0 to 65535 milliseconds.
.BR
Default: 100
.TP
.B MediumDistribution=s
Control for the distribution of medium parameters, like communication
thresholds, microwave robustness, RTS/CTS thresholds, by APs. The associated
stations replace their own values with the received values.
.BR
Default=Y
.TP
.B MicroWaveRobustness=s
Enable or disable Microwave Oven Robustness.
.BR
N \- Disable
.BR
Y \- Enable
.BR
Default: N
.TP
.B MulticastPMBuffering=s
Controls buffering of multicast MAC frames for transmission after DTIM. If no,
multicast MAC frames are directly placed in the output queue.
.BR
Default: Y
.TP
.B MulticastRate=n
Sets the data rate for multicast message transmission.
.BR
1 \- Fixed 1Mb/s
2 \- Fixed 2Mb/s
3 \- Fixed 5.5Mb/s
4 \- Fixed 11Mb/s
.BR
Default: 2
For Hermes-II.5, an INTEGER CONVERTED bit mask representing the
rate to multicast, where the rates supported are as follows:
Bit : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
.br
------------------------------------------------------
.br
Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
Default: 4 (Translates to 0x0004 = 5.5 Mb/sec)
.TP
.B MulticastReceive=s
Enable or disable receiving of all multicast packets when Card Power Management
is enabled. When enabled, the station will wake up frequently
to receive the multicast frames. This causes less optimal power savings.
.BR
N \- Disable
.BR
Y \- Enable
.BR
Default: Y
.TP
.B NetworkAddress=n,n,n,n,n,n
Sets the adapter hardware ethernet address (MAC address) to the value
specified. Note that this is to be used to specify a Local MAC address. Do
not specify this parameter if the card\'s universal address is to be used.
Valid values are six hexadecimal digit-pairs (prefixed with 0x).
.BR
Default: <factory assigned address>
.TP
.B NetworkType
???????????????
.TP
.B OwnATIMWindow=n
ATIM window time used for creating an IBSS.
.BR
Range: 0..100
.BR
Default: 0
.TP
.B OwnBeaconInterval=b
Beacon Interval in TU
.BR
Range 20..200
.BR
Default \- 100
.TP
.B channel=n
Same as OwnChannel.
.TP
.B OwnChannel=n
Sets the channel the Ad-Hoc or IBSS mode will use.
The default channel for Ad-Hoc mode is determined by the Wireless PC Card.
The default channel for IBSS is set to 10 by the driver.
This value has no effect when the adapter is used with an Access Point
(BSS network) since the Access Point automatically determines the channel.
Valid values are 0 to 14. However the channels allowed in
your region are subject to local regulations and are limited at
manufacturing time of the Wireless PC Card. When the provided value is
not allowed, the value remains unchanged.
.BR
0 \- Use default channel
.BR
Default: 0
.TP
.B OwnDTIMPeriod=n
The number of beacon intervals between successive Delivery Traffic Identification
Maps (DTIMs).
.BR
Range: 1..65535
.BR
Default: 1
.TP
.B OwnName=s
Sets the station name to the specified string value. This parameter
is used for diagnostic purposes, as a user\-friendly identification
of this system. This parameter accepts a maximum of 32 characters.
.BR
Default: Linux
.TP
.B OwnSSID=s
Sets the card network name to the specified string value. This parameter
accepts a maximum of 32 characters. Whitespace in the network name
will need to be escaped with a backslash (ie. OwnSSID=My\\ Network).
.BR
Default: ANY
.TP
.B pc_debug=n
Selects the PCMCIA debugging level. This parameter is only available
if the module is compiled with debugging enabled. A non\-zero value
enables debugging. Higher values yield more information, i.e. for any value all
lower values are implied.
.BR
8 \- DBG_DS_ON
.BR
7 \- DBG_RX_ON | DBG_TX_ON
.BR
6 \- DBG_PARAM_ON
.BR
5 \- DBG_TRACE_ON
.BR
4 \- DBG_VERBOSE_ON
.BR
If the module is compiled with debugging enabled, pc_debug defaults to 5.
DebugFlag overrules pc_debug.
.BR
The name pc_debug rather than PcDebug, since pc_debug is used by many PCMCIA driver.
.TP
.B PMEnabled=b
Sets the card\'s Power Management state.
.BR
0 \- Disable
.BR
1 \- Enable Enhanced Mode
.BR
2 \- Enabled Standard Mode
.BR
0x8000 \- Enhanced?????? Mode (to be combined with 0x0001 or 0x0002)
Default: 0 (Disabled)
.TP
.B PMHoldoverDuration=n
Time that the station remains in an awake state after a MAC frame transfer if
Enhanced Power Save is active.
.BR
Range: 1..1000
.BR
Default: 100
.TP
.B PowerMode
???????????????
.TP
.B PortType=n
Selects the type of network operation.
.BR
1 \- Normal Operation (BSS or IBSS)
.BR
3 \- Ad-Hoc Demo Mode
.BR
Default: 1
.TP
.B PromiscuousMode=s
Switch for promiscuous mode reception.
.BR
Default: N
.TP
.B RejectANY=s
Controls how stations associate to the device.
.BR
Y \- Stations must provide the correct SSID to
associate to the AP.
.BR
N \- Stations are not required to provide the
correct SSID to associate to the AP.
Known as an \'open\' network.
.BR
Default - N
.TP
.B RTSThreshold=n
Controls the RTS/CTS handshake threshold for transmissions in Station mode.
Valid values are 0 to 2347.
.BR
500 \- Hidden Stations
.BR
2347 \- No RTS/CTS
.BR
Default: 2347
.TP
.B RTSThreshold1=n
Same as RTSThreshold, only for port 1 of in AccessPoint mode.
.TP
.B RTSThreshold2=n
Same as RTSThreshold1, only for port 2.
.TP
.B RTSThreshold3=n
Same as RTSThreshold1, only for port 3.
.TP
.B RTSThreshold4=n
Same as RTSThreshold1, only for port 4.
.TP
.B RTSThreshold5=n
Same as RTSThreshold1, only for port 5.
.TP
.B RTSThreshold6=n
Same as RTSThreshold1, only for port 6.
.TP
.B SRSC2GHz=b
Sets the card\'s Supported Rate Set in the 2.4GHz band. The value
is an INTEGER CONVERTED bit mask representing the rates to support,
where the rates supported are as follows:
Bit : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
.br
------------------------------------------------------
.br
Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
.BR
Default: 4095 (or 0x0FFF, all 11b and 11g rates)
.TP
.B SRSC5GHz=b
Sets the card\'s Supported Rate Set in the 5.0GHz band. See SRSC2GHz
for the value\'s format.
.BR
Default: 4080 (or 0x0FF0, all 11a rates)
.TP
.B SystemScale=n
Sets the distance between Access Points in the network. This value
influences the Modem Thresholds (EnergyDetectThreshold,
CarrierDetectThreshold and DeferThreshold) and
the Roaming Thresholds (CellSearchThreshold and OutOfRangeThreshold).
.BR
1 \- Large
.BR
2 \- Medium
.BR
3 \- Small
.BR
Default: 1
.TP
.B TxRateControl=n
Sets the data rate to be used by the transmitter. For Hermes-II:
.BR
1 \- Fixed Low (1 Mb/sec)
.BR
2 \- Fixed Standard (2 Mb/sec)
.BR
3 \- Auto Rate Select High (11, 5.5, 2, 1 Mb/sec)
.BR
4 \- Fixed Medium (5.5 Mb/sec)
.BR
5 \- Fixed High (11 Mb/sec)
.BR
6 \- Auto Rate Select Standard (2, 1 Mb/sec)
.BR
7 \- Auto Rate Select Medium (5.5, 2, 1 Mb/sec)
.BR
Default: 3
For Hermes-II.5, an INTEGER CONVERTED bit mask representing all of the
rates to support, where the rates supported are as follows:
Bit : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
.br
------------------------------------------------------
.br
Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
.BR
Default: 4095 (Translates to 0xFFF, which is all rates)
.TP
.B RTSThreshold=n
Sets the number of octets in a message or fragment above which a
RTS/CTS handshake is performed.
Valid values are 0 to 2347.
.BR
500 \- Hidden Stations
.BR
2347 \- No RTS/CTS
.BR
Default: 2347
.TP
.B TxKey=n
Designates which of the keys is to be used for the enciphering of data that is
transmitted by this station.
.BR
Integer in the range 1..4.
.BR
Default: 1
.TP
.B TxPowLevel
???????????????
.TP
.B TxRateControl=n
Sets the data rate to be used by the transmitter in Station mode.
.BR
1 \- Fixed Low
.BR
2 \- Fixed Standard
.BR
3 \- Auto Rate Select (High)
.BR
4 \- Fixed Medium
.BR
5 \- Fixed High
.BR
6 \- Auto Rate Select (Standard)
.BR
7 \- Auto Rate Select (Medium)
.BR
Default: 3
For Hermes-II.5, an INTEGER CONVERTED bit mask representing all of the
rates to support, where the rates supported are as follows:
Bit : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
.br
------------------------------------------------------
.br
Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
.BR
Default: 4095 (Translates to 0xFFF, which is all rates)
.TP
.B TxRateControl1=n
Same as TxRateControl, only for port 1 in AccessPoint mode.
.TP
.B TxRateControl2=n
Same as TxRateControl1, only for port 2.
.TP
.B TxRateControl3=n
Same as TxRateControl1, only for port 3.
.TP
.B TxRateControl4=n
Same as TxRateControl1, only for port 4.
.TP
.B TxRateControl5=n
Same as TxRateControl1, only for port 5.
.TP
.B TxRateControl6=n
Same as TxRateControl1, only for port 6.
.TP
.B VendorDescription
???????????????
.TP
.B WDSAddress=n,n,n,n,n,n
MAC address that identifies the corresponding node of the WDS port in Station mode.
Note that for WDS to work properly, a bridge interface must be setup between the device and
the wds network devices created by the driver. For more information on bridge
interfaces, please refer to the man page for \'brctl\'.
.BR
Default: 00:00:00:00:00:00
.TP
.B WDSAddress1=n,n,n,n,n,n
Same as WDSAddress, only for port 1 in AccessPoint mode.
.TP
.B WDSAddress2=n,n,n,n,n,n
Same as WDSAddress1, only for port 2.
.TP
.B WDSAddress3=n,n,n,n,n,n
Same as WDSAddress1, only for port 3.
.TP
.B WDSAddress4=n,n,n,n,n,n
Same as WDSAddress1, only for port 4.
.TP
.B WDSAddress5=n,n,n,n,n,n
Same as WDSAddress1, only for port 5.
.TP
.B WDSAddress6=n,n,n,n,n,n
Same as WDSAddress1, only for port 6.
.SH SECURITY
On a multi-user system only the system administrator needs access to the WEP
encryption keys. In this case, consider removing the read permission for
normal users of the PCMCIA config.opts file, the system log file, and any
Agere proprietary iwconfig-eth<n> scripts.
.SH CONTACT
If you encounter problems when installing or using this product, or would like
information about our other "Wireless" products, please contact your local
Authorized "Wireless" Reseller or Agere Systems sales office.
Addresses and telephone numbers of the Agere Systems sales offices are
listed on our Agere Systems web site.
.TP
.B WWW
http://www.agere.com
.SH SEE ALSO
.BR cardmgr (8),
.BR pcmcia (5),
.BR ifconfig (8),
.BR insmod (8),
.BR brctl (8).

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,251 @@
// vim:tw=110:ts=4:
/************************************************************************************************************
*
* FILE : mmd.c
*
* DATE : $Date: 2004/07/23 11:57:45 $ $Revision: 1.4 $
* Original: 2004/05/28 14:05:35 Revision: 1.32 Tag: hcf7_t20040602_01
* Original: 2004/05/13 15:31:45 Revision: 1.30 Tag: hcf7_t7_20040513_01
* Original: 2004/04/15 09:24:42 Revision: 1.25 Tag: hcf7_t7_20040415_01
* Original: 2004/04/08 15:18:17 Revision: 1.24 Tag: t7_20040413_01
* Original: 2004/04/01 15:32:55 Revision: 1.22 Tag: t7_20040401_01
* Original: 2004/03/10 15:39:28 Revision: 1.18 Tag: t20040310_01
* Original: 2004/03/03 14:10:12 Revision: 1.16 Tag: t20040304_01
* Original: 2004/03/02 09:27:12 Revision: 1.14 Tag: t20040302_03
* Original: 2004/02/24 13:00:29 Revision: 1.12 Tag: t20040224_01
* Original: 2004/01/30 09:59:33 Revision: 1.11 Tag: t20040219_01
*
* AUTHOR : Nico Valster
*
* DESC : Common routines for HCF, MSF, UIL as well as USF sources
*
* Note: relative to Asserts, the following can be observed:
* Since the IFB is not known inside the routine, the macro HCFASSERT is replaced with MDDASSERT.
* Also the line number reported in the assert is raised by FILE_NAME_OFFSET (20000) to discriminate the
* MMD Asserts from HCF and DHF asserts.
*
***************************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
**************************************************************************************************************/
#include "hcf.h" // Needed as long as we do not really sort out the mess
#include "hcfdef.h" // get CNV_LITTLE_TO_SHORT
#include "mmd.h" // MoreModularDriver common include file
//to distinguish DHF from HCF asserts by means of line number
#undef FILE_NAME_OFFSET
#define FILE_NAME_OFFSET DHF_FILE_NAME_OFFSET
/*************************************************************************************************************
*
*.MODULE CFG_RANGE_SPEC_STRCT* mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp )
*.PURPOSE Checks compatibility between an actor and a supplier.
*
*.ARGUMENTS
* actp
* supp
*
*.RETURNS
* NULL incompatible
* <>NULL pointer to matching CFG_RANGE_SPEC_STRCT substructure in actor-structure matching the supplier
*
*.NARRATIVE
*
* Parameters:
* actp address of the actor specification
* supp address of the supplier specification
*
* Description: mmd_check_comp is a support routine to check the compatibility between an actor and a
* supplier. mmd_check_comp is independent of the endianess of the actp and supp structures. This is
* achieved by checking the "bottom" or "role" fields of these structures. Since these fields are restricted
* to a limited range, comparing the contents to a value with a known endian-ess gives a clue to their actual
* endianess.
*
*.DIAGRAM
*1a: The role-field of the actor structure has a known non-zero, not "byte symmetric" value (namely
* COMP_ROLE_ACT or 0x0001), so if and only the contents of this field matches COMP_ROLE_ACT (in Native
* Endian format), the actor structure is Native Endian.
*2a: Since the role-field of the supplier structure is 0x0000, the test as used for the actor does not work
* for a supplier. A supplier has always exactly 1 variant,top,bottom record with (officially, but see the
* note below) each of these 3 values in the range 1 through 99, so one byte of the word value of variant,
* top and bottom words is 0x00 and the other byte is non-zero. Whether the lowest address byte or the
* highest address byte is non-zero depends on the Endianess of the LTV. If and only if the word value of
* bottom is less than 0x0100, the supplier is Native Endian.
* NOTE: the variant field of the supplier structure can not be used for the Endian Detection Algorithm,
* because a a zero-valued variant has been used as Controlled Deployment indication in the past.
* Note: An actor may have multiple sets of variant,top,bottom records, including dummy sets with variant,
* top and bottom fields with a zero-value. As a consequence the endianess of the actor can not be determined
* based on its variant,top,bottom values.
*
* Note: the L and T field of the structures are always in Native Endian format, so you can not draw
* conclusions concerning the Endianess of the structure based on these two fields.
*
*1b/2b
* The only purpose of the CFG_RANGE_SPEC_BYTE_STRCT is to give easy access to the non-zero byte of the word
* value of variant, top and bottom. The variables sup_endian and act_endian are used for the supplier and
* actor structure respectively. These variables must be 0 when the structure has LE format and 1 if the
* structure has BE format. This can be phrased as:
* the variable is false (i.e 0x0000) if either
* (the platform is LE and the LTV is the same as the platform)
* or
* (the platform is BE and the LTV differs from the platform).
* the variable is true (i.e 0x0001) if either
* (the platform is BE and the LTV is the same as the platform)
* or
* (the platform is LE and the LTV differs from the platform).
*
* Alternatively this can be phrased as:
* if the platform is LE
* if the LTV is LE (i.e the same as the platform), then the variable = 0
* else (the LTV is BE (i.e. different from the platform) ), then the variable = 1
* if the platform is BE
* if the LTV is BE (i.e the same as the platform), then the variable = 1
* else (the LTV is LE (i.e. different from the platform) ), then the variable = 0
*
* This is implemented as:
* #if HCF_BIG_ENDIAN == 0 //platform is LE
* sup/act_endian becomes reverse of structure-endianess as determined in 1a/1b
* #endif
*6: Each of the actor variant-bottom-top records is checked against the (single) supplier variant-bottom-top
* range till either an acceptable match is found or all actor records are tried. As explained above, due to
* the limited ranges of these values, checking a byte is acceptable and suitable.
*8: depending on whether a match was found or not (as reflected by the value of the control variable of the
* for loop), the NULL pointer or a pointer to the matching Number/Bottom/Top record of the Actor structure
* is returned.
* As an additional safety, checking the supplier length protects against invalid Supplier structures, which
* may be caused by failing hcf_get_info (in which case the len-field is zero). Note that the contraption
* "supp->len != sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1"
* did turn out not to work for a compiler which padded the structure definition.
*
* Note: when consulting references like DesignNotes and Architecture specifications there is a confusing use
* of the notions number and variant. This resulted in an inconsistent use in the HCF nomenclature as well.
* This makes the logic hard to follow and one has to be very much aware of the context when walking through
* the code.
* NOTE: The Endian Detection Algorithm places limitations on future extensions of the fields, i.e. they should
* stay within the currently defined boundaries of 1 through 99 (although 1 through 255) would work as well
* and there should never be used a zero value for the bottom of a valid supplier.
* Note: relative to Asserts, the following can be observed:
* 1: Supplier variant 0x0000 has been used for Controlled Deployment
* 2: An actor may have one or more variant record specifications with a top of zero and a non-zero bottom
* to override the HCF default support of a particular variant by the MSF programmer via hcfcfg.h
* 3: An actor range can be specified as all zeros, e.g. as padding in the automatically generated firmware
* image files.
*.ENDDOC END DOCUMENTATION
*************************************************************************************************************/
CFG_RANGE_SPEC_STRCT*
mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp )
{
CFG_RANGE_SPEC_BYTE_STRCT *actq = (CFG_RANGE_SPEC_BYTE_STRCT*)actp->var_rec;
CFG_RANGE_SPEC_BYTE_STRCT *supq = (CFG_RANGE_SPEC_BYTE_STRCT*)&(supp->variant);
hcf_16 i;
int act_endian; //actor endian flag
int sup_endian; //supplier endian flag
act_endian = actp->role == COMP_ROLE_ACT; //true if native endian /* 1a */
sup_endian = supp->bottom < 0x0100; //true if native endian /* 2a */
#if HCF_ASSERT
MMDASSERT( supp->len == 6, supp->len )
MMDASSERT( actp->len >= 6 && actp->len%3 == 0, actp->len )
if ( act_endian ) { //native endian
MMDASSERT( actp->role == COMP_ROLE_ACT, actp->role )
MMDASSERT( 1 <= actp->id && actp->id <= 99, actp->id )
} else { //non-native endian
MMDASSERT( actp->role == CNV_END_SHORT(COMP_ROLE_ACT), actp->role )
MMDASSERT( 1 <= CNV_END_SHORT(actp->id) && CNV_END_SHORT(actp->id) <= 99, actp->id )
}
if ( sup_endian ) { //native endian
MMDASSERT( supp->role == COMP_ROLE_SUPL, supp->role )
MMDASSERT( 1 <= supp->id && supp->id <= 99, supp->id )
MMDASSERT( 1 <= supp->variant && supp->variant <= 99, supp->variant )
MMDASSERT( 1 <= supp->bottom && supp->bottom <= 99, supp->bottom )
MMDASSERT( 1 <= supp->top && supp->top <= 99, supp->top )
MMDASSERT( supp->bottom <= supp->top, supp->bottom << 8 | supp->top )
} else { //non-native endian
MMDASSERT( supp->role == CNV_END_SHORT(COMP_ROLE_SUPL), supp->role )
MMDASSERT( 1 <= CNV_END_SHORT(supp->id) && CNV_END_SHORT(supp->id) <= 99, supp->id )
MMDASSERT( 1 <= CNV_END_SHORT(supp->variant) && CNV_END_SHORT(supp->variant) <= 99, supp->variant )
MMDASSERT( 1 <= CNV_END_SHORT(supp->bottom) && CNV_END_SHORT(supp->bottom) <=99, supp->bottom )
MMDASSERT( 1 <= CNV_END_SHORT(supp->top) && CNV_END_SHORT(supp->top) <=99, supp->top )
MMDASSERT( CNV_END_SHORT(supp->bottom) <= CNV_END_SHORT(supp->top), supp->bottom << 8 | supp->top )
}
#endif // HCF_ASSERT
#if HCF_BIG_ENDIAN == 0
act_endian = !act_endian; /* 1b*/
sup_endian = !sup_endian; /* 2b*/
#endif // HCF_BIG_ENDIAN
for ( i = actp->len ; i > 3; actq++, i -= 3 ) { /* 6 */
MMDASSERT( actq->variant[act_endian] <= 99, i<<8 | actq->variant[act_endian] )
MMDASSERT( actq->bottom[act_endian] <= 99 , i<<8 | actq->bottom[act_endian] )
MMDASSERT( actq->top[act_endian] <= 99 , i<<8 | actq->top[act_endian] )
MMDASSERT( actq->bottom[act_endian] <= actq->top[act_endian], i<<8 | actq->bottom[act_endian] )
if ( actq->variant[act_endian] == supq->variant[sup_endian] &&
actq->bottom[act_endian] <= supq->top[sup_endian] &&
actq->top[act_endian] >= supq->bottom[sup_endian]
) break;
}
if ( i <= 3 || supp->len != 6 /*sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1 */ ) {
actq = NULL; /* 8 */
}
#if HCF_ASSERT
if ( actq == NULL ) {
for ( i = 0; i <= supp->len; i += 2 ) {
MMDASSERT( DO_ASSERT, MERGE_2( ((hcf_16*)supp)[i], ((hcf_16*)supp)[i+1] ) );
}
for ( i = 0; i <= actp->len; i += 2 ) {
MMDASSERT( DO_ASSERT, MERGE_2( ((hcf_16*)actp)[i], ((hcf_16*)actp)[i+1] ) );
}
}
#endif // HCF_ASSERT
return (CFG_RANGE_SPEC_STRCT*)actq;
} // mmd_check_comp

View File

@ -0,0 +1,78 @@
// vim:tw=110:ts=4:
#ifndef MMD_H
#define MMD_H 1
/*************************************************************************************************************
*
* FILE : mmd.h
*
* DATE : $Date: 2004/07/19 08:16:14 $ $Revision: 1.2 $
* Original: 2004/05/17 07:33:14 Revision: 1.18 Tag: hcf7_t20040602_01
* Original: 2004/05/11 06:22:59 Revision: 1.17 Tag: hcf7_t7_20040513_01
* Original: 2004/04/15 09:24:42 Revision: 1.13 Tag: hcf7_t7_20040415_01
* Original: 2004/04/08 15:18:17 Revision: 1.12 Tag: t7_20040413_01
* Original: 2004/04/01 15:32:55 Revision: 1.10 Tag: t7_20040401_01
* Original: 2004/03/04 16:47:50 Revision: 1.7 Tag: t20040310_01
* Original: 2004/03/03 12:47:05 Revision: 1.6 Tag: t20040304_01
* Original: 2004/02/25 14:14:39 Revision: 1.5 Tag: t20040302_03
* Original: 2004/02/24 13:00:29 Revision: 1.4 Tag: t20040224_01
* Original: 2004/01/30 09:59:33 Revision: 1.3 Tag: t20040219_01
*
* AUTHOR : Nico Valster
*
* DESC : Definitions and Prototypes for HCF, MSF, UIL as well as USF sources
*
***************************************************************************************************************
*
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*
**************************************************************************************************************/
#ifndef HCF_H
#include "hcf.h" //just to get going with swig
#endif
EXTERN_C CFG_RANGE_SPEC_STRCT* mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp );
#endif // MMD_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,715 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* This file contains processing and initialization specific to Card Services
* devices (PCMCIA, CF).
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/08/06 11:25:37 $
* $Revision: 1.5 $
* $Source: /usr/local/cvs/wl_lkm/wireless/wl_cs.c,v $
*
******************************************************************************/
/*******************************************************************************
* include files
******************************************************************************/
#include <wl_version.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ioport.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ciscode.h>
#include <pcmcia/ds.h>
#include <debug.h>
#include <hcf.h>
#include <dhf.h>
#include <hcfdef.h>
#include <wl_if.h>
#include <wl_internal.h>
#include <wl_util.h>
#include <wl_main.h>
#include <wl_netdev.h>
#include <wl_cs.h>
#include <wl_sysfs.h>
/*******************************************************************************
* macro definitions
******************************************************************************/
#define CS_CHECK(fn, ret) do { \
last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; \
} while (0)
/*******************************************************************************
* global definitions
******************************************************************************/
#if DBG
extern dbg_info_t *DbgInfo;
#endif /* DBG */
/*******************************************************************************
* wl_adapter_attach()
*******************************************************************************
*
* DESCRIPTION:
*
* Creates an instance of the driver, allocating local data structures for
* one device. The device is registered with Card Services.
*
* PARAMETERS:
*
* none
*
* RETURNS:
*
* pointer to an allocated dev_link_t structure
* NULL on failure
*
******************************************************************************/
static int wl_adapter_attach(struct pcmcia_device *link)
{
struct net_device *dev;
struct wl_private *lp;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_attach" );
DBG_ENTER( DbgInfo );
dev = wl_device_alloc();
if(dev == NULL) {
DBG_ERROR( DbgInfo, "wl_device_alloc returned NULL\n");
return -ENOMEM;
}
link->io.NumPorts1 = HCF_NUM_IO_PORTS;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->io.IOAddrLines = 6;
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
link->irq.Handler = &wl_isr;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 5;
link->conf.Present = PRESENT_OPTION;
link->priv = link->irq.Instance = dev;
lp = wl_priv(dev);
lp->link = link;
wl_adapter_insert(link);
DBG_LEAVE( DbgInfo );
return 0;
} // wl_adapter_attach
/*============================================================================*/
/*******************************************************************************
* wl_adapter_detach()
*******************************************************************************
*
* DESCRIPTION:
*
* This deletes a driver "instance". The device is de-registered with Card
* Services. If it has been released, then the net device is unregistered, and
* all local data structures are freed. Otherwise, the structures will be
* freed when the device is released.
*
* PARAMETERS:
*
* link - pointer to the dev_link_t structure representing the device to
* detach
*
* RETURNS:
*
* N/A
*
******************************************************************************/
static void wl_adapter_detach(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_detach" );
DBG_ENTER( DbgInfo );
DBG_PARAM( DbgInfo, "link", "0x%p", link );
wl_adapter_release(link);
if (dev) {
unregister_wlags_sysfs(dev);
unregister_netdev(dev);
}
wl_device_dealloc(dev);
DBG_LEAVE( DbgInfo );
} // wl_adapter_detach
/*============================================================================*/
/*******************************************************************************
* wl_adapter_release()
*******************************************************************************
*
* DESCRIPTION:
*
* After a card is removed, this routine will release the PCMCIA
* configuration. If the device is still open, this will be postponed until it
* is closed.
*
* PARAMETERS:
*
* arg - a u_long representing a pointer to a dev_link_t structure for the
* device to be released.
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_adapter_release( struct pcmcia_device *link )
{
DBG_FUNC( "wl_adapter_release" );
DBG_ENTER( DbgInfo );
DBG_PARAM( DbgInfo, "link", "0x%p", link);
/* Stop hardware */
wl_remove(link->priv);
pcmcia_disable_device(link);
DBG_LEAVE( DbgInfo );
} // wl_adapter_release
/*============================================================================*/
static int wl_adapter_suspend(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
//if (link->open) {
netif_device_detach(dev);
wl_suspend(dev);
//// CHECK! pcmcia_release_configuration(link->handle);
//}
return 0;
} // wl_adapter_suspend
static int wl_adapter_resume(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
wl_resume(dev);
netif_device_attach( dev );
return 0;
} // wl_adapter_resume
/*******************************************************************************
* wl_adapter_insert()
*******************************************************************************
*
* DESCRIPTION:
*
* wl_adapter_insert() is scheduled to run after a CARD_INSERTION event is
* received, to configure the PCMCIA socket, and to make the ethernet device
* available to the system.
*
* PARAMETERS:
*
* link - pointer to the dev_link_t structure representing the device to
* insert
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_adapter_insert( struct pcmcia_device *link )
{
struct net_device *dev;
int i;
int last_fn, last_ret;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_insert" );
DBG_ENTER( DbgInfo );
DBG_PARAM( DbgInfo, "link", "0x%p", link );
dev = link->priv;
/* Do we need to allocate an interrupt? */
link->conf.Attributes |= CONF_ENABLE_IRQ;
CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
SET_NETDEV_DEV(dev, &handle_to_dev(link));
if (register_netdev(dev) != 0) {
printk("%s: register_netdev() failed\n", MODULE_NAME);
goto failed;
}
link->dev_node = &( wl_priv(dev) )->node;
strcpy(( wl_priv(dev) )->node.dev_name, dev->name);
register_wlags_sysfs(dev);
printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
dev->name, dev->base_addr, dev->irq);
for( i = 0; i < ETH_ALEN; i++ ) {
printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n'));
}
DBG_LEAVE( DbgInfo );
return;
cs_failed:
cs_error( link, last_fn, last_ret );
failed:
wl_adapter_release( link );
DBG_LEAVE(DbgInfo);
return;
} // wl_adapter_insert
/*============================================================================*/
/*******************************************************************************
* wl_adapter_open()
*******************************************************************************
*
* DESCRIPTION:
*
* Open the device.
*
* PARAMETERS:
*
* dev - a pointer to a net_device structure representing the network
* device to open.
*
* RETURNS:
*
* 0 on success
* errno value otherwise
*
******************************************************************************/
int wl_adapter_open( struct net_device *dev )
{
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;
int result = 0;
int hcf_status = HCF_SUCCESS;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_open" );
DBG_ENTER( DbgInfo );
DBG_PRINT( "%s\n", VERSION_INFO );
DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
if(!pcmcia_dev_present(link))
{
DBG_LEAVE( DbgInfo );
return -ENODEV;
}
link->open++;
hcf_status = wl_open( dev );
if( hcf_status != HCF_SUCCESS ) {
link->open--;
result = -ENODEV;
}
DBG_LEAVE( DbgInfo );
return result;
} // wl_adapter_open
/*============================================================================*/
/*******************************************************************************
* wl_adapter_close()
*******************************************************************************
*
* DESCRIPTION:
*
* Close the device.
*
* PARAMETERS:
*
* dev - a pointer to a net_device structure representing the network
* device to close.
*
* RETURNS:
*
* 0 on success
* errno value otherwise
*
******************************************************************************/
int wl_adapter_close( struct net_device *dev )
{
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_close" );
DBG_ENTER( DbgInfo );
DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
if( link == NULL ) {
DBG_LEAVE( DbgInfo );
return -ENODEV;
}
DBG_TRACE( DbgInfo, "%s: Shutting down adapter.\n", dev->name );
wl_close( dev );
link->open--;
DBG_LEAVE( DbgInfo );
return 0;
} // wl_adapter_close
/*============================================================================*/
static struct pcmcia_device_id wl_adapter_ids[] = {
#if ! ((HCF_TYPE) & HCF_TYPE_HII5)
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0003),
PCMCIA_DEVICE_PROD_ID12("Agere Systems", "Wireless PC Card Model 0110",
0x33103a9b, 0xe175b0dd),
#else
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0004),
PCMCIA_DEVICE_PROD_ID12("Linksys", "WCF54G_Wireless-G_CompactFlash_Card",
0x0733cc81, 0x98a599e1),
#endif // (HCF_TYPE) & HCF_TYPE_HII5
PCMCIA_DEVICE_NULL,
};
MODULE_DEVICE_TABLE(pcmcia, wl_adapter_ids);
static struct pcmcia_driver wlags49_driver = {
.owner = THIS_MODULE,
.drv = {
.name = DRIVER_NAME,
},
.probe = wl_adapter_attach,
.remove = wl_adapter_detach,
.id_table = wl_adapter_ids,
.suspend = wl_adapter_suspend,
.resume = wl_adapter_resume,
};
/*******************************************************************************
* wl_adapter_init_module()
*******************************************************************************
*
* DESCRIPTION:
*
* Called by init_module() to perform PCMCIA driver initialization.
*
* PARAMETERS:
*
* N/A
*
* RETURNS:
*
* 0 on success
* -1 on error
*
******************************************************************************/
int wl_adapter_init_module( void )
{
int ret;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_init_module" );
DBG_ENTER( DbgInfo );
DBG_TRACE( DbgInfo, "wl_adapter_init_module() -- PCMCIA\n" );
ret = pcmcia_register_driver(&wlags49_driver);
DBG_LEAVE( DbgInfo );
return ret;
} // wl_adapter_init_module
/*============================================================================*/
/*******************************************************************************
* wl_adapter_cleanup_module()
*******************************************************************************
*
* DESCRIPTION:
*
* Called by cleanup_module() to perform driver uninitialization.
*
* PARAMETERS:
*
* N/A
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_adapter_cleanup_module( void )
{
DBG_FUNC( "wl_adapter_cleanup_module" );
DBG_ENTER( DbgInfo );
DBG_TRACE( DbgInfo, "wl_adapter_cleanup_module() -- PCMCIA\n" );
pcmcia_unregister_driver(&wlags49_driver);
DBG_LEAVE( DbgInfo );
return;
} // wl_adapter_cleanup_module
/*============================================================================*/
/*******************************************************************************
* wl_adapter_is_open()
*******************************************************************************
*
* DESCRIPTION:
*
* Check with Card Services to determine if this device is open.
*
* PARAMETERS:
*
* dev - a pointer to the net_device structure whose open status will be
* checked
*
* RETURNS:
*
* nonzero if device is open
* 0 otherwise
*
******************************************************************************/
int wl_adapter_is_open( struct net_device *dev )
{
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;
if(!pcmcia_dev_present(link)) {
return 0;
}
return( link->open );
} // wl_adapter_is_open
/*============================================================================*/
#if DBG
/*******************************************************************************
* DbgEvent()
*******************************************************************************
*
* DESCRIPTION:
*
* Converts the card serivces events to text for debugging.
*
* PARAMETERS:
*
* mask - a integer representing the error(s) being reported by Card
* Services.
*
* RETURNS:
*
* a pointer to a string describing the error(s)
*
******************************************************************************/
const char* DbgEvent( int mask )
{
static char DbgBuffer[256];
char *pBuf;
/*------------------------------------------------------------------------*/
pBuf = DbgBuffer;
*pBuf = '\0';
if( mask & CS_EVENT_WRITE_PROTECT )
strcat( pBuf, "WRITE_PROTECT " );
if(mask & CS_EVENT_CARD_LOCK)
strcat( pBuf, "CARD_LOCK " );
if(mask & CS_EVENT_CARD_INSERTION)
strcat( pBuf, "CARD_INSERTION " );
if(mask & CS_EVENT_CARD_REMOVAL)
strcat( pBuf, "CARD_REMOVAL " );
if(mask & CS_EVENT_BATTERY_DEAD)
strcat( pBuf, "BATTERY_DEAD " );
if(mask & CS_EVENT_BATTERY_LOW)
strcat( pBuf, "BATTERY_LOW " );
if(mask & CS_EVENT_READY_CHANGE)
strcat( pBuf, "READY_CHANGE " );
if(mask & CS_EVENT_CARD_DETECT)
strcat( pBuf, "CARD_DETECT " );
if(mask & CS_EVENT_RESET_REQUEST)
strcat( pBuf, "RESET_REQUEST " );
if(mask & CS_EVENT_RESET_PHYSICAL)
strcat( pBuf, "RESET_PHYSICAL " );
if(mask & CS_EVENT_CARD_RESET)
strcat( pBuf, "CARD_RESET " );
if(mask & CS_EVENT_REGISTRATION_COMPLETE)
strcat( pBuf, "REGISTRATION_COMPLETE " );
// if(mask & CS_EVENT_RESET_COMPLETE)
// strcat( pBuf, "RESET_COMPLETE " );
if(mask & CS_EVENT_PM_SUSPEND)
strcat( pBuf, "PM_SUSPEND " );
if(mask & CS_EVENT_PM_RESUME)
strcat( pBuf, "PM_RESUME " );
if(mask & CS_EVENT_INSERTION_REQUEST)
strcat( pBuf, "INSERTION_REQUEST " );
if(mask & CS_EVENT_EJECTION_REQUEST)
strcat( pBuf, "EJECTION_REQUEST " );
if(mask & CS_EVENT_MTD_REQUEST)
strcat( pBuf, "MTD_REQUEST " );
if(mask & CS_EVENT_ERASE_COMPLETE)
strcat( pBuf, "ERASE_COMPLETE " );
if(mask & CS_EVENT_REQUEST_ATTENTION)
strcat( pBuf, "REQUEST_ATTENTION " );
if(mask & CS_EVENT_CB_DETECT)
strcat( pBuf, "CB_DETECT " );
if(mask & CS_EVENT_3VCARD)
strcat( pBuf, "3VCARD " );
if(mask & CS_EVENT_XVCARD)
strcat( pBuf, "XVCARD " );
if( *pBuf ) {
pBuf[strlen(pBuf) - 1] = '\0';
} else {
if( mask != 0x0 ) {
sprintf( pBuf, "<<0x%08x>>", mask );
}
}
return pBuf;
} // DbgEvent
/*============================================================================*/
#endif /* DBG */

View File

@ -0,0 +1,112 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for the driver to support PCMCIA.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_cs.h,v $
*
******************************************************************************/
#ifndef __WL_CS_H__
#define __WL_CS_H__
/*******************************************************************************
* function protoypes
******************************************************************************/
void wl_adapter_insert(struct pcmcia_device *link);
void wl_adapter_release(struct pcmcia_device *link);
int wl_adapter_event(event_t event, int priority, event_callback_args_t *args );
int wl_adapter_init_module( void );
void wl_adapter_cleanup_module( void );
int wl_adapter_open(struct net_device *dev);
int wl_adapter_close(struct net_device *dev);
int wl_adapter_is_open(struct net_device *dev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
void cs_error(client_handle_t handle, int func, int ret);
#endif
const char *DbgEvent( int mask );
#endif // __WL_CS_H__

View File

@ -0,0 +1,248 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* This file defines functions related to WEP key coding/decoding.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/wireless/wl_enc.c,v $
*
******************************************************************************/
/*******************************************************************************
* include files
******************************************************************************/
#include <wl_version.h>
#include <debug.h>
#include <hcf.h>
#include <wl_enc.h>
/*******************************************************************************
* global definitions
******************************************************************************/
#if DBG
extern dbg_info_t *DbgInfo;
#endif /* DBG */
/*******************************************************************************
* wl_wep_code()
*******************************************************************************
*
* DESCRIPTION:
*
* This function encodes a set of wep keys for privacy
*
* PARAMETERS:
*
* szCrypt -
* szDest -
* Data -
* nLen -
*
* RETURNS:
*
* OK
*
******************************************************************************/
int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
{
int i;
int t;
int k ;
char bits;
char *szData = (char *) Data;
/*------------------------------------------------------------------------*/
for( i = bits = 0 ; i < MACADDRESS_STR_LEN; i++ ) {
bits ^= szCrypt[i];
bits += szCrypt[i];
}
for( i = t = *szDest = 0; i < nLen; i++, t++ ) {
k = szData[i] ^ ( bits + i );
switch( i % 3 ) {
case 0 :
szDest[t] = ((k & 0xFC) >> 2) + CH_START ;
szDest[t+1] = ((k & 0x03) << 4) + CH_START ;
szDest[t+2] = '\0';
break;
case 1 :
szDest[t] += (( k & 0xF0 ) >> 4 );
szDest[t+1] = (( k & 0x0F ) << 2 ) + CH_START ;
szDest[t+2] = '\0';
break;
case 2 :
szDest[t] += (( k & 0xC0 ) >> 6 );
szDest[t+1] = ( k & 0x3F ) + CH_START ;
szDest[t+2] = '\0';
t++;
break;
}
}
return( strlen( szDest )) ;
}
/*============================================================================*/
/*******************************************************************************
* wl_wep_decode()
*******************************************************************************
*
* DESCRIPTION:
*
* This function decodes a set of WEP keys for use by the card.
*
* PARAMETERS:
*
* szCrypt -
* szDest -
* Data -
*
* RETURNS:
*
* OK
*
******************************************************************************/
int wl_wep_decode( char *szCrypt, void *Dest, char *szData )
{
int i;
int t;
int nLen;
char bits;
char *szDest = Dest;
/*------------------------------------------------------------------------*/
for( i = bits = 0 ; i < 12; i++ ) {
bits ^= szCrypt[i] ;
bits += szCrypt[i] ;
}
nLen = ( strlen( szData ) * 3) / 4 ;
for( i = t = 0; i < nLen; i++, t++ ) {
switch( i % 3 ) {
case 0 :
szDest[i] = ((( szData[t]-CH_START ) & 0x3f ) << 2 ) +
((( szData[t+1]-CH_START ) & 0x30 ) >> 4 );
break;
case 1 :
szDest[i] = ((( szData[t]-CH_START ) & 0x0f ) << 4 ) +
((( szData[t+1]-CH_START ) & 0x3c ) >> 2 );
break;
case 2 :
szDest[i] = ((( szData[t]-CH_START ) & 0x03 ) << 6 ) +
(( szData[t+1]-CH_START ) & 0x3f );
t++;
break;
}
szDest[i] ^= ( bits + i ) ;
}
return( i ) ;
}
/*============================================================================*/

View File

@ -0,0 +1,135 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header for performing coding/decoding of the WEP keys.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_enc.h,v $
*
******************************************************************************/
#ifndef __WAVELAN2_ENCRYPTION_H__
#define __WAVELAN2_ENCRYPTION_H__
/*******************************************************************************
* constant definitions
******************************************************************************/
#define CRYPT_CODE "57617665A5D6"
#define ENCRYPTION_LEN 102
#define ENCRYPTION_MAGIC 0x48576877L // HWhw
#define DEF_CRYPT_STR "G?TIUEA]d5MAdZV'eUb&&6.)'&:,'VF/(FR2)6^5*'*8*W6;+GB>,7NA-'ZD-X&G.H2J/8>M0(JP0XVS1HbV29.Y3):\\3YF_4IRb56"
#define DEFAULT_CRYPT_MAC "W\x01\x6B\x66\xA5\x5A"
#define CH_START '&'
#define MACADDRESS_STR_LEN 12
#define KEY_LEN 14
#define NUM_KEYS 4
#define KEY_LENGTH_NONE_ASCII 0
#define KEY_LENGTH_64_BIT_ASCII 5
#define KEY_LENGTH_128_BIT_ASCII 13
#define KEY_LENGTH_NONE_HEX ( KEY_LENGTH_NONE_ASCII * sizeof( unsigned short ))
#define KEY_LENGTH_64_BIT_HEX ( KEY_LENGTH_64_BIT_ASCII * sizeof( unsigned short ))
#define KEY_LENGTH_128_BIT_HEX ( KEY_LENGTH_128_BIT_ASCII * sizeof( unsigned short ))
/*******************************************************************************
* type definitions
******************************************************************************/
typedef struct _encstct
{
hcf_32 dwMagic;
hcf_16 wTxKeyID;
hcf_16 wEnabled;
CFG_DEFAULT_KEYS_STRCT EncStr;
}
ENCSTRCT, *PENCSTRCT;
/*******************************************************************************
* function prrottypes
******************************************************************************/
int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen );
int wl_wep_decode( char *szCrypt, void *Dest, char *szData );
#endif // __WAVELAN2_ENCRYPTION_H__

View File

@ -0,0 +1,232 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Driver common header for info needed by driver source and user-space
* processes communicating with the driver.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_if.h,v $
*
******************************************************************************/
#ifndef __WAVELAN2_IF_H__
#define __WAVELAN2_IF_H__
/*******************************************************************************
* constant definitions
******************************************************************************/
#define MAX_LTV_BUF_SIZE (512 - (sizeof(hcf_16) * 2))
#define HCF_TALLIES_SIZE (sizeof(CFG_HERMES_TALLIES_STRCT) + \
(sizeof(hcf_16) * 2))
#define HCF_MAX_MULTICAST 16
#define HCF_MAX_NAME_LEN 32
#define MAX_LINE_SIZE 256
#define HCF_NUM_IO_PORTS 0x80
#define TX_TIMEOUT ((800 * HZ) / 1000)
#define HCF_MIN_COMM_QUALITY 0
#define HCF_MAX_COMM_QUALITY 92
#define HCF_MIN_SIGNAL_LEVEL 47
#define HCF_MAX_SIGNAL_LEVEL 138
#define HCF_MIN_NOISE_LEVEL 47
#define HCF_MAX_NOISE_LEVEL 138
#define HCF_0DBM_OFFSET 149
/* For encryption (WEP) */
#define MIN_KEY_SIZE 5 // 40 bits RC4 - WEP
#define MAX_KEY_SIZE 13 // 104 bits
#define MAX_KEYS 4
#define RADIO_CHANNELS 14
#define RADIO_SENSITIVITY_LEVELS 3
#define RADIO_TX_POWER_MWATT 32
#define RADIO_TX_POWER_DBM 15
#define MIN_RTS_BYTES 0
#define MAX_RTS_BYTES 2347
#define MAX_RATES 8
#define MEGABIT 1024*1024
#define HCF_FAILURE 0xFF
#define UIL_FAILURE 0xFF
#define CFG_UIL_CONNECT 0xA123 // Define differently?
#define CFG_UIL_CONNECT_ACK_CODE 0x5653435A // VSCZ
#define WVLAN2_UIL_CONNECTED (0x01L << 0)
#define WVLAN2_UIL_BUSY (0x01L << 1)
/*******************************************************************************
* driver ioctl interface
******************************************************************************/
#define WVLAN2_IOCTL_UIL SIOCDEVPRIVATE
/* The UIL Interface used in conjunction with the WVLAN2_IOCTL_UIL code above
is defined in mdd.h. A quick reference of the UIL codes is listed below */
/*
UIL_FUN_CONNECT
UIL_FUN_DISCONNECT
UIL_FUN_ACTION
UIL_ACT_BLOCK
UIL_ACT_UNBLOCK
UIL_ACT_SCA
UIL_ACT_DIAG
UIL_ACT_APPLY
UIL_FUN_SEND_DIAG_MSG
UIL_FUN_GET_INFO
UIL_FUN_PUT_INFO
*/
#define SIOCSIWNETNAME SIOCDEVPRIVATE+1
#define SIOCGIWNETNAME SIOCDEVPRIVATE+2
#define SIOCSIWSTANAME SIOCDEVPRIVATE+3
#define SIOCGIWSTANAME SIOCDEVPRIVATE+4
#define SIOCSIWPORTTYPE SIOCDEVPRIVATE+5
#define SIOCGIWPORTTYPE SIOCDEVPRIVATE+6
/* IOCTL code for the RTS interface */
#define WL_IOCTL_RTS SIOCDEVPRIVATE+7
/* IOCTL subcodes for WL_IOCTL_RTS */
#define WL_IOCTL_RTS_READ 1
#define WL_IOCTL_RTS_WRITE 2
#define WL_IOCTL_RTS_BATCH_READ 3
#define WL_IOCTL_RTS_BATCH_WRITE 4
/*******************************************************************************
* STRUCTURE DEFINITIONS
******************************************************************************/
typedef struct
{
__u16 length;
__u8 name[HCF_MAX_NAME_LEN];
}
wvName_t;
typedef struct
{
hcf_16 len;
hcf_16 typ;
union
{
hcf_8 u8[MAX_LTV_BUF_SIZE / sizeof(hcf_8)];
hcf_16 u16[MAX_LTV_BUF_SIZE / sizeof(hcf_16)];
hcf_32 u32[MAX_LTV_BUF_SIZE / sizeof(hcf_32)];
} u;
}
ltv_t;
struct uilreq
{
union
{
char ifrn_name[IFNAMSIZ];
} ifr_ifrn;
IFBP hcfCtx;
__u8 command;
__u8 result;
/* The data field in this structure is typically an LTV of some type. The
len field is the size of the buffer in bytes, as opposed to words (like
the L-field in the LTV */
__u16 len;
void *data;
};
struct rtsreq
{
union
{
char ifrn_name[IFNAMSIZ];
}
ifr_ifrn;
__u16 typ;
__u16 reg;
__u16 len;
__u16 *data;
};
#endif // __WAVELAN2_IF_H__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,155 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing device specific routines and driver init/un-init.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/23 04:51:21 $
* $Revision: 1.4 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_main.h,v $
*
******************************************************************************/
#ifndef __WL_MAIN_H__
#define __WL_MAIN_H__
/*******************************************************************************
* function prototypes
******************************************************************************/
int wl_insert( struct net_device *dev );
void wl_set_wep_keys( struct wl_private *lp );
int wl_put_ltv_init( struct wl_private *lp );
int wl_put_ltv( struct wl_private *lp );
p_u16 wl_get_irq_mask( void );
p_s8 * wl_get_irq_list( void );
int wl_reset( struct net_device *dev );
int wl_go( struct wl_private *lp );
int wl_apply( struct wl_private *lp );
irqreturn_t wl_isr( int irq, void *dev_id, struct pt_regs *regs );
void wl_remove( struct net_device *dev );
void wl_suspend( struct net_device *dev );
void wl_resume( struct net_device *dev );
void wl_release( struct net_device *dev );
int wl_enable( struct wl_private *lp );
int wl_connect( struct wl_private *lp );
int wl_disable( struct wl_private *lp );
int wl_disconnect( struct wl_private *lp );
void wl_enable_wds_ports( struct wl_private * lp );
void wl_disable_wds_ports( struct wl_private * lp );
#ifndef USE_MBOX_SYNC
int wl_mbx( struct wl_private *lp );
void wl_endian_translate_mailbox( ltv_t *ltv );
void wl_process_mailbox( struct wl_private *lp );
#endif /* USE_MBOX_SYNC */
#ifdef USE_WDS
void wl_wds_netdev_register( struct wl_private *lp );
void wl_wds_netdev_deregister( struct wl_private *lp );
#endif /* USE_WDS */
#ifdef USE_WDS
#define WL_WDS_NETDEV_REGISTER( ARG ) wl_wds_netdev_register( ARG )
#define WL_WDS_NETDEV_DEREGISTER( ARG ) wl_wds_netdev_deregister( ARG )
#else
#define WL_WDS_NETDEV_REGISTER( ARG )
#define WL_WDS_NETDEV_DEREGISTER( ARG )
#endif /* USE_WDS */
#endif // __WL_MAIN_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,171 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required by the network layerentry points
* into the driver.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_netdev.h,v $
*
******************************************************************************/
#ifndef __WL_NETDEV_H__
#define __WL_NETDEV_H__
/*******************************************************************************
* function prototypes
******************************************************************************/
int wl_init( struct net_device *dev );
int wl_config( struct net_device *dev, struct ifmap *map );
struct net_device *wl_device_alloc( void );
void wl_device_dealloc( struct net_device *dev );
int wl_open( struct net_device *dev );
int wl_close( struct net_device *dev );
int wl_ioctl( struct net_device *dev, struct ifreq *rq, int cmd );
int wl_tx( struct sk_buff *skb, struct net_device *dev, int port );
int wl_send( struct wl_private *lp );
int wl_rx( struct net_device *dev );
void wl_tx_timeout( struct net_device *dev );
struct net_device_stats *wl_stats( struct net_device *dev );
#ifdef ENABLE_DMA
int wl_send_dma( struct wl_private *lp, struct sk_buff *skb, int port );
int wl_rx_dma( struct net_device *dev );
#endif
#ifdef NEW_MULTICAST
void wl_multicast( struct net_device *dev );
#else
void wl_multicast( struct net_device *dev, int num_addrs, void *addrs );
#endif // NEW_MULTICAST
int wl_tx_port0( struct sk_buff *skb, struct net_device *dev );
#ifdef USE_WDS
int wl_tx_port1( struct sk_buff *skb, struct net_device *dev );
int wl_tx_port2( struct sk_buff *skb, struct net_device *dev );
int wl_tx_port3( struct sk_buff *skb, struct net_device *dev );
int wl_tx_port4( struct sk_buff *skb, struct net_device *dev );
int wl_tx_port5( struct sk_buff *skb, struct net_device *dev );
int wl_tx_port6( struct sk_buff *skb, struct net_device *dev );
void wl_wds_device_alloc( struct wl_private *lp );
void wl_wds_device_dealloc( struct wl_private *lp );
void wl_wds_netif_start_queue( struct wl_private *lp );
void wl_wds_netif_stop_queue( struct wl_private *lp );
void wl_wds_netif_wake_queue( struct wl_private *lp );
void wl_wds_netif_carrier_on( struct wl_private *lp );
void wl_wds_netif_carrier_off( struct wl_private *lp );
#endif /* USE_WDS */
#ifdef USE_WDS
#define WL_WDS_DEVICE_ALLOC( ARG ) wl_wds_device_alloc( ARG )
#define WL_WDS_DEVICE_DEALLOC( ARG ) wl_wds_device_dealloc( ARG )
#define WL_WDS_NETIF_START_QUEUE( ARG ) wl_wds_netif_start_queue( ARG )
#define WL_WDS_NETIF_STOP_QUEUE( ARG ) wl_wds_netif_stop_queue( ARG )
#define WL_WDS_NETIF_WAKE_QUEUE( ARG ) wl_wds_netif_wake_queue( ARG )
#define WL_WDS_NETIF_CARRIER_ON( ARG ) wl_wds_netif_carrier_on( ARG )
#define WL_WDS_NETIF_CARRIER_OFF( ARG ) wl_wds_netif_carrier_off( ARG )
#else
#define WL_WDS_DEVICE_ALLOC( ARG )
#define WL_WDS_DEVICE_DEALLOC( ARG )
#define WL_WDS_NETIF_START_QUEUE( ARG )
#define WL_WDS_NETIF_STOP_QUEUE( ARG )
#define WL_WDS_NETIF_WAKE_QUEUE( ARG )
#define WL_WDS_NETIF_CARRIER_ON( ARG )
#define WL_WDS_NETIF_CARRIER_OFF( ARG )
#endif /* USE_WDS */
#endif // __WL_NETDEV_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,126 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for the driver to support PCI.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_pci.h,v $
*
******************************************************************************/
#ifndef __WL_PCI_H__
#define __WL_PCI_H__
/*******************************************************************************
* constant definitions
******************************************************************************/
#define WL_LKM_PCI_VENDOR_ID 0x11C1 // Lucent Microelectronics
#define WL_LKM_PCI_DEVICE_ID_0 0xAB30 // Mini PCI
#define WL_LKM_PCI_DEVICE_ID_1 0xAB34 // Mini PCI
#define WL_LKM_PCI_DEVICE_ID_2 0xAB11 // WARP CardBus
/*******************************************************************************
* function prototypes
******************************************************************************/
int wl_adapter_init_module( void );
void wl_adapter_cleanup_module( void );
int wl_adapter_insert( struct net_device *dev );
int wl_adapter_open( struct net_device *dev );
int wl_adapter_close( struct net_device *dev );
int wl_adapter_is_open( struct net_device *dev );
#ifdef ENABLE_DMA
void wl_pci_dma_hcf_supply( struct wl_private *lp );
void wl_pci_dma_hcf_reclaim( struct wl_private *lp );
DESC_STRCT * wl_pci_dma_get_tx_packet( struct wl_private *lp );
void wl_pci_dma_put_tx_packet( struct wl_private *lp, DESC_STRCT *desc );
void wl_pci_dma_hcf_reclaim_tx( struct wl_private *lp );
#endif // ENABLE_DMA
#endif // __WL_PCI_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,138 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for the private IOCTL handlers.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_priv.h,v $
*
******************************************************************************/
#ifndef __WL_PRIV_H__
#define __WL_PRIV_H__
/*******************************************************************************
* function prototypes
******************************************************************************/
#ifdef WIRELESS_EXT
int wvlan_set_netname( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
int wvlan_get_netname( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
int wvlan_set_station_nickname( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
int wvlan_get_station_nickname( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
int wvlan_set_porttype( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
int wvlan_get_porttype( struct net_device *, struct iw_request_info *, union iwreq_data *, char *extra );
#endif // WIRELESS_EXT
#ifdef USE_UIL
int wvlan_uil( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_connect( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_disconnect( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_action( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_block( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_unblock( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_send_diag_msg( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp );
// int wvlan_uil_get_info( struct uilreq *urq, struct wl_private *lp );
//int cfg_driver_info( struct uilreq *urq, struct wl_private *lp );
//int cfg_driver_identity( struct uilreq *urq, struct wl_private *lp );
#endif // USE_UIL
#ifdef USE_RTS
int wvlan_rts( struct rtsreq *rrq, __u32 io_base );
int wvlan_rts_read( __u16 reg, __u16 *val, __u32 io_base );
int wvlan_rts_write( __u16 reg, __u16 val, __u32 io_base );
int wvlan_rts_batch_read( struct rtsreq *rrq, __u32 io_base );
int wvlan_rts_batch_write( struct rtsreq *rrq, __u32 io_base );
#endif // USE_RTS
#endif // __WL_PRIV_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for the config parsing routines.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/23 11:46:19 $
* $Revision: 1.3 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_profile.h,v $
*
******************************************************************************/
#ifndef __WL_PROFILE_H__
#define __WL_PROFILE_H__
/*******************************************************************************
* constant definitions
******************************************************************************/
#define ROOT_CONFIG_FILENAME "/etc/agere/iwconfig-"
/*******************************************************************************
* function prototypes
******************************************************************************/
void parse_config( struct net_device *dev );
int readline( int filedesc, char *buffer );
void translate_option( char *buffer, struct wl_private *lp );
int parse_mac_address( char *value, u_char *byte_array );
void ParseConfigLine( char *pszLine, char **ppszLVal, char **ppszRVal );
#endif // __WL_PROFILE_H__

View File

@ -0,0 +1,135 @@
/*
* ex: sw=4
*/
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <net/sock.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <linux/sysfs.h>
#include <debug.h>
#include <hcf.h>
#include <hcfdef.h>
#include <wl_if.h>
#include <wl_internal.h>
#include <wl_util.h>
#include <wl_main.h>
#include <wl_wext.h>
#include <wl_priv.h>
static inline int dev_isalive(const struct net_device *dev)
{
return dev->reg_state == NETREG_REGISTERED;
}
/*
* empirically even if tallies are defined as 32 bits entities, only
* high 16 bits are relevant; low half is always zero. It means tallies
* are pretty much useless for traffic counting but at least give overview
* about where error come from
*/
static ssize_t show_tallies(struct device *d, struct device_attribute *attr,
char *buf)
{
struct net_device *dev = to_net_dev(d);
struct wl_private *lp = wl_priv(dev);
unsigned long flags;
CFG_HERMES_TALLIES_STRCT tallies;
ssize_t ret = -EINVAL;
read_lock(&dev_base_lock);
if (dev_isalive(dev)) {
wl_lock(lp, &flags);
if ((ret = wl_get_tallies(lp, &tallies)) == 0) {
wl_unlock(lp, &flags);
ret = snprintf(buf, PAGE_SIZE,
"TxUnicastFrames: %u\n"
"TxMulticastFrames: %u\n"
"TxFragments: %u\n"
"TxUnicastOctets: %u\n"
"TxMulticastOctets: %u\n"
"TxDeferredTransmissions: %u\n"
"TxSingleRetryFrames: %u\n"
"TxMultipleRetryFrames: %u\n"
"TxRetryLimitExceeded: %u\n"
"TxDiscards: %u\n"
"RxUnicastFrames: %u\n"
"RxMulticastFrames: %u\n"
"RxFragments: %u\n"
"RxUnicastOctets: %u\n"
"RxMulticastOctets: %u\n"
"RxFCSErrors: %u\n"
"RxDiscardsNoBuffer: %u\n"
"TxDiscardsWrongSA: %u\n"
"RxWEPUndecryptable: %u\n"
"RxMsgInMsgFragments: %u\n"
"RxMsgInBadMsgFragments: %u\n"
"RxDiscardsWEPICVError: %u\n"
"RxDiscardsWEPExcluded: %u\n"
,
(unsigned int)tallies.TxUnicastFrames,
(unsigned int)tallies.TxMulticastFrames,
(unsigned int)tallies.TxFragments,
(unsigned int)tallies.TxUnicastOctets,
(unsigned int)tallies.TxMulticastOctets,
(unsigned int)tallies.TxDeferredTransmissions,
(unsigned int)tallies.TxSingleRetryFrames,
(unsigned int)tallies.TxMultipleRetryFrames,
(unsigned int)tallies.TxRetryLimitExceeded,
(unsigned int)tallies.TxDiscards,
(unsigned int)tallies.RxUnicastFrames,
(unsigned int)tallies.RxMulticastFrames,
(unsigned int)tallies.RxFragments,
(unsigned int)tallies.RxUnicastOctets,
(unsigned int)tallies.RxMulticastOctets,
(unsigned int)tallies.RxFCSErrors,
(unsigned int)tallies.RxDiscardsNoBuffer,
(unsigned int)tallies.TxDiscardsWrongSA,
(unsigned int)tallies.RxWEPUndecryptable,
(unsigned int)tallies.RxMsgInMsgFragments,
(unsigned int)tallies.RxMsgInBadMsgFragments,
(unsigned int)tallies.RxDiscardsWEPICVError,
(unsigned int)tallies.RxDiscardsWEPExcluded);
} else {
wl_unlock( lp, &flags );
}
}
read_unlock(&dev_base_lock);
return ret;
}
static DEVICE_ATTR(tallies, S_IRUGO, show_tallies, NULL);
static struct attribute *wlags_attrs[] = {
&dev_attr_tallies.attr,
NULL
};
static struct attribute_group wlags_group = {
.name = "wlags",
.attrs = wlags_attrs,
};
void register_wlags_sysfs(struct net_device *net)
{
struct device *dev = &(net->dev);
struct wl_private *lp = wl_priv(net);
lp->sysfsCreated = sysfs_create_group(&dev->kobj, &wlags_group);
}
void unregister_wlags_sysfs(struct net_device *net)
{
struct device *dev = &(net->dev);
struct wl_private *lp = wl_priv(net);
if (lp->sysfsCreated)
sysfs_remove_group(&dev->kobj, &wlags_group);
}

View File

@ -0,0 +1,7 @@
#ifdef CONFIG_SYSFS
extern void register_wlags_sysfs(struct net_device *);
extern void unregister_wlags_sysfs(struct net_device *);
#else
static void register_wlags_sysfs(struct net_device *) { return; };
static void unregister_wlags_sysfs(struct net_device *) { return; };
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,119 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for utility functions used
* throughout the driver.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_util.h,v $
*
******************************************************************************/
#ifndef __WL_UTIL_H__
#define __WL_UTIL_H__
/*******************************************************************************
* function prototypes
******************************************************************************/
int dbm( int value );
int is_valid_key_string( char *s );
void key_string2key( char *ks, KEY_STRCT *key );
int hexdigit2int( char c );
void wl_hcf_error( struct net_device *dev, int hcfStatus );
void wl_endian_translate_event( ltv_t *pLtv );
int wl_has_wep( IFBP ifbp );
#if DBG
const char *DbgHwAddr( unsigned char *hwAddr );
#endif // DBG
hcf_8 wl_parse_ds_ie( PROBE_RESP *probe_rsp );
hcf_8 * wl_parse_wpa_ie( PROBE_RESP *probe_rsp, hcf_16 *length );
hcf_8 * wl_print_wpa_ie( hcf_8 *buffer, int length );
int wl_get_tallies(struct wl_private *, CFG_HERMES_TALLIES_STRCT *);
int wl_is_a_valid_chan( int channel );
int wl_is_a_valid_freq( long frequency );
long wl_get_freq_from_chan( int channel );
int wl_get_chan_from_freq( long frequency );
void wl_process_link_status( struct wl_private *lp );
void wl_process_probe_response( struct wl_private *lp );
void wl_process_updated_record( struct wl_private *lp );
void wl_process_assoc_status( struct wl_private *lp );
void wl_process_security_status( struct wl_private *lp );
unsigned int wl_atoi( char *string );
#endif // __WL_UTIL_H__

View File

@ -0,0 +1,193 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* This header file contains version information for the code base, as well as
* special definitions and macros needed by certain versions of the code.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/08/04 12:36:10 $
* $Revision: 1.7 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_version.h,v $
*
******************************************************************************/
#ifndef __WL_VERSION_H__
#define __WL_VERSION_H__
/*******************************************************************************
* include files
******************************************************************************/
//#include <linux/config.h>
#include <linux/version.h>
#ifndef CONFIG_MODVERSIONS
#define __NO_VERSION__
#endif // CONFIG_MODVERSIONS
/*******************************************************************************
* constant definitions
******************************************************************************/
#define VENDOR_NAME "Agere Systems, http://www.agere.com"
#define DRIVER_NAME "wlags49"
#define DRV_IDENTITY 49
#define DRV_MAJOR_VERSION 7
#define DRV_MINOR_VERSION 22
#define DRV_VERSION_STR "7.22"
#if defined BUS_PCMCIA
#define BUS_TYPE "PCMCIA"
#elif defined BUS_PCI
#define BUS_TYPE "PCI"
#else
err: define bus type;
#endif // BUS_XXX
#if defined HERMES25
#define HW_TYPE "HII.5"
#else
#define HW_TYPE "HII"
#endif // HERMES25
#if defined WARP
#define FW_TYPE "WARP"
#else
#define FW_TYPE "BEAGLE"
#endif // WARP
#if defined HERMES25
#if defined WARP
#define DRV_VARIANT 3
#else
#define DRV_VARIANT 4
#endif // WARP
#else
#define DRV_VARIANT 2
#endif // HERMES25
#ifdef BUS_PCMCIA
#if defined HERMES25
#define MODULE_NAME DRIVER_NAME "_h25_cs"
#else
#define MODULE_NAME DRIVER_NAME "_h2_cs"
#endif /* HERMES25 */
#elif defined BUS_PCI
#if defined HERMES25
#define MODULE_NAME DRIVER_NAME "_h25"
#else
#define MODULE_NAME DRIVER_NAME "_h2"
#endif /* HERMES25 */
#endif /* BUS_XXX */
#ifdef DBG
#define MODULE_DATE __DATE__ " " __TIME__
#else
#define MODULE_DATE "07/18/2004 13:30:00"
#endif // DBG
//#define STR2(m) #m
//#define STR1(m) STR2(m)
//#define MODULE_NAME STR1( MOD_NAME )
#define VERSION_INFO MODULE_NAME " v" DRV_VERSION_STR \
" for " BUS_TYPE ", " \
MODULE_DATE " by " VENDOR_NAME
#define WIRELESS_SUPPORT 15 // The version of wireless extensions we support
//#define DBG_MOD_NAME DRIVER_NAME ":" BUS_TYPE ":" HW_TYPE ":" FW_TYPE
#define DBG_MOD_NAME MODULE_NAME
/*******************************************************************************
* bus architechture specific defines, includes, etc.
******************************************************************************/
/*
* There doesn't seem to be a difference for PCMCIA and PCI anymore, at least
* for PCMCIA the same defines are needed now as previously only used for PCI
*/
#if USE_WEXT
#define HAS_WIRELESS_EXTENSIONS
#endif // USE_WEXT
#define NEW_MULTICAST
#define ALLOC_SKB(len) dev_alloc_skb(len+2)
#define GET_PACKET(dev, skb, count)\
skb_reserve((skb), 2); \
BLOCK_INPUT(skb_put((skb), (count)), (count)); \
(skb)->protocol = eth_type_trans((skb), (dev))
#define GET_PACKET_DMA(dev, skb, count)\
skb_reserve((skb), 2); \
BLOCK_INPUT_DMA(skb_put((skb), (count)), (count)); \
(skb)->protocol = eth_type_trans((skb), (dev))
#endif // __WL_VERSION_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,113 @@
/*******************************************************************************
* Agere Systems Inc.
* Wireless device driver for Linux (wlags49).
*
* Copyright (c) 1998-2003 Agere Systems Inc.
* All rights reserved.
* http://www.agere.com
*
* Initially developed by TriplePoint, Inc.
* http://www.triplepoint.com
*
*------------------------------------------------------------------------------
*
* Header describing information required for the wireless IOCTL handlers.
*
*------------------------------------------------------------------------------
*
* SOFTWARE LICENSE
*
* This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software.
*
* Copyright © 2003 Agere Systems Inc.
* All rights reserved.
*
* Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the
* distribution.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* Disclaimer
*
* THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
******************************************************************************/
/*******************************************************************************
* VERSION CONTROL INFORMATION
*******************************************************************************
*
* $Author: nico $
* $Date: 2004/07/19 08:16:15 $
* $Revision: 1.2 $
* $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_wext.h,v $
*
******************************************************************************/
#ifndef __WL_WEXT_H__
#define __WL_WEXT_H__
#ifdef WIRELESS_EXT
/*******************************************************************************
* function protoypes
******************************************************************************/
struct iw_statistics *wl_wireless_stats( struct net_device *dev );
struct iw_statistics * wl_get_wireless_stats( struct net_device *dev );
inline void wl_spy_gather (struct net_device *dev, u_char *mac);
void wl_wext_event_freq( struct net_device *dev );
void wl_wext_event_mode( struct net_device *dev );
void wl_wext_event_essid( struct net_device *dev );
void wl_wext_event_encode( struct net_device *dev );
void wl_wext_event_ap( struct net_device *dev );
void wl_wext_event_scan_complete( struct net_device *dev );
void wl_wext_event_new_sta( struct net_device *dev );
void wl_wext_event_expired_sta( struct net_device *dev );
void wl_wext_event_mic_failed( struct net_device *dev );
void wl_wext_event_assoc_ie( struct net_device *dev );
extern const struct iw_handler_def wl_iw_handler_def;
#else
#error WIRELESS_EXT
#endif // WIRELESS_EXT
#endif // __WL_WEXT_H__

View File

@ -0,0 +1,8 @@
config WLAGS49_H25
tristate "Linksys HERMES II.5 WCF54G_Wireless-G_CompactFlash_Card"
depends on WLAN_80211 && WIRELESS_EXT
---help---
Driver for wireless cards using Agere's HERMES II.5 chipset
which are identified with Manufacture ID: 0156,0004
The software is a modified version of wl_lkm_722_abg.tar.gz
from the Agere Systems website, addapted for Ubuntu 9.04.

View File

@ -0,0 +1,81 @@
#
# Makefile for wlags49_h2_cs.ko and wlags49_h25_cs.ko
#
# Default build for Hermes-II base cards (possibly identified with
# "manfid: 0x0156, 0x0003" in "pccardctl ident" output), comment
# -DHERMES25 below
#
# If you want to build for Hermes-II.5 base cards (possibly identified with
# "manfid: 0x0156, 0x0004" in "pccardctl ident" output), uncomment
# -DHERMES25 below
#
# If you want to build AP support (untested), comment out -DSTA_ONLY
INSTALLDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless
EXTRA_CFLAGS += -I$(KERNELDIR)/include
EXTRA_CFLAGS += -I$(src) \
-DBUS_PCMCIA \
-DUSE_WPA \
-DUSE_WEXT \
-DSTA_ONLY \
-DWVLAN_49 \
-DHERMES25 \
# -DDBG \
# -DDBG_LVL=5 \
# -DUSE_UIL \
# -DUSE_PROFILE \
ifeq ($(findstring HERMES25,$(EXTRA_CFLAGS)),)
WLNAME := wlags49_h2_cs
$(WLNAME)-y := sta_h2.o
ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),)
$(WLNAME)-y += ap_h2.o
endif
else
WLNAME=wlags49_h25_cs
$(WLNAME)-y := sta_h25.o
ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),)
$(WLNAME)-y += ap_h25.o
endif
endif
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m += $(WLNAME).o
$(WLNAME)-y += wl_profile.o \
wl_wext.o \
wl_priv.o \
wl_main.o \
wl_enc.o \
wl_util.o \
wl_netdev.o \
wl_cs.o \
mmd.o \
hcf.o \
dhf.o
$(WLNAME)-$(CONFIG_SYSFS) += wl_sysfs.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
clean:
rm -fr *.o *.ko *.mod.c *.mod.o .*.*.cmd Module.symvers \
Module.markers modules.order .tmp_versions
install: default
-rmmod $(WLNAME)
install -d $(INSTALLDIR)
install -m 0644 -o root -g root $(WLNAME).ko $(INSTALLDIR)
/sbin/depmod -aq

View File

@ -0,0 +1,30 @@
=======================================================================
WLAN driver for cards using the HERMES II and HERMES II.5 chipset
HERMES II Card
PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110"
Manufacture ID: 0156,0003
HERMES II.5 Card
PCMCIA Info: "Linksys" "WCF54G_Wireless-G_CompactFlash_Card"
Manufacture ID: 0156,0004
Based on Agere Systems Linux LKM Wireless Driver Source Code,
Version 7.22; complies with Open Source BSD License.
=======================================================================
DESCRIPTION
This directory only contains files that refer to the source in wlags49_h2.
Only real sourcefiles are the Makefile which has been configured to build
the driver for the HERMES II.5 chipset and Kconfig to describe the driver.
The wlags49_h2 directory contains the full source, including the files
exclusively used by this driver.
For more information about the driver look at the wlags49_h2 direcory.
=======================================================================

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/ap_h25.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/debug.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/dhf.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/dhf.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/dhfcfg.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/hcf.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/hcf.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/hcfcfg.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/hcfdef.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/mdd.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/mmd.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/mmd.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/sta_h25.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_cs.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_cs.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_enc.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_enc.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_if.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_internal.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_main.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_main.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_netdev.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_netdev.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_priv.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_priv.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_profile.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_profile.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_sysfs.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_sysfs.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_util.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_util.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_version.h"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_wext.c"

View File

@ -0,0 +1,2 @@
/* Use common source from wlags49_h2 */
#include "../wlags49_h2/wl_wext.h"