Commit Graph

555 Commits

Author SHA1 Message Date
sam
be075a28da 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
dabf12094d fix whitespace 2009-04-03 20:46:32 +00:00
sam
cde6991b73 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
ec9a1dd6fa 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
rpaulo
138715ea93 Fix typo in comment. 2009-03-30 21:46:50 +00:00
rpaulo
b9ca081080 MFP mesh11s:
Add mesh debugging bit replacing the now deprecated RADKEYS.
2009-03-30 21:41:06 +00:00
sam
f7c50ce1e4 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
59153db3b7 toggling fast-frames requires clocking the state machine 2009-03-29 21:00:27 +00:00
sam
7edd0aa8ef 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
37e13d2174 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
382385b98b 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
9ca2b364da 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
bea67b16d2 need to adjust htinfo offset when csa is inserted 2009-03-26 19:06:00 +00:00
sam
3eec009b3e adjust tdma ie offset when beacon frame contents changes 2009-03-26 19:04:11 +00:00
sam
185450a1c5 shuffle code so things build w/o INVARIANTS or IEEE80211_SUPPORT_SUPERG
Prodded by:	several
2009-03-25 03:02:03 +00:00
sam
901cb82d34 hide linker set stuff from user space 2009-03-24 21:02:19 +00:00
sam
88b91b235f 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
da77f06ea9 add linker sets for get/set ioctl handlers so optional net80211
code is isolated
2009-03-24 17:57:48 +00:00
sam
31a3addbde 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
rpaulo
85fe22317e Remove leftover comment because we now use a flag to check for associd.
Discussed with:	sam
2009-03-19 18:45:37 +00:00
rpaulo
12a4427816 Fix typo in comment. 2009-03-19 18:34:58 +00:00
rpaulo
24d921c8b2 Use plural in a comment. No functional change. 2009-03-18 21:33:28 +00:00
sam
2235508d5e 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
8bfd160665 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
9b33d4c5ea 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
322413c46c 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
bz
df2be82cec 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
317670e209 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
f2445982b7 display min/max dwell times in msecs in debug msgs 2009-02-22 18:46:36 +00:00
sam
6b0a7363d7 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
2ac5c35cb5 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
ba5dbdcdd9 misc cleanup of wme parameter setting 2009-02-20 21:55:23 +00:00
sam
c5cc4a3059 use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
sam
ac3671600d 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
c56d117735 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
ea09029f59 use c99 initializers 2009-02-19 04:52:03 +00:00
sam
6865ea1cbd 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
e092563f43 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
fe861a3d8d use c99 initializer 2009-02-19 04:40:47 +00:00
sam
3f5ab4a07f 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
396490ec3e check ptr against NULL 2009-02-19 04:34:22 +00:00
sam
8f46eec090 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
sam
64a0820609 add phy types for 1/2 and 1/4-rate modes 2009-02-19 04:19:58 +00:00
sam
9705c5de71 remove ic_stats; it was intended to accumulate stats from vaps as they
were reaped but was never used and is inaccessible
2009-02-13 05:31:18 +00:00
sam
c96b4defec strip M_FRAG & co mbufs coming down from ip_output, these flags are
re-used within net80211 to mark 802.11 frags so allowing them to
leak through to the driver caused packets to be dropped in ath
2009-02-13 05:26:04 +00:00
sam
cf2094a543 o replace ieee80211_node_reclaim by individual operations to release the
references to iv_bss and the sta table; this is equivalent and causes
  direct reclaim of the old bss node when any references in packets inflight
  are reclaimed (previously the old node would sit in the bss table until
  the inactivity processing reclaimed it)
o remove ieee80211_node_reclaim now that it's only use is gone

Reviewed by:	avatar, cbzimmer
2009-02-12 23:34:58 +00:00
thompsa
251dd2ca41 Add a ieee80211_waitfor_parent() function that will wait for all deferred
parent interface tasks to complete. This had been added to the ioctl path but
it is also need elsewhere like detach so its safe to teardown.

Reported by:	Hans Petter Selasky
Submitted by:	sam
2009-02-12 18:57:18 +00:00
sam
c1e92bfb20 improve key index map reclaim debug msg 2009-02-11 18:40:09 +00:00
sam
e5e720dbeb oops, fix octal escape sequence 2009-02-11 18:39:20 +00:00
sam
b24d0a6db9 remove bogus reference reclaim on the slave-side bss node on beacon miss 2009-02-11 17:30:36 +00:00