diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-07-26 22:52:56 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:38 +0200 |
commit | affb871b497129f7f191cfaf7bd458342b22c05f (patch) | |
tree | a4397a3b44fd945c92f7e6f8905dc52044f5dff6 /linux/pcmcia-cs/wireless/ieee802_11.h | |
parent | 93e37a911f657e6e0b1f9b47a0761bb5fbf4ac35 (diff) |
2006-07-27 Thomas Schwinge <tschwinge@gnu.org>
Import a number of files from the pcmcia-cs package, version 3.2.8,
available from <http://pcmcia-cs.sourceforge.net/>.
* linux/pcmcia-cs/clients/3c574_cs.c: Import file.
* linux/pcmcia-cs/clients/3c589_cs.c: Likewise.
* linux/pcmcia-cs/clients/ax8390.h: Likewise.
* linux/pcmcia-cs/clients/axnet_cs.c: Likewise.
* linux/pcmcia-cs/clients/fmvj18x_cs.c: Likewise.
* linux/pcmcia-cs/clients/nmclan_cs.c: Likewise.
* linux/pcmcia-cs/clients/ositech.h: Likewise.
* linux/pcmcia-cs/clients/pcnet_cs.c: Likewise.
* linux/pcmcia-cs/clients/smc91c92_cs.c: Likewise.
* linux/pcmcia-cs/clients/xirc2ps_cs.c: Likewise.
* linux/pcmcia-cs/include/linux/crc32.h: Likewise.
* linux/pcmcia-cs/include/linux/init.h: Likewise.
* linux/pcmcia-cs/include/linux/slab.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/bulkmem.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/bus_ops.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/ciscode.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/cisreg.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/cistpl.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/cs.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/cs_types.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/driver_ops.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/ds.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/mem_op.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/ss.h: Likewise.
* linux/pcmcia-cs/include/pcmcia/version.h: Likewise.
* linux/pcmcia-cs/modules/bulkmem.c: Likewise.
* linux/pcmcia-cs/modules/cirrus.h: Likewise.
* linux/pcmcia-cs/modules/cistpl.c: Likewise.
* linux/pcmcia-cs/modules/cs.c: Likewise.
* linux/pcmcia-cs/modules/cs_internal.h: Likewise.
* linux/pcmcia-cs/modules/ds.c: Likewise.
* linux/pcmcia-cs/modules/ene.h: Likewise.
* linux/pcmcia-cs/modules/i82365.c: Likewise.
* linux/pcmcia-cs/modules/i82365.h: Likewise.
* linux/pcmcia-cs/modules/o2micro.h: Likewise.
* linux/pcmcia-cs/modules/pci_fixup.c: Likewise.
* linux/pcmcia-cs/modules/ricoh.h: Likewise.
* linux/pcmcia-cs/modules/rsrc_mgr.c: Likewise.
* linux/pcmcia-cs/modules/smc34c90.h: Likewise.
* linux/pcmcia-cs/modules/ti113x.h: Likewise.
* linux/pcmcia-cs/modules/topic.h: Likewise.
* linux/pcmcia-cs/modules/vg468.h: Likewise.
* linux/pcmcia-cs/modules/yenta.h: Likewise.
* linux/pcmcia-cs/wireless/hermes.c: Likewise.
* linux/pcmcia-cs/wireless/hermes.h: Likewise.
* linux/pcmcia-cs/wireless/hermes_rid.h: Likewise.
* linux/pcmcia-cs/wireless/ieee802_11.h: Likewise.
* linux/pcmcia-cs/wireless/orinoco.c: Likewise.
* linux/pcmcia-cs/wireless/orinoco.h: Likewise.
* linux/pcmcia-cs/wireless/orinoco_cs.c: Likewise.
Diffstat (limited to 'linux/pcmcia-cs/wireless/ieee802_11.h')
-rw-r--r-- | linux/pcmcia-cs/wireless/ieee802_11.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/linux/pcmcia-cs/wireless/ieee802_11.h b/linux/pcmcia-cs/wireless/ieee802_11.h new file mode 100644 index 0000000..07d626e --- /dev/null +++ b/linux/pcmcia-cs/wireless/ieee802_11.h @@ -0,0 +1,79 @@ +#ifndef _IEEE802_11_H +#define _IEEE802_11_H + +#define IEEE802_11_DATA_LEN 2304 +/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section + 6.2.1.1.2. + + The figure in section 7.1.2 suggests a body size of up to 2312 + bytes is allowed, which is a bit confusing, I suspect this + represents the 2304 bytes of real data, plus a possible 8 bytes of + WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */ + + +#define IEEE802_11_HLEN 30 +#define IEEE802_11_FRAME_LEN (IEEE802_11_DATA_LEN + IEEE802_11_HLEN) + +struct ieee802_11_hdr { + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u8 addr4[ETH_ALEN]; +} __attribute__ ((packed)); + +/* Frame control field constants */ +#define IEEE802_11_FCTL_VERS 0x0002 +#define IEEE802_11_FCTL_FTYPE 0x000c +#define IEEE802_11_FCTL_STYPE 0x00f0 +#define IEEE802_11_FCTL_TODS 0x0100 +#define IEEE802_11_FCTL_FROMDS 0x0200 +#define IEEE802_11_FCTL_MOREFRAGS 0x0400 +#define IEEE802_11_FCTL_RETRY 0x0800 +#define IEEE802_11_FCTL_PM 0x1000 +#define IEEE802_11_FCTL_MOREDATA 0x2000 +#define IEEE802_11_FCTL_WEP 0x4000 +#define IEEE802_11_FCTL_ORDER 0x8000 + +#define IEEE802_11_FTYPE_MGMT 0x0000 +#define IEEE802_11_FTYPE_CTL 0x0004 +#define IEEE802_11_FTYPE_DATA 0x0008 + +/* management */ +#define IEEE802_11_STYPE_ASSOC_REQ 0x0000 +#define IEEE802_11_STYPE_ASSOC_RESP 0x0010 +#define IEEE802_11_STYPE_REASSOC_REQ 0x0020 +#define IEEE802_11_STYPE_REASSOC_RESP 0x0030 +#define IEEE802_11_STYPE_PROBE_REQ 0x0040 +#define IEEE802_11_STYPE_PROBE_RESP 0x0050 +#define IEEE802_11_STYPE_BEACON 0x0080 +#define IEEE802_11_STYPE_ATIM 0x0090 +#define IEEE802_11_STYPE_DISASSOC 0x00A0 +#define IEEE802_11_STYPE_AUTH 0x00B0 +#define IEEE802_11_STYPE_DEAUTH 0x00C0 + +/* control */ +#define IEEE802_11_STYPE_PSPOLL 0x00A0 +#define IEEE802_11_STYPE_RTS 0x00B0 +#define IEEE802_11_STYPE_CTS 0x00C0 +#define IEEE802_11_STYPE_ACK 0x00D0 +#define IEEE802_11_STYPE_CFEND 0x00E0 +#define IEEE802_11_STYPE_CFENDACK 0x00F0 + +/* data */ +#define IEEE802_11_STYPE_DATA 0x0000 +#define IEEE802_11_STYPE_DATA_CFACK 0x0010 +#define IEEE802_11_STYPE_DATA_CFPOLL 0x0020 +#define IEEE802_11_STYPE_DATA_CFACKPOLL 0x0030 +#define IEEE802_11_STYPE_NULLFUNC 0x0040 +#define IEEE802_11_STYPE_CFACK 0x0050 +#define IEEE802_11_STYPE_CFPOLL 0x0060 +#define IEEE802_11_STYPE_CFACKPOLL 0x0070 + +#define IEEE802_11_SCTL_FRAG 0x000F +#define IEEE802_11_SCTL_SEQ 0xFFF0 + +#endif /* _IEEE802_11_H */ + |