Commit 17e2ec07 authored by Jeff Garzik's avatar Jeff Garzik

Merge kernel.bkbits.net:net-drivers-2.5

into redhat.com:/spare/repo/net-drivers-2.5
parents 69ad4703 4d92fbee
......@@ -307,6 +307,53 @@ config PCMCIA_WL3501
It has basic support for Linux wireless extensions and initial
micro support for ethtool.
comment "Prism GT/Duette 802.11(a/b/g) PCI/PCMCIA support"
depends on NET_RADIO && PCI
config PRISM54
tristate 'Intersil Prism GT/Duette/Indigo PCI/PCMCIA'
depends on PCI && NET_RADIO && EXPERIMENTAL && HOTPLUG
select FW_LOADER
---help---
Enable PCI and Cardbus support for the following chipset based cards:
ISL3880 - Prism GT 802.11 b/g
ISL3877 - Prism Indigo 802.11 a
ISL3890 - Prism Duette 802.11 a/b/g
For a complete list of supported cards visit <http://prism54.org>.
Here is the latest confirmed list of supported cards:
3com OfficeConnect 11g Cardbus Card aka 3CRWE154G72
Allnet ALL0271 PCI Card
Compex WL54G Cardbus Card
Corega CG-WLCB54GT Cardbus Card
D-Link Air Plus Xtreme G A1 Cardbus Card aka DWL-g650
I-O Data WN-G54/CB Cardbus Card
Kobishi XG-300 aka Z-Com Cardbus Card
Netgear WG511 Cardbus Card
Ovislink WL-5400PCI PCI Card
Peabird WLG-PCI PCI Card
Sitecom WL-100i Cardbus Card
Sitecom WL-110i PCI Card
SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card
SMC2835W - EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Card
Z-Com XG-900 PCI Card
Zyxel G-100 Cardbus Card
If you enable this you will need a firmware file as well.
You will need to copy this to /usr/lib/hotplug/firmware/isl3890.
You can get this non-GPL'd firmware file from the Prism54 project page:
<http://prism54.org>
You will also need the /etc/hotplug/firmware.agent script from
a current hotplug package.
Note: You need a motherboard with DMA support to use any of these cards
If you want to compile the driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
will be called prism54.ko.
# yes, this works even when no drivers are selected
config NET_WIRELESS
bool
......
......@@ -26,6 +26,8 @@ obj-$(CONFIG_ATMEL) += atmel.o
obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o
obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o
obj-$(CONFIG_PRISM54) += prism54/
# 16-bit wireless PCMCIA client drivers
obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
# $Id: Makefile.k26,v 1.7 2004/01/30 16:24:00 ajfa Exp $
prism54-objs := islpci_eth.o islpci_mgt.o \
isl_38xx.o isl_ioctl.o islpci_dev.o \
islpci_hotplug.o oid_mgt.o
obj-$(CONFIG_PRISM54) += prism54.o
EXTRA_CFLAGS = -I$(PWD) #-DCONFIG_PRISM54_WDS
This diff is collapsed.
/* $Header: /var/lib/cvs/prism54-ng/ksrc/isl_38xx.h,v 1.22 2004/02/28 03:06:07 mcgrof Exp $
*
* Copyright (C) 2002 Intersil Americas Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _ISL_38XX_H
#define _ISL_38XX_H
#include <linux/version.h>
#include <asm/io.h>
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75))
#include <linux/device.h>
# define _REQ_FW_DEV_T struct device *
#else
# define _REQ_FW_DEV_T char *
#endif
#include <asm/byteorder.h>
#define ISL38XX_CB_RX_QSIZE 8
#define ISL38XX_CB_TX_QSIZE 32
/* ISL38XX Access Point Specific definitions */
#define ISL38XX_MAX_WDS_LINKS 8
/* ISL38xx Client Specific definitions */
#define ISL38XX_PSM_ACTIVE_STATE 0
#define ISL38XX_PSM_POWERSAVE_STATE 1
/* ISL38XX Host Interface Definitions */
#define ISL38XX_PCI_MEM_SIZE 0x02000
#define ISL38XX_MEMORY_WINDOW_SIZE 0x01000
#define ISL38XX_DEV_FIRMWARE_ADDRES 0x20000
#define ISL38XX_WRITEIO_DELAY 10 /* in us */
#define ISL38XX_RESET_DELAY 50 /* in ms */
#define ISL38XX_WAIT_CYCLE 10 /* in 10ms */
#define ISL38XX_MAX_WAIT_CYCLES 10
/* PCI Memory Area */
#define ISL38XX_HARDWARE_REG 0x0000
#define ISL38XX_CARDBUS_CIS 0x0800
#define ISL38XX_DIRECT_MEM_WIN 0x1000
/* Hardware registers */
#define ISL38XX_DEV_INT_REG 0x0000
#define ISL38XX_INT_IDENT_REG 0x0010
#define ISL38XX_INT_ACK_REG 0x0014
#define ISL38XX_INT_EN_REG 0x0018
#define ISL38XX_GEN_PURP_COM_REG_1 0x0020
#define ISL38XX_GEN_PURP_COM_REG_2 0x0024
#define ISL38XX_CTRL_BLK_BASE_REG ISL38XX_GEN_PURP_COM_REG_1
#define ISL38XX_DIR_MEM_BASE_REG 0x0030
#define ISL38XX_CTRL_STAT_REG 0x0078
/* High end mobos queue up pci writes, the following
* is used to "read" from after a write to force flush */
#define ISL38XX_PCI_POSTING_FLUSH ISL38XX_INT_EN_REG
/**
* isl38xx_w32_flush - PCI iomem write helper
* @base: (host) memory base address of the device
* @val: 32bit value (host order) to write
* @offset: byte offset into @base to write value to
*
* This helper takes care of writing a 32bit datum to the
* specified offset into the device's pci memory space, and making sure
* the pci memory buffers get flushed by performing one harmless read
* from the %ISL38XX_PCI_POSTING_FLUSH offset.
*/
static inline void
isl38xx_w32_flush(void *base, u32 val, unsigned long offset)
{
writel(val, base + offset);
(void) readl(base + ISL38XX_PCI_POSTING_FLUSH);
}
/* Device Interrupt register bits */
#define ISL38XX_DEV_INT_RESET 0x0001
#define ISL38XX_DEV_INT_UPDATE 0x0002
#define ISL38XX_DEV_INT_WAKEUP 0x0008
#define ISL38XX_DEV_INT_SLEEP 0x0010
/* Interrupt Identification/Acknowledge/Enable register bits */
#define ISL38XX_INT_IDENT_UPDATE 0x0002
#define ISL38XX_INT_IDENT_INIT 0x0004
#define ISL38XX_INT_IDENT_WAKEUP 0x0008
#define ISL38XX_INT_IDENT_SLEEP 0x0010
#define ISL38XX_INT_SOURCES 0x001E
/* Control/Status register bits */
#define ISL38XX_CTRL_STAT_SLEEPMODE 0x00000200
#define ISL38XX_CTRL_STAT_CLKRUN 0x00800000
#define ISL38XX_CTRL_STAT_RESET 0x10000000
#define ISL38XX_CTRL_STAT_RAMBOOT 0x20000000
#define ISL38XX_CTRL_STAT_STARTHALTED 0x40000000
#define ISL38XX_CTRL_STAT_HOST_OVERRIDE 0x80000000
/* Control Block definitions */
#define ISL38XX_CB_RX_DATA_LQ 0
#define ISL38XX_CB_TX_DATA_LQ 1
#define ISL38XX_CB_RX_DATA_HQ 2
#define ISL38XX_CB_TX_DATA_HQ 3
#define ISL38XX_CB_RX_MGMTQ 4
#define ISL38XX_CB_TX_MGMTQ 5
#define ISL38XX_CB_QCOUNT 6
#define ISL38XX_CB_MGMT_QSIZE 4
#define ISL38XX_MIN_QTHRESHOLD 4 /* fragments */
/* Memory Manager definitions */
#define MGMT_FRAME_SIZE 1500 /* >= size struct obj_bsslist */
#define MGMT_TX_FRAME_COUNT 24 /* max 4 + spare 4 + 8 init */
#define MGMT_RX_FRAME_COUNT 24 /* 4*4 + spare 8 */
#define MGMT_FRAME_COUNT (MGMT_TX_FRAME_COUNT + MGMT_RX_FRAME_COUNT)
#define CONTROL_BLOCK_SIZE 1024 /* should be enough */
#define PSM_FRAME_SIZE 1536
#define PSM_MINIMAL_STATION_COUNT 64
#define PSM_FRAME_COUNT PSM_MINIMAL_STATION_COUNT
#define PSM_BUFFER_SIZE PSM_FRAME_SIZE * PSM_FRAME_COUNT
#define MAX_TRAP_RX_QUEUE 4
#define HOST_MEM_BLOCK CONTROL_BLOCK_SIZE + PSM_BUFFER_SIZE
/* Fragment package definitions */
#define FRAGMENT_FLAG_MF 0x0001
#define MAX_FRAGMENT_SIZE 1536
/* In monitor mode frames have a header. I don't know exactly how big those
* frame can be but I've never seen any frame bigger than 1584... :
*/
#define MAX_FRAGMENT_SIZE_RX 1600
typedef struct {
u32 address; /* physical address on host */
u16 size; /* packet size */
u16 flags; /* set of bit-wise flags */
} isl38xx_fragment;
struct isl38xx_cb {
u32 driver_curr_frag[ISL38XX_CB_QCOUNT];
u32 device_curr_frag[ISL38XX_CB_QCOUNT];
isl38xx_fragment rx_data_low[ISL38XX_CB_RX_QSIZE];
isl38xx_fragment tx_data_low[ISL38XX_CB_TX_QSIZE];
isl38xx_fragment rx_data_high[ISL38XX_CB_RX_QSIZE];
isl38xx_fragment tx_data_high[ISL38XX_CB_TX_QSIZE];
isl38xx_fragment rx_data_mgmt[ISL38XX_CB_MGMT_QSIZE];
isl38xx_fragment tx_data_mgmt[ISL38XX_CB_MGMT_QSIZE];
};
typedef struct isl38xx_cb isl38xx_control_block;
/* determine number of entries currently in queue */
int isl38xx_in_queue(isl38xx_control_block *cb, int queue);
void isl38xx_disable_interrupts(void *);
void isl38xx_enable_common_interrupts(void *);
void isl38xx_handle_sleep_request(isl38xx_control_block *, int *,
void *);
void isl38xx_handle_wakeup(isl38xx_control_block *, int *, void *);
void isl38xx_trigger_device(int, void *);
void isl38xx_interface_reset(void *, dma_addr_t);
int isl38xx_upload_firmware(char *, _REQ_FW_DEV_T, void *, dma_addr_t);
#endif /* _ISL_38XX_H */
This diff is collapsed.
/* $Header: /var/lib/cvs/prism54-ng/ksrc/isl_ioctl.h,v 1.30 2004/01/30 16:24:00 ajfa Exp $
*
* Copyright (C) 2002 Intersil Americas Inc.
* (C) 2003 Aurelien Alleaume <slts@free.fr>
* (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _ISL_IOCTL_H
#define _ISL_IOCTL_H
#include "islpci_mgt.h"
#include "islpci_dev.h"
#include <net/iw_handler.h> /* New driver API */
#define SUPPORTED_WIRELESS_EXT 16
void prism54_mib_init(islpci_private *);
void prism54_mib_init_work(islpci_private *);
struct iw_statistics *prism54_get_wireless_stats(struct net_device *);
void prism54_update_stats(islpci_private *);
void prism54_acl_init(struct islpci_acl *);
void prism54_acl_clean(struct islpci_acl *);
void prism54_process_trap(void *);
void prism54_wpa_ie_init(islpci_private *priv);
void prism54_wpa_ie_clean(islpci_private *priv);
void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid,
u8 *wpa_ie, size_t wpa_ie_len);
size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie);
int prism54_set_mac_address(struct net_device *, void *);
int prism54_ioctl(struct net_device *, struct ifreq *, int);
extern const struct iw_handler_def prism54_handler_def;
#endif /* _ISL_IOCTL_H */
/*
* $Id: isl_oid.h,v 1.2 2004/01/30 16:24:00 ajfa Exp $
*
* Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#if !defined(_ISL_OID_H)
#define _ISL_OID_H
/*
* MIB related constant and structure definitions for communicating
* with the device firmware
*/
struct obj_ssid {
u8 length;
char octets[33];
} __attribute__ ((packed));
struct obj_key {
u8 type; /* dot11_priv_t */
u8 length;
char key[32];
} __attribute__ ((packed));
struct obj_mlme {
u8 address[6];
u16 id;
u16 state;
u16 code;
} __attribute__ ((packed));
struct obj_mlmeex {
u8 address[6];
u16 id;
u16 state;
u16 code;
u16 size;
u8 data[0];
} __attribute__ ((packed));
struct obj_buffer {
u32 size;
u32 addr; /* 32bit bus address */
} __attribute__ ((packed));
struct obj_bss {
u8 address[6];
int:16; /* padding */
char state;
char reserved;
short age;
char quality;
char rssi;
struct obj_ssid ssid;
short channel;
char beacon_period;
char dtim_period;
short capinfo;
short rates;
short basic_rates;
int:16; /* padding */
} __attribute__ ((packed));
struct obj_bsslist {
u32 nr;
struct obj_bss bsslist[0];
} __attribute__ ((packed));
struct obj_frequencies {
u16 nr;
u16 mhz[0];
} __attribute__ ((packed));
/*
* in case everything's ok, the inlined function below will be
* optimized away by the compiler...
*/
static inline void
__bug_on_wrong_struct_sizes(void)
{
BUG_ON(sizeof (struct obj_ssid) != 34);
BUG_ON(sizeof (struct obj_key) != 34);
BUG_ON(sizeof (struct obj_mlme) != 12);
BUG_ON(sizeof (struct obj_mlmeex) != 14);
BUG_ON(sizeof (struct obj_buffer) != 8);
BUG_ON(sizeof (struct obj_bss) != 60);
BUG_ON(sizeof (struct obj_bsslist) != 4);
BUG_ON(sizeof (struct obj_frequencies) != 2);
}
enum dot11_state_t {
DOT11_STATE_NONE = 0,
DOT11_STATE_AUTHING = 1,
DOT11_STATE_AUTH = 2,
DOT11_STATE_ASSOCING = 3,
DOT11_STATE_ASSOC = 5,
DOT11_STATE_IBSS = 6,
DOT11_STATE_WDS = 7
};
enum dot11_bsstype_t {
DOT11_BSSTYPE_NONE = 0,
DOT11_BSSTYPE_INFRA = 1,
DOT11_BSSTYPE_IBSS = 2,
DOT11_BSSTYPE_ANY = 3
};
enum dot11_auth_t {
DOT11_AUTH_NONE = 0,
DOT11_AUTH_OS = 1,
DOT11_AUTH_SK = 2,
DOT11_AUTH_BOTH = 3
};
enum dot11_mlme_t {
DOT11_MLME_AUTO = 0,
DOT11_MLME_INTERMEDIATE = 1,
DOT11_MLME_EXTENDED = 2
};
enum dot11_priv_t {
DOT11_PRIV_WEP = 0,
DOT11_PRIV_TKIP = 1
};
/* The dot11d conformance level configures the 802.11d conformance levels.
* The following conformance levels exist:*/
enum oid_inl_conformance_t {
OID_INL_CONFORMANCE_NONE = 0, /* Perform active scanning */
OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */
OID_INL_CONFORMANCE_FLEXIBLE = 2, /* Use passed 802.11d info to
* determine channel AND/OR just make
* assumption that active
* channels are valid channels */
};
enum oid_inl_mode_t {
INL_MODE_NONE = -1,
INL_MODE_PROMISCUOUS = 0,
INL_MODE_CLIENT = 1,
INL_MODE_AP = 2,
INL_MODE_SNIFFER = 3
};
enum oid_inl_config_t {
INL_CONFIG_NOTHING = 0x00,
INL_CONFIG_MANUALRUN = 0x01,
INL_CONFIG_FRAMETRAP = 0x02,
INL_CONFIG_RXANNEX = 0x04,
INL_CONFIG_TXANNEX = 0x08,
INL_CONFIG_WDS = 0x10
};
enum oid_inl_phycap_t {
INL_PHYCAP_2400MHZ = 1,
INL_PHYCAP_5000MHZ = 2,
INL_PHYCAP_FAA = 0x80000000, /* Means card supports the FAA switch */
};
enum oid_num_t {
GEN_OID_MACADDRESS = 0,
GEN_OID_LINKSTATE,
GEN_OID_WATCHDOG,
GEN_OID_MIBOP,
GEN_OID_OPTIONS,
GEN_OID_LEDCONFIG,
/* 802.11 */
DOT11_OID_BSSTYPE,
DOT11_OID_BSSID,
DOT11_OID_SSID,
DOT11_OID_STATE,
DOT11_OID_AID,
DOT11_OID_COUNTRYSTRING,
DOT11_OID_SSIDOVERRIDE,
DOT11_OID_MEDIUMLIMIT,
DOT11_OID_BEACONPERIOD,
DOT11_OID_DTIMPERIOD,
DOT11_OID_ATIMWINDOW,
DOT11_OID_LISTENINTERVAL,
DOT11_OID_CFPPERIOD,
DOT11_OID_CFPDURATION,
DOT11_OID_AUTHENABLE,
DOT11_OID_PRIVACYINVOKED,
DOT11_OID_EXUNENCRYPTED,
DOT11_OID_DEFKEYID,
DOT11_OID_DEFKEYX, /* DOT11_OID_DEFKEY1,...DOT11_OID_DEFKEY4 */
DOT11_OID_STAKEY,
DOT11_OID_REKEYTHRESHOLD,
DOT11_OID_STASC,
DOT11_OID_PRIVTXREJECTED,
DOT11_OID_PRIVRXPLAIN,
DOT11_OID_PRIVRXFAILED,
DOT11_OID_PRIVRXNOKEY,
DOT11_OID_RTSTHRESH,
DOT11_OID_FRAGTHRESH,
DOT11_OID_SHORTRETRIES,
DOT11_OID_LONGRETRIES,
DOT11_OID_MAXTXLIFETIME,
DOT11_OID_MAXRXLIFETIME,
DOT11_OID_AUTHRESPTIMEOUT,
DOT11_OID_ASSOCRESPTIMEOUT,
DOT11_OID_ALOFT_TABLE,
DOT11_OID_ALOFT_CTRL_TABLE,
DOT11_OID_ALOFT_RETREAT,
DOT11_OID_ALOFT_PROGRESS,
DOT11_OID_ALOFT_FIXEDRATE,
DOT11_OID_ALOFT_RSSIGRAPH,
DOT11_OID_ALOFT_CONFIG,
DOT11_OID_VDCFX,
DOT11_OID_MAXFRAMEBURST,
DOT11_OID_PSM,
DOT11_OID_CAMTIMEOUT,
DOT11_OID_RECEIVEDTIMS,
DOT11_OID_ROAMPREFERENCE,
DOT11_OID_BRIDGELOCAL,
DOT11_OID_CLIENTS,
DOT11_OID_CLIENTSASSOCIATED,
DOT11_OID_CLIENTX, /* DOT11_OID_CLIENTX,...DOT11_OID_CLIENT2007 */
DOT11_OID_CLIENTFIND,
DOT11_OID_WDSLINKADD,
DOT11_OID_WDSLINKREMOVE,
DOT11_OID_EAPAUTHSTA,
DOT11_OID_EAPUNAUTHSTA,
DOT11_OID_DOT1XENABLE,
DOT11_OID_MICFAILURE,
DOT11_OID_REKEYINDICATE,
DOT11_OID_MPDUTXSUCCESSFUL,
DOT11_OID_MPDUTXONERETRY,
DOT11_OID_MPDUTXMULTIPLERETRIES,
DOT11_OID_MPDUTXFAILED,
DOT11_OID_MPDURXSUCCESSFUL,
DOT11_OID_MPDURXDUPS,
DOT11_OID_RTSSUCCESSFUL,
DOT11_OID_RTSFAILED,
DOT11_OID_ACKFAILED,
DOT11_OID_FRAMERECEIVES,
DOT11_OID_FRAMEERRORS,
DOT11_OID_FRAMEABORTS,
DOT11_OID_FRAMEABORTSPHY,
DOT11_OID_SLOTTIME,
DOT11_OID_CWMIN,
DOT11_OID_CWMAX,
DOT11_OID_ACKWINDOW,
DOT11_OID_ANTENNARX,
DOT11_OID_ANTENNATX,
DOT11_OID_ANTENNADIVERSITY,
DOT11_OID_CHANNEL,
DOT11_OID_EDTHRESHOLD,
DOT11_OID_PREAMBLESETTINGS,
DOT11_OID_RATES,
DOT11_OID_CCAMODESUPPORTED,
DOT11_OID_CCAMODE,
DOT11_OID_RSSIVECTOR,
DOT11_OID_OUTPUTPOWERTABLE,
DOT11_OID_OUTPUTPOWER,
DOT11_OID_SUPPORTEDRATES,
DOT11_OID_FREQUENCY,
DOT11_OID_SUPPORTEDFREQUENCIES,
DOT11_OID_NOISEFLOOR,
DOT11_OID_FREQUENCYACTIVITY,
DOT11_OID_IQCALIBRATIONTABLE,
DOT11_OID_NONERPPROTECTION,
DOT11_OID_SLOTSETTINGS,
DOT11_OID_NONERPTIMEOUT,
DOT11_OID_PROFILES,
DOT11_OID_EXTENDEDRATES,
DOT11_OID_DEAUTHENTICATE,
DOT11_OID_AUTHENTICATE,
DOT11_OID_DISASSOCIATE,
DOT11_OID_ASSOCIATE,
DOT11_OID_SCAN,
DOT11_OID_BEACON,
DOT11_OID_PROBE,
DOT11_OID_DEAUTHENTICATEEX,
DOT11_OID_AUTHENTICATEEX,
DOT11_OID_DISASSOCIATEEX,
DOT11_OID_ASSOCIATEEX,
DOT11_OID_REASSOCIATE,
DOT11_OID_REASSOCIATEEX,
DOT11_OID_NONERPSTATUS,
DOT11_OID_STATIMEOUT,
DOT11_OID_MLMEAUTOLEVEL,
DOT11_OID_BSSTIMEOUT,
DOT11_OID_ATTACHMENT,
DOT11_OID_PSMBUFFER,
DOT11_OID_BSSS,
DOT11_OID_BSSX, /*DOT11_OID_BSS1,...,DOT11_OID_BSS64 */
DOT11_OID_BSSFIND,
DOT11_OID_BSSLIST,
OID_INL_TUNNEL,
OID_INL_MEMADDR,
OID_INL_MEMORY,
OID_INL_MODE,
OID_INL_COMPONENT_NR,
OID_INL_VERSION,
OID_INL_INTERFACE_ID,
OID_INL_COMPONENT_ID,
OID_INL_CONFIG,
OID_INL_DOT11D_CONFORMANCE,
OID_INL_PHYCAPABILITIES,
OID_INL_OUTPUTPOWER,
OID_NUM_LAST
};
/* We could add more flags. eg: in which mode are they allowed, ro, rw, ...*/
#define OID_FLAG_CACHED 0x01
#define OID_FLAG_U32 0x02
#define OID_FLAG_MLMEEX 0x04 /* this type is special because of a variable
size field when sending. Not yet implemented (not used in driver). */
struct oid_t {
enum oid_num_t oid;
short range; /* to define a range of oid */
short size; /* size of the associated data */
char flags;
};
union oid_res_t {
void *ptr;
u32 u;
};
#define IWMAX_BITRATES 20
#define IWMAX_BSS 24
#define IWMAX_FREQ 30
#endif /* !defined(_ISL_OID_H) */
/* EOF */
This diff is collapsed.
/* $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.h,v 1.53 2004/02/28 03:06:07 mcgrof Exp $
*
* Copyright (C) 2002 Intersil Americas Inc.
* Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
* Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _ISLPCI_DEV_H
#define _ISLPCI_DEV_H
#include <linux/version.h>
#include <linux/netdevice.h>
#include <linux/wireless.h>
#include <linux/list.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
# include <linux/workqueue.h>
#else
# include <linux/tqueue.h>
# define work_struct tq_struct
# define INIT_WORK INIT_TQUEUE
# define schedule_work schedule_task
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
#define free_netdev(x) kfree(x)
#define pci_name(x) x->slot_name
#endif
#include "isl_38xx.h"
#include "isl_oid.h"
#include "islpci_mgt.h"
/* some states might not be superflous and may be removed when
design is finalized (hvr) */
typedef enum {
PRV_STATE_OFF = 0, /* this means hw_unavailable is != 0 */
PRV_STATE_PREBOOT, /* we are in a pre-boot state (empty RAM) */
PRV_STATE_BOOT, /* boot state (fw upload, run fw) */
PRV_STATE_POSTBOOT, /* after boot state, need reset now */
PRV_STATE_PREINIT, /* pre-init state */
PRV_STATE_INIT, /* init state (restore MIB backup to device) */
PRV_STATE_READY, /* driver&device are in operational state */
PRV_STATE_SLEEP /* device in sleep mode */
} islpci_state_t;
/* ACL using MAC address */
struct mac_entry {
struct list_head _list;
char addr[ETH_ALEN];
};
struct islpci_acl {
enum { MAC_POLICY_OPEN=0, MAC_POLICY_ACCEPT=1, MAC_POLICY_REJECT=2 } policy;
struct list_head mac_list; /* a list of mac_entry */
int size; /* size of queue */
struct semaphore sem; /* accessed in ioctls and trap_work */
};
struct islpci_membuf {
int size; /* size of memory */
void *mem; /* address of memory as seen by CPU */
dma_addr_t pci_addr; /* address of memory as seen by device */
};
#define MAX_BSS_WPA_IE_COUNT 64
#define MAX_WPA_IE_LEN 64
struct islpci_bss_wpa_ie {
struct list_head list;
unsigned long last_update;
u8 bssid[ETH_ALEN];
u8 wpa_ie[MAX_WPA_IE_LEN];
size_t wpa_ie_len;
};
typedef struct {
spinlock_t slock; /* generic spinlock; */
u32 priv_oid;
/* our mib cache */
u32 iw_mode;
struct rw_semaphore mib_sem;
void **mib;
char nickname[IW_ESSID_MAX_SIZE+1];
/* Take care of the wireless stats */
struct work_struct stats_work;
struct semaphore stats_sem;
/* remember when we last updated the stats */
unsigned long stats_timestamp;
/* The first is accessed under semaphore locking.
* The second is the clean one we return to iwconfig.
*/
struct iw_statistics local_iwstatistics;
struct iw_statistics iwstatistics;
struct islpci_acl acl;
/* PCI bus allocation & configuration members */
struct pci_dev *pdev; /* PCI structure information */
u32 pci_state[16]; /* used for suspend/resume */
char firmware[33];
void *device_base; /* ioremapped device base address */
/* consistent DMA region */
void *driver_mem_address; /* base DMA address */
dma_addr_t device_host_address; /* base DMA address (bus address) */
dma_addr_t device_psm_buffer; /* host memory for PSM buffering (bus address) */
/* our network_device structure */
struct net_device *ndev;
/* device queue interface members */
struct isl38xx_cb *control_block; /* device control block
(== driver_mem_address!) */
/* Each queue has three indexes:
* free/index_mgmt/data_rx/tx (called index, see below),
* driver_curr_frag, and device_curr_frag (in the control block)
* All indexes are ever-increasing, but interpreted modulo the
* device queue size when used.
* index <= device_curr_frag <= driver_curr_frag at all times
* For rx queues, [index, device_curr_frag) contains fragments
* that the interrupt processing needs to handle (owned by driver).
* [device_curr_frag, driver_curr_frag) is the free space in the
* rx queue, waiting for data (owned by device). The driver
* increments driver_curr_frag to indicate to the device that more
* buffers are available.
* If device_curr_frag == driver_curr_frag, no more rx buffers are
* available, and the rx DMA engine of the device is halted.
* For tx queues, [index, device_curr_frag) contains fragments
* where tx is done; they need to be freed (owned by driver).
* [device_curr_frag, driver_curr_frag) contains the frames
* that are being transferred (owned by device). The driver
* increments driver_curr_frag to indicate that more tx work
* needs to be done.
*/
u32 index_mgmt_rx; /* real index mgmt rx queue */
u32 index_mgmt_tx; /* read index mgmt tx queue */
u32 free_data_rx; /* free pointer data rx queue */
u32 free_data_tx; /* free pointer data tx queue */
u32 data_low_tx_full; /* full detected flag */
/* frame memory buffers for the device queues */
struct islpci_membuf mgmt_tx[ISL38XX_CB_MGMT_QSIZE];
struct islpci_membuf mgmt_rx[ISL38XX_CB_MGMT_QSIZE];
struct sk_buff *data_low_tx[ISL38XX_CB_TX_QSIZE];
struct sk_buff *data_low_rx[ISL38XX_CB_RX_QSIZE];
dma_addr_t pci_map_tx_address[ISL38XX_CB_TX_QSIZE];
dma_addr_t pci_map_rx_address[ISL38XX_CB_RX_QSIZE];
/* driver network interface members */
struct net_device_stats statistics;
/* wait for a reset interrupt */
wait_queue_head_t reset_done;
/* used by islpci_mgt_transaction */
struct semaphore mgmt_sem; /* serialize access to mailbox and wqueue */
struct islpci_mgmtframe *mgmt_received; /* mbox for incoming frame */
wait_queue_head_t mgmt_wqueue; /* waitqueue for mbox */
/* state machine */
islpci_state_t state;
int state_off; /* enumeration of off-state, if 0 then
* we're not in any off-state */
/* WPA stuff */
int wpa; /* WPA mode enabled */
struct list_head bss_wpa_list;
int num_bss_wpa;
struct semaphore wpa_sem;
} islpci_private;
static inline islpci_state_t
islpci_get_state(islpci_private *priv)
{
/* lock */
return priv->state;
/* unlock */
}
islpci_state_t islpci_set_state(islpci_private *priv, islpci_state_t new_state);
#define ISLPCI_TX_TIMEOUT (2*HZ)
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,75))
# define irqreturn_t void
# define IRQ_HANDLED
# define IRQ_NONE
#endif
irqreturn_t islpci_interrupt(int, void *, struct pt_regs *);
int prism54_post_setup(islpci_private *, int);
int islpci_reset(islpci_private *, int);
static inline void
islpci_trigger(islpci_private *priv)
{
isl38xx_trigger_device(islpci_get_state(priv) == PRV_STATE_SLEEP,
priv->device_base);
}
struct net_device_stats *islpci_statistics(struct net_device *);
int prism54_bring_down(islpci_private *);
int islpci_alloc_memory(islpci_private *);
int islpci_free_memory(islpci_private *);
struct net_device *islpci_setup(struct pci_dev *);
#endif /* _ISLPCI_DEV_H */
This diff is collapsed.
/* $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_eth.h,v 1.5 2004/01/12 22:16:32 jmaurer Exp $
*
* Copyright (C) 2002 Intersil Americas Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _ISLPCI_ETH_H
#define _ISLPCI_ETH_H
#include "isl_38xx.h"
#include "islpci_dev.h"
void islpci_eth_cleanup_transmit(islpci_private *, isl38xx_control_block *);
int islpci_eth_transmit(struct sk_buff *, struct net_device *);
int islpci_eth_receive(islpci_private *);
void islpci_eth_tx_timeout(struct net_device *);
#endif /* _ISL_GEN_H */
This diff is collapsed.
This diff is collapsed.
/* $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.h,v 1.22 2004/01/30 16:24:00 ajfa Exp $
*
* Copyright (C) 2002 Intersil Americas Inc.
* Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _ISLPCI_MGT_H
#define _ISLPCI_MGT_H
#include <linux/wireless.h>
#include <linux/skbuff.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
# include <linux/workqueue.h>
#else
# include <linux/tqueue.h>
# define work_struct tq_struct
# define INIT_WORK INIT_TQUEUE
# define schedule_work schedule_task
#endif
/*
* Function definitions
*/
#define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0)
#define DEBUG(f, args...) K_DEBUG(f, pc_debug, args)
#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname)
extern int pc_debug;
static const int init_wds = 0; /* help compiler optimize away dead code */
/* General driver definitions */
#define PCIVENDOR_INTERSIL 0x1260UL
#define PCIVENDOR_3COM 0x10b7UL
#define PCIVENDOR_DLINK 0x1186UL
#define PCIVENDOR_I4 0x17cfUL
#define PCIVENDOR_IODATA 0x10fcUL
#define PCIVENDOR_NETGEAR 0x1385UL
#define PCIVENDOR_SMC 0x10b8UL
#define PCIVENDOR_ACCTON 0x1113UL
#define PCIDEVICE_ISL3877 0x3877UL
#define PCIDEVICE_ISL3890 0x3890UL
#define PCIDEVICE_3COM6001 0x6001UL
#define PCIDEVICE_LATENCY_TIMER_MIN 0x40
#define PCIDEVICE_LATENCY_TIMER_VAL 0x50
/* Debugging verbose definitions */
#define SHOW_NOTHING 0x00 /* overrules everything */
#define SHOW_ANYTHING 0xFF
#define SHOW_ERROR_MESSAGES 0x01
#define SHOW_TRAPS 0x02
#define SHOW_FUNCTION_CALLS 0x04
#define SHOW_TRACING 0x08
#define SHOW_QUEUE_INDEXES 0x10
#define SHOW_PIMFOR_FRAMES 0x20
#define SHOW_BUFFER_CONTENTS 0x40
#define VERBOSE 0x01
/* Default card definitions */
#define CARD_DEFAULT_CHANNEL 6
#define CARD_DEFAULT_MODE INL_MODE_CLIENT
#define CARD_DEFAULT_IW_MODE IW_MODE_INFRA
#define CARD_DEFAULT_BSSTYPE DOT11_BSSTYPE_INFRA
#define CARD_DEFAULT_CLIENT_SSID ""
#define CARD_DEFAULT_AP_SSID "default"
#define CARD_DEFAULT_KEY1 "default_key_1"
#define CARD_DEFAULT_KEY2 "default_key_2"
#define CARD_DEFAULT_KEY3 "default_key_3"
#define CARD_DEFAULT_KEY4 "default_key_4"
#define CARD_DEFAULT_WEP 0
#define CARD_DEFAULT_FILTER 0
# define CARD_DEFAULT_WDS 0
#define CARD_DEFAULT_AUTHEN DOT11_AUTH_OS
#define CARD_DEFAULT_DOT1X 0
#define CARD_DEFAULT_MLME_MODE DOT11_MLME_AUTO
#define CARD_DEFAULT_CONFORMANCE OID_INL_CONFORMANCE_NONE
/* PIMFOR package definitions */
#define PIMFOR_ETHERTYPE 0x8828
#define PIMFOR_HEADER_SIZE 12
#define PIMFOR_VERSION 1
#define PIMFOR_OP_GET 0
#define PIMFOR_OP_SET 1
#define PIMFOR_OP_RESPONSE 2
#define PIMFOR_OP_ERROR 3
#define PIMFOR_OP_TRAP 4
#define PIMFOR_OP_RESERVED 5 /* till 255 */
#define PIMFOR_DEV_ID_MHLI_MIB 0
#define PIMFOR_FLAG_APPLIC_ORIGIN 0x01
#define PIMFOR_FLAG_LITTLE_ENDIAN 0x02
static inline void
add_le32p(u32 * le_number, u32 add)
{
*le_number = cpu_to_le32(le32_to_cpup(le_number) + add);
}
void display_buffer(char *, int);
/*
* Type definition section
*
* the structure defines only the header allowing copyless
* frame handling
*/
typedef struct {
u8 version;
u8 operation;
u32 oid;
u8 device_id;
u8 flags;
u32 length;
} __attribute__ ((packed))
pimfor_header_t;
/* A received and interrupt-processed management frame, either for
* schedule_work(prism54_process_trap) or for priv->mgmt_received,
* processed by islpci_mgt_transaction(). */
struct islpci_mgmtframe {
struct net_device *ndev; /* pointer to network device */
pimfor_header_t *header; /* payload header, points into buf */
void *data; /* payload ex header, points into buf */
struct work_struct ws; /* argument for schedule_work() */
char buf[0]; /* fragment buffer */
};
int
islpci_mgt_receive(struct net_device *ndev);
int
islpci_mgmt_rx_fill(struct net_device *ndev);
void
islpci_mgt_cleanup_transmit(struct net_device *ndev);
int
islpci_mgt_transaction(struct net_device *ndev,
int operation, unsigned long oid,
void *senddata, int sendlen,
struct islpci_mgmtframe **recvframe);
static inline void
islpci_mgt_release(struct islpci_mgmtframe *frame)
{
kfree(frame);
}
#endif /* _ISLPCI_MGT_H */
This diff is collapsed.
/*
* Copyright (C) 2003 Aurelien Alleaume <slts@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#if !defined(_OID_MGT_H)
#define _OID_MGT_H
#include "isl_oid.h"
#include "islpci_dev.h"
extern struct oid_t isl_oid[];
int mgt_init(islpci_private *);
void mgt_clean(islpci_private *);
extern const int frequency_list_bg[];
extern const int frequency_list_a[];
int mgt_set_request(islpci_private *, enum oid_num_t, int, void *);
int mgt_get_request(islpci_private *, enum oid_num_t, int, void *,
union oid_res_t *);
int mgt_commit_list(islpci_private *, enum oid_num_t *, int);
void mgt_set(islpci_private *, enum oid_num_t, void *);
void mgt_commit(islpci_private *);
int mgt_mlme_answer(islpci_private *);
enum oid_num_t mgt_oidtonum(u32 oid);
#endif /* !defined(_OID_MGT_H) */
/* EOF */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment