Commit Graph

501 Commits

Author SHA1 Message Date
weongyo
1d31003322 mark M_LASTFRAG at the last fragment.
Reviewed by:	sam
MFC after:	3 weeks
2009-02-09 04:39:16 +00:00
sam
6c8a518fd3 o change _db_show_key to always dump the contents instead of checking
IEEE80211_KEY_DEVKEY
o fix channel power printing (they are signed values)
o add show statab to dump a node table and automatically dump the sta
  table of a com structure with /s
2009-02-05 20:26:53 +00:00
sam
451a1d6071 o add IEEE80211_KEY_BITS for %b printing of wk_flags
o replace hand-rolled code to print wk_flags
o add display of ni_ucastkey in show sta
o fix \n in _db_show_key
2009-02-05 19:20:34 +00:00
sam
a142097876 When crafting a media setting w/ an auto (non-fixed) rate mask out the
turbo option in addition to the mode bits; otherwise if the current
channel is a turbo mode channel we'll form an invalid media setting
and the ifmedia_set operation in vap_attach will panic.

While here use C99-style initialization for an array indexed by mode;
this makes it consistent w/ other usage and avoids breakage if we
should ever change the set of modes.
2009-02-03 22:32:26 +00:00
sam
860ee29713 when promoting an 11b channel to 11g do not accept a ``pure G'' (OFDM only)
channel, only accept a real 11g channel; this fixes a problem where we were
wrongly promoting 11b to a Dynamic Turbo G channel which broke scanning on
channel 6
2009-02-01 22:24:08 +00:00
sam
d134c940ba setup default fixed rates for static turbo and 11n;
the 11n rates are pure guess
2009-01-29 23:12:06 +00:00
sam
49cefc1300 set ni_txparms for static turbo mode 2009-01-29 23:11:18 +00:00
sam
5fee012a8e setup default rate set for static turbo mode 2009-01-29 23:09:12 +00:00
sam
2c8d272b5e add an assert to verify the number of channels returned by ic_getradiocaps
correlates with the size of the channel array passed down

might want to promote this to be always present to catch for driver errors
2009-01-28 18:39:23 +00:00
sam
dce44e3d8e change null_getradiocaps to return the actual count of channels instead
of the true number; otherwise the caller may use the count to do things
with the data it should not (e.g. sort the channel table)
2009-01-28 18:37:46 +00:00
sam
76e17e88af Extend channel definition with:
o max antenna gain
o driver private opaque data

Note this grows the size of a channel to 16 bytes; which makes the
default channel table 4Kbytes (up from 3Kbytes).
2009-01-27 23:48:13 +00:00
sam
43289e8c91 fix comment 2009-01-27 23:43:20 +00:00
sam
da982ab4bb Remove assumptions about the max # channels in ioctl's:
o change ioctl's that pass channel lists in/out to handle variable-size
  arrays instead of a fixed (compile-time) value; we do this in a way
  that maintains binary compatibility
o change ifconfig so all channel list data structures are now allocated
  to hold MAXCHAN entries (1536); this, for example, allows the kernel
  to return > IEEE80211_CHAN_MAX entries for calls like IEEE80211_IOC_DEVCAPS
2009-01-27 23:42:14 +00:00
sam
b9b96b31bd change ic_getradiocaps driver callback to include the max # channels
so callers know the size of the array passed down
2009-01-27 23:19:36 +00:00
sam
5d3fffbba8 o add country codes from Atheros regulatory; these are not listed in
the ISO tables, mark them accordingly
o add sku's for handling 900MHz cards
o add opaque struct defs and change []'s to *'s so this file can be
  included w/o requiring all of net80211 to be pulled in
o make CTRY_DEBUG and CTRY_DEFAULT public
2009-01-27 23:09:55 +00:00
sam
61a0b86ec5 o make %b msg bit defines public (to user apps too)
o rename IEEE80211_C_CRYPTO_BITS to IEEE80211_CRYPTO_BITS
2009-01-27 23:00:38 +00:00
sam
189648aebe fill in ieee channel #'s and max tx power for drivers that work exclusively
with frequencies; this mimics how ieee80211_setregdomain works
2009-01-27 22:48:46 +00:00
sam
884f5ba01a add new state bit to indicate when interference is observed on the channel 2009-01-27 22:46:34 +00:00
sam
bd93b05472 change IEEE80211_IS_CHAN_OFDM and IEEE80211_IS_CHAN_CCK to return true
for 11g (dynamic CCK/OFDM)
2009-01-27 22:45:31 +00:00
sam
adb0cf3b1d define IEEE80211_CHAN_108A and IEEE80211_CHAN_108G in terms of their
non-turbo names to make the relationship more clear
2009-01-27 22:43:32 +00:00
thompsa
63e5efcb88 If the parent up/down task was queued then sync with it before returning from
the vap ioctl. This means that the parent interface should hopefully be up
before we return to userland, it does not depend on the parent init succeeding,
just that it was run.

This fixes wpa_supplicant with ndis and USB where the parent interfaces can be
slow to init.
2009-01-25 07:31:51 +00:00
sam
cdea6eebed fix regulatory state check for all vaps' being down; it must be done
before calling the ic_setregdomain callback
2009-01-23 18:16:14 +00:00
sam
82ca467ce7 add defines for driver-private bits to eliminate use of constants 2009-01-23 18:15:09 +00:00
sam
57e30e3c20 add missing return that broke WPA1+2 support
Submitted by:	"Jared Go" <jared@hobnob.com>
2009-01-11 18:59:14 +00:00
sam
98ad45c3d3 TDMA support for long distance point-to-point links using ath devices:
o add net80211 support for a tdma vap that is built on top of the
  existing adhoc-demo support
o add tdma scheduling of frame transmission to the ath driver; it's
  conceivable other devices might be capable of this too in which case
  they can make use of the 802.11 protocol additions etc.
o add minor bits to user tools that need to know: ifconfig to setup and
  configure, new statistics in athstats, and new debug mask bits

While the architecture can support >2 slots in a TDMA BSS the current
design is intended (and tested) for only 2 slots.

Sponsored by:	Intel
2009-01-08 17:12:47 +00:00
sam
a2d76da02a only mark an infrastructure node to require an associd for xmit; fixes adhoc
mode sta's that join an existing ibss
2009-01-07 18:17:36 +00:00
sam
e6b5c28764 mark discovered neighbors QoS capable if they advertise wme 2008-12-31 21:29:09 +00:00
sam
e2017a9003 follow prevailing style 2008-12-31 21:21:46 +00:00
sam
7aaeeb0704 convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
sam
871c5d3475 fix comment
Submitted by:	Daan Vreeken
2008-12-16 01:17:36 +00:00
sam
15140ba618 Fix ucastkey teardown for drivers that plumb clear keys or similar
(e.g. ath): we must check the key index and not whether the key
points at a cipher other than "undef".  This looks like it's been
broken for a while.  Might be worth adding an explicit clear cipher
at some point though this would require changes to the usage of
IEEE80211_KEY_UNDEFINED.

PR:		125906
2008-12-15 22:50:50 +00:00
sam
bd66e2635f remove extraneous ';' 2008-12-15 22:31:54 +00:00
sam
dc256886cd Fix definition of IEEE80211_CHAN_MAX; it was defined as 255 but
really was meant to be 256.  Adjust usage accordingly and replace
bogus usage of this value in checking IEEE channel #'s.

NB: this causes an ABI change; ifconfig must be recompiled
2008-12-15 01:26:33 +00:00
sam
7c6e6cbb86 Replace adhoc checks in ieee80211_start with a per-node flag that
indicates if an association id is required before outbound traffic
is permitted.  This cleans up the previous change that broke mcast
traffic "to the stack" in ap mode as a side effect.

Reviewed by:	sephe, thompsa, weongyo
2008-12-15 00:47:24 +00:00
bz
604d89458a Rather than using hidden includes (with cicular dependencies),
directly include only the header files needed. This reduces the
unneeded spamming of various headers into lots of files.

For now, this leaves us with very few modules including vnet.h
and thus needing to depend on opt_route.h.

Reviewed by:	brooks, gnn, des, zec, imp
Sponsored by:	The FreeBSD Foundation
2008-12-02 21:37:28 +00:00
sam
34152f170b correct sorting 2008-11-23 01:51:14 +00:00
kmacy
2b4df7158b convert calls to IFQ_HANDOFF to if_transmit 2008-11-22 07:35:45 +00:00
sam
6094a6154c Fix checks for fast frames negotiation. ni_ath_flags holds the
capabilities reported by the ap.  These need to be cross-checked
against the local configuration in the vap.  Previously we were
only checking the ap capabilities which meant that if an ap reported
it was ff-capable but we were not setup to use them we'd try to do
ff aggregation and drop the frame.

There are a number of problems to be fixed here but applying this
fix immediately as the problem causes all traffic to stop (and has
not workaround).

Reported by:	Ashish Shukla
2008-10-30 16:22:04 +00:00
sam
94d7312861 o use the new association callback to notify the driver when joining a bss
in sta and adhoc modes; this should've been done forever ago as most all
  drivers use this hook to set per-station transmit parameters such as for
  tx rate control
o adjust drivers to remove explicit calls to the driver newassoc method
2008-10-27 16:46:50 +00:00
sam
55988186e0 o re-enable a lock assert
o while here reformat a comment to sync w/ other repot's
2008-10-26 21:59:07 +00:00
sam
ed90b40066 Fix joining an 11b BSS: scanning is normally done using 11g channels
(unless explicitly locked to mode 11b) so when we join the bss the
channel attached to the scan cache entry may need to be demoted.

o demote to 11b if the ap is advertising 11b rates
o skip the ap if it's 11b but we're locked to 11g (could consider this
  advisory but for now treat it as mandatory)
o handle an odd edge case, if there is a fixed transmit rate for 11g
  then the rate check against the 11b ap will fail, try to demote to
  11b and retry the rate check

Reviewed by:	sephe, thompsa
2008-10-26 21:56:27 +00:00
sam
df1bd7956d New ap-side power save implementation; the main change is to allow drivers
to queue frames previously encapsulated on a separate high priority list
that is dispatched before the unencapsulated frames (to preserve order).
2008-10-26 01:04:46 +00:00
sam
ee9b1738af move decl up before first use 2008-10-26 01:01:01 +00:00
sam
8de9c50565 introduce M_ENCAP flag to mark packets encapsulated w/ an 802.11 header 2008-10-26 00:55:38 +00:00
sam
aac2357719 fix comment that belonged w/ previous commit 2008-10-26 00:52:26 +00:00
sam
8e7745ccc6 change ieee80211_send_probereq to supply raw xmit parameters so it can
control how frames are handled by the driver
2008-10-26 00:48:20 +00:00
sam
1a02c34468 change ieee80211_send_nulldata to send a QoS Null Data frame to a
QoS-enabled station; this makes inactivity handling follow the spec
as previously it would probe inactive stations w/ a Null Data (no QoS)
data frame
2008-10-26 00:46:17 +00:00
sam
fc829915ea o change ieee80211_mgmt_output to take a raw xmit parameters block so
the net80211 layer has complete control over the handling of mgt frames
  (in particular, the ac, tx rate, and retry count); this also allows us
  to purge the M_LINK0 flag that was attached to mbufs to mark them as
  needing encryption for shared key auth
o change ieee80211_send_setup to take a tid parameter so it can be used
  to setup QoS frames
2008-10-26 00:43:11 +00:00
sam
826606e081 fix old merge botch that causes gaps in the tx seq# space for QoS frames 2008-10-26 00:32:02 +00:00
sam
5a6374beb2 Sync BAR frame handling with out of tree work:
o correct BAR frame construction for AMPDU
o retransmit BAR frames until ACK'd or timeout (use tunables to
  control behaviour, default is very aggressive)
o defer seq# update until BAR frame is ACK'd
o add BAR response handling callback for driver to interpose and
  push new state to device or push pending aggregates

While here also:
o add backpointer to node in the per-tid tx aggregation data structure
o move ampdu tx state setup/teardown work to separate functions
2008-10-25 23:58:59 +00:00