Commit Graph

482 Commits

Author SHA1 Message Date
Sam Leffler
8fed2e0450 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
Andrew Thompson
8d9b29f35b 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 Leffler
a5985e8b56 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 Leffler
76df237570 add defines for driver-private bits to eliminate use of constants 2009-01-23 18:15:09 +00:00
Sam Leffler
8d092df91a add missing return that broke WPA1+2 support
Submitted by:	"Jared Go" <jared@hobnob.com>
2009-01-11 18:59:14 +00:00
Sam Leffler
10ad9a77f3 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 Leffler
6ca74c40de 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 Leffler
9094ffdfe3 mark discovered neighbors QoS capable if they advertise wme 2008-12-31 21:29:09 +00:00
Sam Leffler
72fecb4d6c follow prevailing style 2008-12-31 21:21:46 +00:00
Sam Leffler
e2126dec84 convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
Sam Leffler
12c290fe6e fix comment
Submitted by:	Daan Vreeken
2008-12-16 01:17:36 +00:00
Sam Leffler
ca92652af7 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 Leffler
7946271527 remove extraneous ';' 2008-12-15 22:31:54 +00:00
Sam Leffler
31378b1c87 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 Leffler
1b999d643c 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
Bjoern A. Zeeb
4b79449e2f 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 Leffler
f7eb979a5e correct sorting 2008-11-23 01:51:14 +00:00
Kip Macy
aea78d2094 convert calls to IFQ_HANDOFF to if_transmit 2008-11-22 07:35:45 +00:00
Sam Leffler
d6f57961a8 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 Leffler
e66b0905fc 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 Leffler
5d44f8c024 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 Leffler
8f4addc0a8 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 Leffler
63092fce49 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 Leffler
99f1b25c9f move decl up before first use 2008-10-26 01:01:01 +00:00
Sam Leffler
c1af44bdac introduce M_ENCAP flag to mark packets encapsulated w/ an 802.11 header 2008-10-26 00:55:38 +00:00
Sam Leffler
0e66722d20 fix comment that belonged w/ previous commit 2008-10-26 00:52:26 +00:00
Sam Leffler
16d7cbb108 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 Leffler
6683931e81 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 Leffler
8ac160cd2e 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 Leffler
380b865a0d fix old merge botch that causes gaps in the tx seq# space for QoS frames 2008-10-26 00:32:02 +00:00
Sam Leffler
cc71a422ea 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
Sam Leffler
dfcd1f4d0e set erp flag and tx parameter state when joining a bss; this allows
drivers to use ni_txparms
2008-10-25 23:44:25 +00:00
Sam Leffler
ae3f00bbfd honor IEEE80211_CLONE_NOBEACONS for type of vap, not just a sta mode vap 2008-10-25 23:43:08 +00:00
Sam Leffler
be1054ed14 improve inactivity handling debug support 2008-10-25 23:40:48 +00:00
Sam Leffler
52ef06dcfe use a private mgt frame recv handler for ahdemo mode instead of an inline
test in the adhoc mode rx path so classes derived from ahdemo mode can
override the default behaviour
2008-10-25 23:40:29 +00:00
Sam Leffler
887acaadec expand captured ie's before calling match_bss so they can potentially
be used in the process
2008-10-25 23:39:18 +00:00
Sam Leffler
1095925656 change ieee80211_sta_join to take an explicit channel instead of
using the value in the scan parameters; this will be used to fix
issues with 11b operation
2008-10-25 23:32:24 +00:00
Sam Leffler
f945bd7aa9 o add support for ifconfig wlanX mode foo
o yank useless code for setting fixed rate through media opts: this
  mechanism didn't scale to HT rates and couldn't handle multiple bands;
  fixed tx rates are set with the IEEE80211_IOC_TXPARAMS ioctl
2008-10-25 23:31:20 +00:00
Sam Leffler
fad0f46d20 add debug msgs 2008-10-25 23:28:24 +00:00
Sam Leffler
6ff2e10a56 fix associd check for adhoc mode
Reviewed by:	jhay
2008-10-25 23:28:04 +00:00
Sam Leffler
643024a2b1 ignore IEEE80211_ELEMID_PWRCNSTR when parsing beacon/probe response frames
to avoid counting it as an unknown elemid (we often beacon this so it shows
up as a "false positive")
2008-10-25 23:26:57 +00:00
Sam Leffler
d1abf1f411 add 1/2 and 1/4 channel flags to IEEE80211_CHAN_ALL so that operations
like ieee80211_find_channel are more useful
2008-10-25 23:24:49 +00:00
Sam Leffler
07760642a6 add/improve debug msgs 2008-10-25 23:23:41 +00:00
Dag-Erling Smørgrav
c5abbba314 Revert the removal of the MALLOC and FREE macros from the net80211 code.
Requested by:	sam
2008-10-23 19:57:13 +00:00
Dag-Erling Smørgrav
1ede983cc9 Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after:	3 months
2008-10-23 15:53:51 +00:00
Marko Zec
8b615593fc Step 1.5 of importing the network stack virtualization infrastructure
from the vimage project, as per plan established at devsummit 08/08:
http://wiki.freebsd.org/Image/Notes200808DevSummit

Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator
macros, and CURVNET_SET() context setting macros, all currently
resolving to NOPs.

Prepare for virtualization of selected SYSCTL objects by introducing a
family of SYSCTL_V_*() macros, currently resolving to their global
counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().

Move selected #defines from sys/sys/vimage.h to newly introduced header
files specific to virtualized subsystems (sys/net/vnet.h,
sys/netinet/vinet.h etc.).

All the changes are verified to have zero functional impact at this
point in time by doing MD5 comparision between pre- and post-change
object files(*).

(*) netipsec/keysock.c did not validate depending on compile time options.

Implemented by:	julian, bz, brooks, zec
Reviewed by:	julian, bz, brooks, kris, rwatson, ...
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
2008-10-02 15:37:58 +00:00
Sam Leffler
63c61408ef guard against adhoc_pick_channel returning a NULL channel; this can
happen after a scan cache flush (e.g. in response to ifconfig wlan bssid -)
2008-09-27 21:18:40 +00:00
Sam Leffler
74fdefa7c9 must do a deep copy of mcast packets as they can be modified after dispatch
Submitted by:	"Jared Go" <jared@hobnob.com>
2008-09-25 20:25:25 +00:00
Andrew Thompson
4ea219803e Use db_printsym to lookup and print the function pointers. 2008-09-25 16:46:36 +00:00
Sam Leffler
b9b5f07d1c cleanup bss node setup; syncs w/ p4 state that's been in use for months 2008-09-22 00:22:09 +00:00