Commit graph

563 commits

Author SHA1 Message Date
Sam Leffler 8bbd3e4119 o use shared code to handle bpf tap and mbuf cleanup
o swap conditional order to put the cheapest first
2009-04-26 21:03:29 +00:00
Sam Leffler 7cd89f6474 correct bssid reporting for wds vaps 2009-04-26 20:55:31 +00:00
Rui Paulo d4f7b23302 Remove spurious 'or'. 2009-04-23 22:08:44 +00:00
Kip Macy 279aa3d419 Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2

Reviewed by:	rwatson
2009-04-16 20:30:28 +00:00
Sam Leffler 5434ed5af3 setup turboA/G fixed rate parameters too; this is needed, in particular,
for turboG operation
2009-04-13 20:53:12 +00:00
Sam Leffler baa55e71d4 correct debug printf 2009-04-13 20:50:51 +00:00
Sam Leffler 4477b68344 check correct address for a bssid mtch 2009-04-13 20:50:07 +00:00
Sam Leffler c5262b82e6 fix txparms setup for 108G sta's: ieee80211_iserp_rateset does not
identify a station operating in turbo-boost mode because it has a
pure ofdm rate set; add an explicit check for the channel type
instead of depending on IEEE80211_NODE_ERP being set
2009-04-13 20:45:29 +00:00
Sam Leffler 9fb0fccb89 o add a capability for drivers that require 802.3 encapsulation of
frames passed down through the transmit path
o mark ndis requiring 802.3 encap'd frames

Reviewed by:	"Paul B. Mahol" <onemda@gmail.com>, thompsa
2009-04-08 16:19:50 +00:00
Sam Leffler bafb92643e fix whitespace 2009-04-03 20:46:32 +00:00
Sam Leffler 6437e6da3d o update dwds mcast handling after hoisting ieee80211_encap: frames need
to be encapsulated before dispatching to the driver
o eliminate M_WDS now that we call ieee80211_encap directly and can supply
  the wds vap to indicate a 4-address frame should be created
2009-04-03 18:00:19 +00:00
Sam Leffler 339ccfb391 Hoist 802.11 encapsulation up into net80211:
o call ieee80211_encap in ieee80211_start so frames passed down to drivers
  are already encapsulated
o remove ieee80211_encap calls in drivers
o fixup wi so it recreates the 802.3 head it requires from the 802.11
  header contents
o move fast-frame aggregation from ath to net80211 (conditional on
  IEEE80211_SUPPORT_SUPERG):
  - aggregation is now done in ieee80211_start; it is enabled when the
    packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames
    are held on a staging queue according to ieee80211_ffagemax
    (net.wlan.ffagemax) to wait for a frame to combine with
  - drivers must call back to age/flush the staging queue (ath does this
    on tx done, at swba, and on rx according to the state of the tx queues
    and/or the contents of the staging queue)
  - remove fast-frame-related data structures from ath
  - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle
    per-node fast-frames state (we reuse 11n tx ampdu state)
o change ieee80211_encap calling convention to include an explicit vap
  so frames coming through a WDS vap are recognized w/o setting M_WDS

With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.

Reviewed by:	thompsa, rpaulo, avatar, imp, sephe
2009-03-30 21:53:27 +00:00
Rui Paulo 4f8cb6ff40 Fix typo in comment. 2009-03-30 21:46:50 +00:00
Rui Paulo 8407aa1494 MFP mesh11s:
Add mesh debugging bit replacing the now deprecated RADKEYS.
2009-03-30 21:41:06 +00:00
Sam Leffler 26d39e2c68 o add ic_rt to track the rate table for the current channel; this enables
calculation of packet transmit times to do things like check txop limits
o remove equivalent driver code and convert to use net80211 state
2009-03-29 21:17:08 +00:00
Sam Leffler 97fc5da03e toggling fast-frames requires clocking the state machine 2009-03-29 21:00:27 +00:00
Sam Leffler 29aca94080 Eliminate ic_myaddr so changing the mac address of a device works correctly:
o remove ic_myaddr from ieee80211com
o change ieee80211_ifattach to take the mac address of the physical device
  and use that to setup the lladdr.
o replace all references to ic_myaddr in drivers by IF_LLADDR
o related cleanups (e.g. kill dead code)

PR:		kern/133178
Reviewed by:	thompsa, rpaulo
2009-03-29 17:59:14 +00:00
Sam Leffler 9d90db9307 o move tdma+superg protocol defs out of public view
o add #ifdef _KERNEL to superg+tdma include files so they can be used
  by user code to get the protocol defs
2009-03-26 21:29:03 +00:00
Sam Leffler 4207227c6a Fix enough bits so that fast frames work again:
o include ath ie in beacon frames
o fix probe response check for including ath ie
o add ieee80211_add_athcap shorthand for ap-side ie additions
2009-03-26 19:13:11 +00:00
Sam Leffler aeab3282fd dynamic turbo mode is only implemented in sta mode; don't enable it
for other operating modes based on the capability
2009-03-26 19:07:56 +00:00
Sam Leffler d01b3c2603 need to adjust htinfo offset when csa is inserted 2009-03-26 19:06:00 +00:00
Sam Leffler 92e870ed4d adjust tdma ie offset when beacon frame contents changes 2009-03-26 19:04:11 +00:00
Sam Leffler 0cd9c215fa shuffle code so things build w/o INVARIANTS or IEEE80211_SUPPORT_SUPERG
Prodded by:	several
2009-03-25 03:02:03 +00:00
Sam Leffler 694f48d3a7 hide linker set stuff from user space 2009-03-24 21:02:19 +00:00
Sam Leffler 616190d079 split Atheros SuperG support out into it's own file that's included only
with a new IEEE80211_SUPPORT_SUPERG option
2009-03-24 20:39:08 +00:00
Sam Leffler 8c4e758a8b add linker sets for get/set ioctl handlers so optional net80211
code is isolated
2009-03-24 17:57:48 +00:00
Sam Leffler fffcc698c7 use IEEE80211_SUPPORT_TDMA option to control whether code is
configured; this allows us to remove an #ifdef
2009-03-24 17:22:10 +00:00
Rui Paulo b75e8a615c Remove leftover comment because we now use a flag to check for associd.
Discussed with:	sam
2009-03-19 18:45:37 +00:00
Rui Paulo 0ce9091af8 Fix typo in comment. 2009-03-19 18:34:58 +00:00
Rui Paulo df0d214ad3 Use plural in a comment. No functional change. 2009-03-18 21:33:28 +00:00
Sam Leffler f9b5a72f15 rate limit printfs for invalid tdma ie contents; probably want this to
be less than 1/sec
2009-03-18 19:38:39 +00:00
Sam Leffler 2bc3ce7732 Minor cleanups of tdma protocol handling:
o break out version-related code to simplify rev'ing the protocol
o add parameter validation macros so checks that appear multiple places
  are consistent (and easy to change)
o add protocol version check when looking for a scan candidate
o improve scan debug output format
o rewrite beacon update handling to calculate a bitmask of changed values
  and pass that down through the driver callback so drivers can optimize work
o do slot bounds check before use when parsing received beacons
2009-03-18 19:28:17 +00:00
Sam Leffler 645aa556fb add the desired channel to the scan list if not already present and
compatible with other scan controls
2009-03-04 22:05:25 +00:00
Ed Schouten 802cb57e34 Add memmove() to the kernel, making the kernel compile with Clang.
When copying big structures, LLVM generates calls to memmove(), because
it may not be able to figure out whether structures overlap. This caused
linker errors to occur. memmove() is now implemented using bcopy().
Ideally it would be the other way around, but that can be solved in the
future. On ARM we don't do add anything, because it already has
memmove().

Discussed on:	arch@
Reviewed by:	rdivacky
2009-02-28 16:21:25 +00:00
Bjoern A. Zeeb 33553d6e99 For all files including net/vnet.h directly include opt_route.h and
net/route.h.

Remove the hidden include of opt_route.h and net/route.h from net/vnet.h.

We need to make sure that both opt_route.h and net/route.h are included
before net/vnet.h because of the way MRT figures out the number of FIBs
from the kernel option. If we do not, we end up with the default number
of 1 when including net/vnet.h and array sizes are wrong.

This does not change the list of files which depend on opt_route.h
but we can identify them now more easily.
2009-02-27 14:12:05 +00:00
Sam Leffler cc3e9fe79c change tdma slave behaviour: if the channel is locked don't do bmiss handling
(so no scanning/roaming)

Reviewed by:	Chris Anderson
2009-02-22 18:48:54 +00:00
Sam Leffler 110a70e3b2 display min/max dwell times in msecs in debug msgs 2009-02-22 18:46:36 +00:00
Sam Leffler aa68c24fb7 mark nodes created by way of neighbor discovery need to be marked as ERP
so they get the correct tx parameters setup by node_settxparms
2009-02-20 23:05:05 +00:00
Sam Leffler a4b3c7a506 o reset aggressive mode flag; it was being left set after marking an
interface down
o only allow the first vap to initialize shared wme parameters
2009-02-20 21:57:05 +00:00
Sam Leffler 67ce310a5a misc cleanup of wme parameter setting 2009-02-20 21:55:23 +00:00
Sam Leffler 24a07b5b23 use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
Sam Leffler 6a76ae216e Add modes for 1/2 and 1/4-width channels so we have separate roaming
and xmit parameters.  This makes it possible to use tdma on fractional
channels.
o add IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER; note these are
  band-agnostic (may need revisiting)
o setup all default rates in ic_sup_rates instead of doing it only
  for active modes; we need these to calculate the default tx parameters
  which are not recalculated after a regulatory update (can't just
  recalculate after installing a new channel list because we might
  clobber user settings)
o remove special case code in ieee80211_get_suprates; this is now
  a candidate for an inline or removal
o add various entries for new modes (roaming+tx params, wme, rate
  mapping, scan set setup, country ie construction, tdma, basic rates)

Note these modes are intentionally not visible through if_media.
2009-02-19 05:21:54 +00:00
Sam Leffler cbb24c240d o looseen abi dependencies on IEEE80211_MODE_MAX by accepting smaller
parameters for IEEE80211_IOC_ROAM and IEEE80211_IOC_TXPARAMS; this
  lets us add more modes and still have old apps work
o consolidate loops to remote assumptions about mode ordering
2009-02-19 05:03:10 +00:00
Sam Leffler be0df3e7c0 use c99 initializers 2009-02-19 04:52:03 +00:00
Sam Leffler 047db6b311 o consolidate loops to eliminate assumptions about ordering of modes
o replace 0x80 by IEEE80211_RATE_MCS
2009-02-19 04:46:09 +00:00
Sam Leffler da92f1598c Change country ie construction to simplify forthcoming changes:
o use c99 initializer for skipflags
o calculate band flags instead of statically listing them in the table
2009-02-19 04:44:18 +00:00
Sam Leffler 59a40225d5 use c99 initializer 2009-02-19 04:40:47 +00:00
Sam Leffler 82c990a4ef simplify setting up the roaming parameters; writing default parameters only
for active modes hasn't turned out to be useful so just define a const table
and copy it in place
2009-02-19 04:37:44 +00:00
Sam Leffler 566d825ba7 check ptr against NULL 2009-02-19 04:34:22 +00:00
Sam Leffler 40432d369a instead of special casing lookups for the 11na/g legacy rate set, just
install the rates once when creating the com structure
2009-02-19 04:33:36 +00:00