|
NAMEieee80211_scan —
802.11 scanning support
SYNOPSIS#include
<net80211/ieee80211_var.h>
int
int
int
int
int
int
int
int
void
void
void
void
void
void
void
void
void
const struct ieee80211_scanner *
DESCRIPTIONThenet80211 software layer provides an extensible
framework for scanning. Scanning is the procedure by which a station locates a
BSS to join (in infrastructure and IBSS mode), or a channel to use (when
operating as an AP or an IBSS master). Scans are either “active”
or “passive”. An active scan causes one or more ProbeRequest
frames to be sent on visiting each channel. A passive request causes each
channel in the scan set to be visited but no frames to be transmitted; the
station only listens for traffic. Note that active scanning may still need to
listen for traffic before sending ProbeRequest frames depending on regulatory
constraints.
A scan operation involves constructing a set of channels to
inspect (the scan set), visiting each channel and collecting information
(e.g. what BSS are present), and then analyzing the results to make
decisions such as which BSS to join. This process needs to be as fast as
possible so Scanning is handled by pluggable modules that implement
policy per-operating mode. The core scanning support
provides an infrastructure to support these modules and exports a common API
to the rest of the Scanning is done synchronously when initially bringing a vap to an
operational state and optionally in the background to maintain the scan
cache for doing roaming and rogue AP monitoring. Scanning is not tied to the
Scanning is controlled by a set of parameters that (potentially)
constrains the channel set and any desired SSID's and BSSID's.
SCANNER MODULESScanning modules use a registration mechanism to hook into thenet80211 layer. Use
ieee80211_scanner_register () to register a scan module
for a particular operating mode and
ieee80211_scanner_unregister () or
ieee80211_scanner_unregister_all () to clear entries
(typically on module unload). Only one scanner module can be registered at any
time for an operating mode.
DRIVER SUPPORTScanning operations are usually managed by thenet80211
layer. Drivers must provide ic_scan_start and
ic_scan_stop methods that are called at the start of a
scan and when the work is done; these should handle work such as enabling
receive of Beacon and ProbeResponse frames and disable any BSSID matching. The
ic_set_channel method is used to change channels while
scanning. net80211 will generate ProbeRequest frames
and transmit them using the ic_raw_xmit method. Frames
received while scanning are dispatched to net80211
using the normal receive path. Devices that off-load scan work to firmware
most easily mesh with net80211 by operating on a
channel-at-a-time basis as this defers control to
net80211's scan machine scheduler. But multi-channel
scanning is supported if the driver manually dispatches results using
ieee80211_add_scan () routine to enter results into the
scan cache.
SCAN REQUESTSScan requests occur by way of theIEEE80211_SCAN_REQUEST
ioctl or through a change in a vap's state machine that requires scanning. In
both cases the scan cache can be checked first and, if it is deemed suitably
“warm” then it's contents are used without leaving the current
channel. To start a scan without checking the cache
ieee80211_start_scan () can be called; otherwise
ieee80211_check_scan () can be used to first check the
scan cache, kicking off a scan if the cache contents are out of date. There is
also ieee80211_check_scan_current () which is a
shorthand for using previously set scan parameters for checking the scan cache
and then scanning.
Background scanning is done using
A scan operation can be canceled using
The Min/max dwell time parameters are used to constrain time spent visiting a channel. The maximum dwell time constrains the time spent listening for traffic. The minimum dwell time is used to reduce this time--when it is reached and one or more frames have been received then an immediate channel change will be done. Drivers can override this behaviour through the iv_scan_mindwell method. SCAN CACHE MANAGEMENTThe scan cache contents are managed by the scan policy module and are opaque outside this module. Thenet80211 scan framework
defines API's for interacting. The validity of the scan cache contents are
controlled by iv_scanvalid which is exported to user
space through the IEEE80211_SCAN_VALID request.
The cache contents can be explicitly flushed with
Scan cache entries are created with the
The cache contents is aged through
Individual cache entries are marked usable with
The cache contents can be viewed using the
SEE ALSOioctl(2), ieee80211(9), ieee80211_proto(9)
Visit the GSP FreeBSD Man Page Interface. |