2003-06-23 16:55:01 +00:00
|
|
|
/*-
|
2003-06-27 05:13:52 +00:00
|
|
|
* Copyright (c) 2001 Atsushi Onoe
|
2007-06-06 04:56:04 +00:00
|
|
|
* Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
|
2003-06-23 16:55:01 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. 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.
|
2003-06-27 05:13:52 +00:00
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR 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, WHETHER IN 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.
|
2003-06-23 16:55:01 +00:00
|
|
|
*
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
|
|
|
#ifndef _NET80211_IEEE80211_PROTO_H_
|
|
|
|
#define _NET80211_IEEE80211_PROTO_H_
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 802.11 protocol implementation definitions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum ieee80211_state {
|
2003-07-20 21:36:08 +00:00
|
|
|
IEEE80211_S_INIT = 0, /* default state */
|
|
|
|
IEEE80211_S_SCAN = 1, /* scanning */
|
|
|
|
IEEE80211_S_AUTH = 2, /* try to authenticate */
|
|
|
|
IEEE80211_S_ASSOC = 3, /* try to assoc */
|
2007-09-05 21:31:32 +00:00
|
|
|
IEEE80211_S_CAC = 4, /* doing channel availability check */
|
|
|
|
IEEE80211_S_RUN = 5, /* operational (e.g. associated) */
|
|
|
|
IEEE80211_S_CSA = 6, /* channel switch announce pending */
|
|
|
|
IEEE80211_S_SLEEP = 7, /* power save */
|
2003-06-23 16:55:01 +00:00
|
|
|
};
|
2007-09-05 21:31:32 +00:00
|
|
|
#define IEEE80211_S_MAX (IEEE80211_S_SLEEP+1)
|
2003-06-23 16:55:01 +00:00
|
|
|
|
|
|
|
#define IEEE80211_SEND_MGMT(_ic,_ni,_type,_arg) \
|
|
|
|
((*(_ic)->ic_send_mgmt)(_ic, _ni, _type, _arg))
|
|
|
|
|
|
|
|
extern const char *ieee80211_mgt_subtype_name[];
|
2004-12-31 20:38:48 +00:00
|
|
|
extern const char *ieee80211_phymode_name[];
|
2003-06-23 16:55:01 +00:00
|
|
|
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_proto_attach(struct ieee80211com *);
|
|
|
|
void ieee80211_proto_detach(struct ieee80211com *);
|
2003-06-23 16:55:01 +00:00
|
|
|
|
2003-08-19 22:17:04 +00:00
|
|
|
struct ieee80211_node;
|
2005-04-04 04:27:20 +00:00
|
|
|
int ieee80211_input(struct ieee80211com *, struct mbuf *,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
struct ieee80211_node *, int, int, uint32_t);
|
|
|
|
void ieee80211_deliver_data(struct ieee80211com *,
|
|
|
|
struct ieee80211_node *, struct mbuf *);
|
|
|
|
struct mbuf *ieee80211_decap1(struct mbuf *, int *);
|
2005-07-22 17:29:03 +00:00
|
|
|
int ieee80211_setup_rates(struct ieee80211_node *ni,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
const uint8_t *rates, const uint8_t *xrates, int flags);
|
|
|
|
void ieee80211_saveie(uint8_t **, const uint8_t *);
|
|
|
|
void ieee80211_saveath(struct ieee80211_node *, uint8_t *);
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_recv_mgmt(struct ieee80211com *, struct mbuf *,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
struct ieee80211_node *, int, int, int, uint32_t);
|
|
|
|
int ieee80211_mgmt_output(struct ieee80211com *, struct ieee80211_node *,
|
|
|
|
struct mbuf *, int type);
|
2006-07-26 03:15:16 +00:00
|
|
|
struct ieee80211_bpf_params;
|
|
|
|
int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *,
|
|
|
|
const struct ieee80211_bpf_params *);
|
|
|
|
int ieee80211_output(struct ifnet *, struct mbuf *,
|
|
|
|
struct sockaddr *, struct rtentry *);
|
2005-07-22 17:31:18 +00:00
|
|
|
int ieee80211_send_nulldata(struct ieee80211_node *);
|
2005-04-04 04:27:20 +00:00
|
|
|
int ieee80211_send_mgmt(struct ieee80211com *, struct ieee80211_node *,
|
2003-06-23 16:55:01 +00:00
|
|
|
int, int);
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
int ieee80211_send_probereq(struct ieee80211_node *ni,
|
|
|
|
const uint8_t sa[IEEE80211_ADDR_LEN],
|
|
|
|
const uint8_t da[IEEE80211_ADDR_LEN],
|
|
|
|
const uint8_t bssid[IEEE80211_ADDR_LEN],
|
|
|
|
const uint8_t *ssid, size_t ssidlen,
|
|
|
|
const void *optie, size_t optielen);
|
2005-04-04 04:27:20 +00:00
|
|
|
int ieee80211_classify(struct ieee80211com *, struct mbuf *,
|
2004-12-08 17:26:47 +00:00
|
|
|
struct ieee80211_node *);
|
2005-04-04 04:27:20 +00:00
|
|
|
struct mbuf *ieee80211_encap(struct ieee80211com *, struct mbuf *,
|
2004-12-08 17:26:47 +00:00
|
|
|
struct ieee80211_node *);
|
|
|
|
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_reset_erp(struct ieee80211com *);
|
|
|
|
void ieee80211_set_shortslottime(struct ieee80211com *, int onoff);
|
|
|
|
int ieee80211_iserp_rateset(struct ieee80211com *,
|
2004-12-08 17:26:47 +00:00
|
|
|
struct ieee80211_rateset *);
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_set11gbasicrates(struct ieee80211_rateset *,
|
2004-12-08 17:26:47 +00:00
|
|
|
enum ieee80211_phymode);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Return the size of the 802.11 header for a management or data frame.
|
|
|
|
*/
|
2004-12-31 21:30:42 +00:00
|
|
|
static __inline int
|
2004-12-08 17:26:47 +00:00
|
|
|
ieee80211_hdrsize(const void *data)
|
|
|
|
{
|
|
|
|
const struct ieee80211_frame *wh = data;
|
|
|
|
int size = sizeof(struct ieee80211_frame);
|
|
|
|
|
|
|
|
/* NB: we don't handle control frames */
|
|
|
|
KASSERT((wh->i_fc[0]&IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL,
|
|
|
|
("%s: control frame", __func__));
|
|
|
|
if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
|
|
|
|
size += IEEE80211_ADDR_LEN;
|
|
|
|
if (IEEE80211_QOS_HAS_SEQ(wh))
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
size += sizeof(uint16_t);
|
2004-12-08 17:26:47 +00:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
* Like ieee80211_hdrsize, but handles any type of frame.
|
2004-12-08 17:26:47 +00:00
|
|
|
*/
|
2004-12-31 21:30:42 +00:00
|
|
|
static __inline int
|
2004-12-08 17:26:47 +00:00
|
|
|
ieee80211_anyhdrsize(const void *data)
|
|
|
|
{
|
|
|
|
const struct ieee80211_frame *wh = data;
|
|
|
|
|
|
|
|
if ((wh->i_fc[0]&IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) {
|
|
|
|
switch (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) {
|
|
|
|
case IEEE80211_FC0_SUBTYPE_CTS:
|
|
|
|
case IEEE80211_FC0_SUBTYPE_ACK:
|
|
|
|
return sizeof(struct ieee80211_frame_ack);
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
case IEEE80211_FC0_SUBTYPE_BAR:
|
|
|
|
return sizeof(struct ieee80211_frame_bar);
|
2004-12-08 17:26:47 +00:00
|
|
|
}
|
|
|
|
return sizeof(struct ieee80211_frame_min);
|
|
|
|
} else
|
|
|
|
return ieee80211_hdrsize(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Template for an in-kernel authenticator. Authenticators
|
|
|
|
* register with the protocol code and are typically loaded
|
|
|
|
* as separate modules as needed.
|
|
|
|
*/
|
|
|
|
struct ieee80211_authenticator {
|
|
|
|
const char *ia_name; /* printable name */
|
|
|
|
int (*ia_attach)(struct ieee80211com *);
|
|
|
|
void (*ia_detach)(struct ieee80211com *);
|
|
|
|
void (*ia_node_join)(struct ieee80211com *,
|
|
|
|
struct ieee80211_node *);
|
|
|
|
void (*ia_node_leave)(struct ieee80211com *,
|
|
|
|
struct ieee80211_node *);
|
|
|
|
};
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_authenticator_register(int type,
|
2004-12-08 17:26:47 +00:00
|
|
|
const struct ieee80211_authenticator *);
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_authenticator_unregister(int type);
|
|
|
|
const struct ieee80211_authenticator *ieee80211_authenticator_get(int auth);
|
2004-12-08 17:26:47 +00:00
|
|
|
|
2005-08-13 17:31:48 +00:00
|
|
|
struct ieee80211req;
|
2004-12-08 17:26:47 +00:00
|
|
|
/*
|
|
|
|
* Template for an MAC ACL policy module. Such modules
|
|
|
|
* register with the protocol code and are passed the sender's
|
|
|
|
* address of each received frame for validation.
|
|
|
|
*/
|
|
|
|
struct ieee80211_aclator {
|
|
|
|
const char *iac_name; /* printable name */
|
|
|
|
int (*iac_attach)(struct ieee80211com *);
|
|
|
|
void (*iac_detach)(struct ieee80211com *);
|
|
|
|
int (*iac_check)(struct ieee80211com *,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
const uint8_t mac[IEEE80211_ADDR_LEN]);
|
2004-12-08 17:26:47 +00:00
|
|
|
int (*iac_add)(struct ieee80211com *,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
const uint8_t mac[IEEE80211_ADDR_LEN]);
|
2004-12-08 17:26:47 +00:00
|
|
|
int (*iac_remove)(struct ieee80211com *,
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
const uint8_t mac[IEEE80211_ADDR_LEN]);
|
2004-12-08 17:26:47 +00:00
|
|
|
int (*iac_flush)(struct ieee80211com *);
|
|
|
|
int (*iac_setpolicy)(struct ieee80211com *, int);
|
|
|
|
int (*iac_getpolicy)(struct ieee80211com *);
|
2005-08-13 17:31:48 +00:00
|
|
|
int (*iac_setioctl)(struct ieee80211com *, struct ieee80211req *);
|
|
|
|
int (*iac_getioctl)(struct ieee80211com *, struct ieee80211req *);
|
2004-12-08 17:26:47 +00:00
|
|
|
};
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_aclator_register(const struct ieee80211_aclator *);
|
|
|
|
void ieee80211_aclator_unregister(const struct ieee80211_aclator *);
|
|
|
|
const struct ieee80211_aclator *ieee80211_aclator_get(const char *name);
|
2004-12-08 17:26:47 +00:00
|
|
|
|
|
|
|
/* flags for ieee80211_fix_rate() */
|
|
|
|
#define IEEE80211_F_DOSORT 0x00000001 /* sort rate list */
|
|
|
|
#define IEEE80211_F_DOFRATE 0x00000002 /* use fixed rate */
|
|
|
|
#define IEEE80211_F_DONEGO 0x00000004 /* calc negotiated rate */
|
|
|
|
#define IEEE80211_F_DODEL 0x00000008 /* delete ignore rate */
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
#define IEEE80211_F_DOBRS 0x00000010 /* check basic rate set */
|
|
|
|
#define IEEE80211_F_JOIN 0x00000020 /* sta joining our bss */
|
2007-03-11 07:22:21 +00:00
|
|
|
int ieee80211_fix_rate(struct ieee80211_node *,
|
|
|
|
struct ieee80211_rateset *, int);
|
2004-12-08 17:26:47 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* WME/WMM support.
|
|
|
|
*/
|
|
|
|
struct wmeParams {
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint8_t wmep_acm;
|
|
|
|
uint8_t wmep_aifsn;
|
|
|
|
uint8_t wmep_logcwmin; /* log2(cwmin) */
|
|
|
|
uint8_t wmep_logcwmax; /* log2(cwmax) */
|
|
|
|
uint8_t wmep_txopLimit;
|
|
|
|
uint8_t wmep_noackPolicy; /* 0 (ack), 1 (no ack) */
|
2004-12-08 17:26:47 +00:00
|
|
|
};
|
2005-01-24 20:38:26 +00:00
|
|
|
#define IEEE80211_TXOP_TO_US(_txop) ((_txop)<<5)
|
|
|
|
#define IEEE80211_US_TO_TXOP(_us) ((_us)>>5)
|
2004-12-08 17:26:47 +00:00
|
|
|
|
|
|
|
struct chanAccParams {
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint8_t cap_info; /* version of the current set */
|
2004-12-08 17:26:47 +00:00
|
|
|
struct wmeParams cap_wmeParams[WME_NUM_AC];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ieee80211_wme_state {
|
|
|
|
u_int wme_flags;
|
|
|
|
#define WME_F_AGGRMODE 0x00000001 /* STATUS: WME agressive mode */
|
|
|
|
u_int wme_hipri_traffic; /* VI/VO frames in beacon interval */
|
|
|
|
u_int wme_hipri_switch_thresh;/* agressive mode switch thresh */
|
|
|
|
u_int wme_hipri_switch_hysteresis;/* agressive mode switch hysteresis */
|
|
|
|
|
|
|
|
struct wmeParams wme_params[4]; /* from assoc resp for each AC*/
|
|
|
|
struct chanAccParams wme_wmeChanParams; /* WME params applied to self */
|
|
|
|
struct chanAccParams wme_wmeBssChanParams;/* WME params bcast to stations */
|
|
|
|
struct chanAccParams wme_chanParams; /* params applied to self */
|
|
|
|
struct chanAccParams wme_bssChanParams; /* params bcast to stations */
|
|
|
|
|
|
|
|
int (*wme_update)(struct ieee80211com *);
|
|
|
|
};
|
|
|
|
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_wme_initparams(struct ieee80211com *);
|
|
|
|
void ieee80211_wme_updateparams(struct ieee80211com *);
|
|
|
|
void ieee80211_wme_updateparams_locked(struct ieee80211com *);
|
2004-12-08 17:26:47 +00:00
|
|
|
|
2003-07-20 21:36:08 +00:00
|
|
|
#define ieee80211_new_state(_ic, _nstate, _arg) \
|
|
|
|
(((_ic)->ic_newstate)((_ic), (_nstate), (_arg)))
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
int ieee80211_init(struct ieee80211com *, int forcescan);
|
|
|
|
void ieee80211_dturbo_switch(struct ieee80211com *, int newflags);
|
2005-12-12 18:04:44 +00:00
|
|
|
void ieee80211_beacon_miss(struct ieee80211com *);
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
void ieee80211_print_essid(const uint8_t *, int);
|
|
|
|
void ieee80211_dump_pkt(struct ieee80211com *,
|
|
|
|
const uint8_t *, int, int, int);
|
2003-07-20 21:36:08 +00:00
|
|
|
|
2007-03-07 04:35:07 +00:00
|
|
|
extern const char *ieee80211_opmode_name[];
|
2003-07-20 21:36:08 +00:00
|
|
|
extern const char *ieee80211_state_name[IEEE80211_S_MAX];
|
2004-12-08 17:26:47 +00:00
|
|
|
extern const char *ieee80211_wme_acnames[];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Beacon frames constructed by ieee80211_beacon_alloc
|
|
|
|
* have the following structure filled in so drivers
|
|
|
|
* can update the frame later w/ minimal overhead.
|
|
|
|
*/
|
|
|
|
struct ieee80211_beacon_offsets {
|
2007-09-17 19:07:24 +00:00
|
|
|
uint8_t bo_flags[4]; /* update/state flags */
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint16_t *bo_caps; /* capabilities */
|
2007-09-17 19:07:24 +00:00
|
|
|
uint8_t *bo_cfp; /* start of CFParms element */
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint8_t *bo_tim; /* start of atim/dtim */
|
|
|
|
uint8_t *bo_wme; /* start of WME parameters */
|
2007-09-17 19:07:24 +00:00
|
|
|
uint8_t *bo_tim_trailer;/* start of fixed-size trailer */
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint16_t bo_tim_len; /* atim/dtim length in bytes */
|
2007-09-17 19:07:24 +00:00
|
|
|
uint16_t bo_tim_trailer_len;/* tim trailer length in bytes */
|
Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
fully enumerated and uniquely identify the operating characteristics;
these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
background scanning and roaming
o move scanning support into loadable modules based on the operating
mode to enable different policies and reduce the memory footprint
on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
we use a simple algorithm to trigger a roam: we threshold the rssi
and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
drivers but is incomplete; it's included now to establish a baseline
for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
encapsulation (note this can be used with any card that can tx+rx
large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
authentication and association failures
o enable the addition of sta mode power save support for drivers that need
net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
index into the rate set; this needs to be extended to deal with
multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing
Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
dynamic turbo (lightly tested), 11n (sniffing only and needs
new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others. Much of the scanning work was supported by
Atheros. The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
|
|
|
uint8_t *bo_erp; /* start of ERP element */
|
|
|
|
uint8_t *bo_htinfo; /* start of HT info element */
|
2007-09-17 19:07:24 +00:00
|
|
|
uint8_t *bo_appie; /* start of AppIE element */
|
|
|
|
uint16_t bo_appie_len; /* AppIE length in bytes */
|
|
|
|
uint16_t bo_csa_trailer_len;;
|
|
|
|
uint8_t *bo_csa; /* start of CSA element */
|
2004-12-08 17:26:47 +00:00
|
|
|
};
|
2007-09-17 19:07:24 +00:00
|
|
|
struct mbuf *ieee80211_beacon_alloc(struct ieee80211_node *,
|
|
|
|
struct ieee80211_beacon_offsets *);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Beacon frame updates are signaled through calls to ic_update_beacon
|
|
|
|
* with one of the IEEE80211_BEACON_* tokens defined below. For devices
|
|
|
|
* that construct beacon frames on the host this can trigger a rebuild
|
|
|
|
* or defer the processing. For devices that offload beacon frame
|
|
|
|
* handling this callback can be used to signal a rebuild. The bo_flags
|
|
|
|
* array in the ieee80211_beacon_offsets structure is intended to record
|
|
|
|
* deferred processing requirements; ieee80211_beacon_update uses the
|
|
|
|
* state to optimize work. Since this structure is owned by the driver
|
|
|
|
* and not visible to the 802.11 layer drivers must supply an ic_update_beacon
|
|
|
|
* callback that marks the flag bits and schedules (as necessary) an update.
|
|
|
|
*/
|
|
|
|
enum {
|
|
|
|
IEEE80211_BEACON_CAPS = 0, /* capabilities */
|
|
|
|
IEEE80211_BEACON_TIM = 1, /* DTIM/ATIM */
|
|
|
|
IEEE80211_BEACON_WME = 2,
|
|
|
|
IEEE80211_BEACON_ERP = 3, /* Extended Rate Phy */
|
|
|
|
IEEE80211_BEACON_HTINFO = 4, /* HT Information */
|
|
|
|
IEEE80211_BEACON_APPIE = 5, /* Application IE's */
|
|
|
|
IEEE80211_BEACON_CFP = 6, /* CFParms */
|
|
|
|
IEEE80211_BEACON_CSA = 7, /* Channel Switch Announcement */
|
|
|
|
};
|
|
|
|
int ieee80211_beacon_update(struct ieee80211_node *,
|
|
|
|
struct ieee80211_beacon_offsets *, struct mbuf *, int mcast);
|
2004-12-08 17:26:47 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Notification methods called from the 802.11 state machine.
|
|
|
|
* Note that while these are defined here, their implementation
|
|
|
|
* is OS-specific.
|
|
|
|
*/
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_notify_node_join(struct ieee80211com *,
|
2004-12-08 17:26:47 +00:00
|
|
|
struct ieee80211_node *, int newassoc);
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_notify_node_leave(struct ieee80211com *,
|
2004-12-08 17:26:47 +00:00
|
|
|
struct ieee80211_node *);
|
2005-04-04 04:27:20 +00:00
|
|
|
void ieee80211_notify_scan_done(struct ieee80211com *);
|
2003-06-23 16:55:01 +00:00
|
|
|
#endif /* _NET80211_IEEE80211_PROTO_H_ */
|