#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
262007 |
|
16-Feb-2014 |
kevlo |
MFC r260444:
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.
The origin of WEP comes from IEEE Std 802.11-1997 where it defines whether the frame body of MAC frame has been encrypted using WEP algorithm or not. IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates whether the frame is protected by a cryptographic encapsulation algorithm.
Reviewed by: adrian, rpaulo
|
#
259175 |
|
10-Dec-2013 |
gavin |
Merge r257065 (by adrian) from head:
Fix a use-after-free node reference issue when waiting for a return from a management frame transmission.
This bug is a bit loopy, so here goes.
The underlying cause is pretty easy to understand - the node isn't referenced before passing into the callout, so if the node is deleted before the callout fires, it'll dereference free'd memory.
The code path however is slightly more convoluted.
The functions _say_ mgt_tx - ie management transmit - which is partially true. Yes, that callback is attached to the mbuf for some management frames. However, it's only for frames relating to scanning and authentication attempts. It helpfully drives the VAP state back to "SCAN" if the transmission fails _OR_ (as I subsequently found out!) if the transmission succeeds but the state machine doesn't make progress towards being authenticated and active.
Now, the code itself isn't terribly clear about this.
It _looks_ like it's just handling the transmit failure case.
However, when you look at what goes on in the transmit success case, it's moving the VAP state back to SCAN if it hasn't changed state since the time the callback was scheduled. Ie, if it's in ASSOC or AUTH still, it'll go back to SCAN. But if it has transitioned to the RUN state, the comparison will fail and it'll not transition things back to the SCAN state.
So, to fix this, I decided to leave everything the way it is and merely fix the locking and remove the node reference.
The _better_ fix would be to turn this callout into a "assoc/auth request" timeout callback and make the callout locked, thus eliminating all races. However, until all the drivers have been fixed so that transmit completions occur outside of any locking that's going on, it's going to be impossible to do this without introducing LORs. So, I leave some of the evilness in there.
Candidate for 10.0.
|
#
259172 |
|
10-Dec-2013 |
gavin |
Merge r257754 (by adrian) from head:
Don't return ENOBUFS if the transmit path handles the frame but queues it (eg in power save.)
10.0 candidate.
PR: kern/183727
|
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
254956 |
|
27-Aug-2013 |
adrian |
Create a new function to complete 802.11 mbuf transmission.
The aim of this function is to eventually be the completion entry point for all 802.11 encapsulated mbufs. All the wifi drivers end up doing what is in this function so it's an easy win to turn it into a net80211 method and abstract out this code.
Ideally the drivers will all eventually be modified to queue up completed mbufs and call this function with all the driver locks not held. This will allow for some much more interesting software queue handling in the future (like net80211 based A-MSDU, fast-frames, A-MPDU aggregation and retransmission.)
Tested:
* ath(4), iwn(4)
|
#
254900 |
|
26-Aug-2013 |
adrian |
Migrate the ff_encap1() routine out into the normal output code.
This will eventually be used by the A-MSDU encapsulation code that I'm writing - the sub-frame encapsulation requirement is the same.
|
#
254500 |
|
18-Aug-2013 |
adrian |
Return the correct status if ieee80211_ff_check() consumes the mbuf.
I broke this when converting the net80211 TX path to use if_transmit.
|
#
254196 |
|
10-Aug-2013 |
adrian |
Add in missing m_free()'s during error conditions.
|
#
254082 |
|
08-Aug-2013 |
adrian |
Convert net80211 over to using if_transmit for the dispatch from the upper layer(s).
This eliminates the if_snd queue from net80211. Yay!
This unfortunately has a few side effects:
* It breaks ALTQ to net80211 for now - sorry everyone, but fixing parallelism and eliminating the if_snd queue is more important than supporting this broken traffic scheduling model. :-)
* There's no VAP and IC flush methods just yet - I think I'll add some NULL methods for now just as placeholders.
* It reduces throughput a little because now net80211 will drop packets rather than buffer them if the driver doesn't do its own buffering. This will be addressed in the future as I implement per-node software queues.
Tested:
* ath(4) and iwn(4) in STA operation
|
#
254076 |
|
07-Aug-2013 |
adrian |
Allow net80211 to compile on stable/9 and stable/8.
|
#
253727 |
|
28-Jul-2013 |
adrian |
Refactor the VAP transmit path code into a utility function that both the normal and the mesh transmit paths can use.
The API is a bit horrible because it both consumes the mbuf and frees the node reference regardless of whether it succeeds or not. It's a hold-over from how the code behaves; it'd be nice to have it not free the node reference / mbuf if TX fails and let the caller decide what to do.
|
#
253639 |
|
25-Jul-2013 |
rpaulo |
Add ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an OpenBSD driver that is being ported to FreeBSD.
Reviewed by: adrian
|
#
253007 |
|
07-Jul-2013 |
alfred |
Make kassert_printf use __printflike.
Fix associated errors/warnings while I'm here.
Requested by: avg
|
#
250974 |
|
25-May-2013 |
adrian |
Fix net80211 fragment creation.
When creating fragment frames, the header length should honour the DATAPAD flag.
This fixes the fragments that are queued to the ath(4) driver but it doesn't yet fix fragment transmission. That requires further changes to the ath(4) transmit path. Well, strictly speaking, it requires further changes to _all_ wifi driver transmit paths, but this is at least a start.
Tested:
* AR5416, STA mode, w/ fragthreshold set to 256.
|
#
249925 |
|
26-Apr-2013 |
glebius |
Add const qualifier to the dst parameter of the ifnet if_output method.
|
#
248106 |
|
09-Mar-2013 |
adrian |
Fix another compiler warning issue when invariants are disabled.
|
#
248069 |
|
08-Mar-2013 |
adrian |
Bring over my initial work from the net80211 TX locking branch.
This patchset implements a new TX lock, covering both the per-VAP (and thus per-node) TX locking and the serialisation through to the underlying physical device.
This implements the hard requirement that frames to the underlying physical device are scheduled to the underlying device in the same order that they are processed at the VAP layer. This includes adding extra encapsulation state (such as sequence numbers and CCMP IV numbers.) Any order mismatch here will result in dropped packets at the receiver.
There are multiple transmit contexts from the upper protocol layers as well as the "raw" interface via the management and BPF transmit paths. All of these need to be correctly serialised or bad behaviour will result under load.
The specifics:
* add a new TX IC lock - it will eventually just be used for serialisation to the underlying physical device but for now it's used for both the VAP encapsulation/serialisation and the physical device dispatch.
This lock is specifically non-recursive.
* Methodize the parent transmit, vap transmit and ic_raw_xmit function pointers; use lock assertions in the parent/vap transmit routines.
* Add a lock assertion in ieee80211_encap() - the TX lock must be held here to guarantee sensible behaviour.
* Refactor out the packet sending code from ieee80211_start() - now ieee80211_start() is just a loop over the ifnet queue and it dispatches each VAP packet send through ieee80211_start_pkt().
Yes, I will likely rename ieee80211_start_pkt() to something that better reflects its status as a VAP packet transmit path. More on that later.
* Add locking around the management and BAR TX sending - to ensure that encapsulation and TX are done hand-in-hand.
* Add locking in the mesh code - again, to ensure that encapsulation and mesh transmit are done hand-in-hand.
* Add locking around the power save queue and ageq handling, when dispatching to the parent interface.
* Add locking around the WDS handoff.
* Add a note in the mesh dispatch code that the TX path needs to be re-thought-out - right now it's doing a direct parent device transmit rather than going via the vap layer. It may "work", but it's likely incorrect (as it bypasses any possible per-node power save and aggregation handling.)
Why not a per-VAP or per-node lock?
Because in order to ensure per-VAP ordering, we'd have to hold the VAP lock across parent->if_transmit(). There are a few problems with this:
* There's some state being setup during each driver transmit - specifically, the encryption encap / CCMP IV setup. That should eventually be dragged back into the encapsulation phase but for now it lives in the driver TX path. This should be locked.
* Two drivers (ath, iwn) re-use the node->ni_txseqs array in order to allocate sequence numbers when doing transmit aggregation. This should also be locked.
* Drivers may have multiple frames queued already - so when one calls if_transmit(), it may end up dispatching multiple frames for different VAPs/nodes, each needing a different lock when handling that particular end destination.
So to be "correct" locking-wise, we'd end up needing to grab a VAP or node lock inside the driver TX path when setting up crypto / AMPDU sequence numbers, and we may already _have_ a TX lock held - mostly for the same destination vap/node, but sometimes it'll be for others. That could lead to LORs and thus deadlocks.
So for now, I'm sticking with an IC TX lock. It has the advantage of papering over the above and it also has the added advantage that I can assert that it's being held when doing a parent device transmit. I'll look at splitting the locks out a bit more later on.
General outstanding net80211 TX path issues / TODO:
* Look into separating out the VAP serialisation and the IC handoff. It's going to be tricky as parent->if_transmit() doesn't give me the opportunity to split queuing from driver dispatch. See above.
* Work with monthadar to fix up the mesh transmit path so it doesn't go via the parent interface when retransmitting frames.
* Push the encryption handling back into the driver, if it's at all architectually sane to do so. I know it's possible - it's what mac80211 in Linux does.
* Make ieee80211_raw_xmit() queue a frame into VAP or parent queue rather than doing a short-cut direct into the driver. There are QoS issues here - you do want your management frames to be encapsulated and pushed onto the stack sooner than the (large, bursty) amount of data frames that are queued. But there has to be a saner way to do this.
* Fragments are still broken - drivers need to be upgraded to an if_transmit() implementation and then fragmentation handling needs to be properly fixed.
Tested:
* STA - AR5416, AR9280, Intel 5300 abgn wifi * Hostap - AR5416, AR9160, AR9280 * Mesh - some testing by monthadar@, more to come.
|
#
246517 |
|
07-Feb-2013 |
monthadar |
Mesh bug: debug infomartion showing swapped SA and DA address.
* Fix bug for "forward frame from SA(%6D), DA(%6D)" where addresses where swapped between SA and DA;
Approved by: adrian (mentor)
|
#
246499 |
|
07-Feb-2013 |
monthadar |
Add mesh debug for interarction between DS & MBSS.
* Add mesh debug information when frames enter or leave the MBSS; * Set IEEE80211_MSG_OUTPUT bit to enable output;
Approved by: adrian (mentor)
|
#
243882 |
|
05-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched - sys/mbuf.h edited manually
|
#
237561 |
|
25-Jun-2012 |
monthadar |
Mesh mode, potential garbage in QoS subfield.
* qos[1] subfield is never assigned a value before this statement. qos[1] can potentially be OR:ed with garbage. Make it an assignment instead; * Remove brackets around if statement;
Approved by: adrian
|
#
234878 |
|
01-May-2012 |
monthadar |
Mesh forwarding with proxy support.
* Modified HWMP PREP/PREQ to contain a proxy entry and also changed PREP frame processing according to amendment as following: o Fixed PREP to always update/create if acceptance criteria is meet; o PREQ processing to reply if request is for a proxy entry that is proxied by us; o Removed hwmp_discover call from PREQ, because sending a PREP will build the forward path, and by receving and accepting a PREQ we have already built the reverse path (non-proactive code); * Disabled code for pro-active in PREP for now (will make a separate patch for pro-active HWMP routing later) * Added proxy information for a Mesh route, mesh gate to use and proxy seqno; * Modified ieee80211_encap according to amendment; * Introduced Mesh control address extension enum and removed unused struct, also rename some structure element names. * Modified mesh_input and added mesh_recv_* that should verify and process mesh data frames according to 9.32 Mesh forwarding framework in amendment; * Modified mesh_decap accordingly to changes done in mesh control AE struct;
Approved by: adrian
|
#
234324 |
|
15-Apr-2012 |
adrian |
Migrate the net80211 TX aggregation state to be from per-AC to per-TID.
TODO:
* Test mwl(4) more thoroughly!
Reviewed by: bschmidt (for iwn)
|
#
232480 |
|
04-Mar-2012 |
adrian |
* Introduce new flag for QoS control field; * Change in mesh_input to validate that QoS is set and Mesh Control field is present, also both bytes of the QoS are read; * Moved defragmentation in mesh_input before we try to forward packet as inferred from amendment spec, because Mesh Control field only present in first fragment; * Changed in ieee80211_encap to set QoS subtype and Mesh Control field present, only first fragment have Mesh Control field present bit equal to 1;
Submitted by: monthadar@gmail.com
|
#
232097 |
|
24-Feb-2012 |
adrian |
Hold IF_LOCK when manipulating the interface flags.
It doesn't _really_ help all that much, I'll commit something to sys/net/if.c at some point explaining why, but the lock should be held when checking/manipulating/branching because of said lock.
|
#
229795 |
|
07-Jan-2012 |
bz |
Correct comment for the IPv6 case to say "traffic class" not "TOS" as pointed out back in 2009.
MFC after: 3 days
|
#
227331 |
|
08-Nov-2011 |
adrian |
Add 802.11h quiet time element support into net80211.
This supports both station and hostap modes:
* Station mode quiet time element support listens to quiet time IE's and modifies the local quiet time configuration as appropriate; * Hostap mode both obeys the locally configured quiet time period and includes it in beacon frames so stations also can obey as needed.
Submitted by: Himali Patel <himali.patel@sibridgetech.com> Sponsored by: Sibridge Technologies
|
#
225139 |
|
24-Aug-2011 |
adrian |
This patch fixes beacon frame sequence number generation. The code didn't set a sequence number; it didn't show up earlier because the hardware most people use for hostap (ie, AR5212 series stuff) sets the sequence numbers up in hardware. Later hardware (AR5416, etc) which can do 11n and aggregation require sequence numbers to be generated in software.
Submitted by: paradyse@gmail.com Approved by: re (kib)
|
#
222682 |
|
04-Jun-2011 |
bschmidt |
Data frames sent over the mgmt path might be part of a TX aggr session too. In that case don't fiddle with the seqno as drivers are supposed to handle that.
Currently only the powersave feature does sent QoS-null-data frames before and after a background scan which must be handled correctly. Due to this being quite rare we don't fiddle around with starting of aggr sessions.
|
#
221022 |
|
25-Apr-2011 |
bz |
We need in.h for both INET and INET6, as according to RFC 3493 it defines struct in6_addr, which is needed by ip6_hdr used in here.
Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days
|
#
219604 |
|
13-Mar-2011 |
bschmidt |
When injecting frames a temporary node is faked, during this several uses of ic_curchan occur. Due to the nature of a scan, switching channels constantly and all this happening without any kind of locks held, it might happen that ic_curchan points to nowhere leading to panics. Fix this by not allowing frame injections while in SCAN state.
Tested by: Paul B. Mahol <onemda at gmail.com>
|
#
218928 |
|
21-Feb-2011 |
bschmidt |
It is IEEE80211_SUPPORT_XXX not IEEE80211_XXX_SUPPORT.
|
#
198384 |
|
23-Oct-2009 |
rpaulo |
The draft spec doesn't say beacon frames need to have a wildcard BSSID, so remove the mesh code necessary for that.
MFC after: 2 days
|
#
198242 |
|
19-Oct-2009 |
rpaulo |
Implement the missing support for updating the mesh conf number of neighbors via ieee80211_beacon_notify().
MFC after: 3 days
|
#
195849 |
|
24-Jul-2009 |
sam |
revert OACTIVE part of r195845; instead fix the comment so it does not refer to the old hack removed in r193312
Approved by: re (implicit)
|
#
195845 |
|
24-Jul-2009 |
sam |
o kill old code no longer needed after r193312 o count output packets+errors for frames sent through ieee80211_output
Approved by: re (kensmith)
|
#
195784 |
|
20-Jul-2009 |
rpaulo |
More mesh bits, namely: * bridge support (sam) * handling of errors (sam) * deletion of inactive routing entries * more debug msgs (sam) * fixed some inconsistencies with the spec. * decap is now specific to mesh (sam) * print mesh seq. no. on ifconfig list mesh * small perf. improvements
Reviewed by: sam Approved by: re (kib)
|
#
195618 |
|
11-Jul-2009 |
rpaulo |
Implementation of the upcoming Wireless Mesh standard, 802.11s, on the net80211 wireless stack. This work is based on the March 2009 D3.0 draft standard. This standard is expected to become final next year. This includes two main net80211 modules, ieee80211_mesh.c which deals with peer link management, link metric calculation, routing table control and mesh configuration and ieee80211_hwmp.c which deals with the actually routing process on the mesh network. HWMP is the mandatory routing protocol on by the mesh standard, but others, such as RA-OLSR, can be implemented.
Authentication and encryption are not implemented.
There are several scripts under tools/tools/net80211/scripts that can be used to test different mesh network topologies and they also teach you how to setup a mesh vap (for the impatient: ifconfig wlan0 create wlandev ... wlanmode mesh).
A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled by default on GENERIC kernels for i386, amd64, sparc64 and pc98.
Drivers that support mesh networks right now are: ath, ral and mwl.
More information at: http://wiki.freebsd.org/WifiMesh
Please note that this work is experimental. Also, please note that bridging a mesh vap with another network interface is not yet supported.
Many thanks to the FreeBSD Foundation for sponsoring this project and to Sam Leffler for his support. Also, I would like to thank Gateworks Corporation for sending me a Cambria board which was used during the development of this project.
Reviewed by: sam Approved by: re (kensmith) Obtained from: projects/mesh11s
|
#
193675 |
|
08-Jun-2009 |
sam |
do not strip M_MORE_DATA on packets coming through ieee80211_start; frames coming out of the ps q may have this set and removing it causes the 802.11 header to not indicate more frames follow which can result in the sta going to sleep and missing them
|
#
193658 |
|
07-Jun-2009 |
sam |
teach ieee80211_classify about ipv6 packets
Reviewed by: bz, rrs
|
#
193655 |
|
07-Jun-2009 |
sam |
iv_flags_ext is full, make room by moving HT-related flags to a new iv_flags_ht word
|
#
193504 |
|
05-Jun-2009 |
rwatson |
Fix spelling of MAC check for 8.x version of MAC Framework, not noticed due to a lack of an opt_mac.h include, which I won't add for now as options MAC will soon move to opt_global.h.
Spotted by: pjd
|
#
193439 |
|
04-Jun-2009 |
sam |
o station mode channel switch support o IEEE80211_IOC_CHANSWITCH fixups: - restrict to hostap vaps - return EOPNOTSUPP instead of EINVAL when applied to !hostap vap or to a vap w/o 11h enabled - interpret count of 0 to mean cancel the current CSA
Reviewed by: rpaulo, avatar
|
#
192468 |
|
20-May-2009 |
sam |
Overhaul monitor mode handling: o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO and remove explicit bpf support from wireless drivers; drivers now use ieee80211_radiotap_attach to setup shared data structures that hold the radiotap header for each packet tx/rx o remove rx timestamp from the rx path; it was used only by the tdma support for debugging and was mostly useless due to it being 32-bits and mostly unavailable o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and per-com state when there are active taps o track the number of monitor mode vaps o use bpf tap and monitor mode vap state to decide when to collect radiotap state and dispatch frames; drivers no longer explicitly directly check bpf state or use bpf calls to tap frames o handle radiotap state updates on channel change in net80211; drivers should not do this (unless they bypass net80211 which is almost always a mistake) o update various drivers to be more consistent/correct in handling radiotap o update ral to include TSF in radiotap'd frames o add promisc mode callback to wi
Reviewed by: cbzimmer, rpaulo, thompsa
|
#
191571 |
|
27-Apr-2009 |
sam |
Store the tx seq# of an 802.11 frame in the mbuf pkthdr; this will be used for s/w retransmit schemes that want to access this information w/o the overhead of decoding the raw frame. Note this also allows drivers to record this information w/o writing the frame when the seq# is obtained through an out-of-band mechanism (e.g. when a h/w assigned seq# is reported in a descriptor on tx done notification).
Reviewed by: sephe, avatar
|
#
191555 |
|
26-Apr-2009 |
sam |
add IEEE80211_FEXT_4ADDR to indicate ieee80211_encap should do 4-address encapsulation when relaying frames; this reduces the cost of the test and enables use for situations other than "sta vap + dwds"
|
#
191553 |
|
26-Apr-2009 |
sam |
hoist ampdu tx aggregation setup from ieee80211_encap to ieee80211_start where it was meant all along (the code was in encap because ampdu was implemented pre vaps)
|
#
191550 |
|
26-Apr-2009 |
sam |
stash the node pointer in the mbuf before doing ff aggregration so this is done in only one place
|
#
191545 |
|
26-Apr-2009 |
sam |
don't fragment ampdu aggregates
|
#
191544 |
|
26-Apr-2009 |
sam |
uniformly mark mbufs that pass through the tx path with M_MCAST; drivers can now use this flag instead of inspecting the contents
|
#
191540 |
|
26-Apr-2009 |
sam |
add missing part of r191537 that should have read: hoist DLT_IEEE802_11 bpf tap from ieee80211_encap up to ieee80211_start
|
#
191538 |
|
26-Apr-2009 |
sam |
fix comment
|
#
191537 |
|
26-Apr-2009 |
sam |
add missing DLT_IEEE802_11 bpf tap in ieee80211_start
|
#
191536 |
|
26-Apr-2009 |
sam |
fixup ieee80211_output handling: o correct bpf handling, send 'em to the right tap o do accouting o mark mbufs holding multicast frames
|
#
191148 |
|
16-Apr-2009 |
kmacy |
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
|
#
190850 |
|
08-Apr-2009 |
sam |
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
|
#
190678 |
|
03-Apr-2009 |
sam |
fix whitespace
|
#
190672 |
|
03-Apr-2009 |
sam |
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
|
#
190579 |
|
30-Mar-2009 |
sam |
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
|
#
190451 |
|
26-Mar-2009 |
sam |
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
|
#
190449 |
|
26-Mar-2009 |
sam |
need to adjust htinfo offset when csa is inserted
|
#
190448 |
|
26-Mar-2009 |
sam |
adjust tdma ie offset when beacon frame contents changes
|
#
190391 |
|
24-Mar-2009 |
sam |
split Atheros SuperG support out into it's own file that's included only with a new IEEE80211_SUPPORT_SUPERG option
|
#
190094 |
|
19-Mar-2009 |
rpaulo |
Remove leftover comment because we now use a flag to check for associd.
Discussed with: sam
|
#
188380 |
|
09-Feb-2009 |
weongyo |
mark M_LASTFRAG at the last fragment.
Reviewed by: sam MFC after: 3 weeks
|
#
186904 |
|
08-Jan-2009 |
sam |
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
|
#
186658 |
|
31-Dec-2008 |
sam |
follow prevailing style
|
#
186099 |
|
14-Dec-2008 |
sam |
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
|
#
185164 |
|
22-Nov-2008 |
kmacy |
convert calls to IFQ_HANDOFF to if_transmit
|
#
184288 |
|
25-Oct-2008 |
sam |
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).
|
#
184286 |
|
25-Oct-2008 |
sam |
introduce M_ENCAP flag to mark packets encapsulated w/ an 802.11 header
|
#
184285 |
|
25-Oct-2008 |
sam |
fix comment that belonged w/ previous commit
|
#
184284 |
|
25-Oct-2008 |
sam |
change ieee80211_send_probereq to supply raw xmit parameters so it can control how frames are handled by the driver
|
#
184283 |
|
25-Oct-2008 |
sam |
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
|
#
184282 |
|
25-Oct-2008 |
sam |
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
|
#
184281 |
|
25-Oct-2008 |
sam |
fix old merge botch that causes gaps in the tx seq# space for QoS frames
|
#
184271 |
|
25-Oct-2008 |
sam |
fix associd check for adhoc mode
Reviewed by: jhay
|
#
183247 |
|
21-Sep-2008 |
sam |
Cleanup AMPDU handling:
For receive: o explicitly tag rx frames w/ M_AMPDU instead of passing frames through the reorder processing according to the node having HT and the frame being QoS data o relax ieee80211_ampdu_reorder asserts to allow any frame to be passed in, unsuitable frames are returned to the caller for normal processing; this permits drivers that cannot inspect the PLCP to mark all data frames as potential ampdu candidates with only a small penalty o add M_AMPDU_MPDU to identify frames resubmitted from the reorder q
For transmit: o tag aggregation candidates with M_AMPDU_MPDU o fix the QoS ack policy set in ampdu subframes; we only support immediate BA streams which should be marked for "normal ack" to get implicit block ack behaviour; interestingly certain vendor parts BA'd frames with the 11e BA ack policy set o do not assign a sequence # to aggregation candidates; this must be done when frames are submitted for transmit (NB: this can/will be handled better when aggregation is pulled up to net80211)
|
#
180351 |
|
07-Jul-2008 |
sam |
reorder RSN/WPA2 ie in beacon and probe response frames to comply with IEEE802.11-2007 spec
Submitted by: Chris Zimmermann
|
#
179394 |
|
28-May-2008 |
sam |
Split s/w crypt/mic attributes to allow future hackery; this change should be a noop.
|
#
178354 |
|
20-Apr-2008 |
sam |
Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware loading to use firmware(9) and a separate module (e.g. ral). Also there no longer are separate wlan_scan* modules; this functionality is now bundled into the wlan module.
Supported by: Hobnob and Marvell Reviewed by: many Obtained from: Atheros (some bits)
|
#
174388 |
|
06-Dec-2007 |
kmacy |
Add padding for anticipated functionality - vimage - TOE - multiq - host rtentry caching
Rename spare used by 80211 to if_llsoftc
Reviewed by: rwatson, gnn MFC after: 1 day
|
#
173867 |
|
23-Nov-2007 |
sam |
correct WMM packet classification: o use TID_TO_WME_AC on vlan tag priority o ignore ECN bits in DSCP when mapping IP TOS and use TID_TO_WME_AC
MFC after: 3 days
|
#
173273 |
|
02-Nov-2007 |
sam |
sync 11n support with vap code base; many changes based on interop testing with all major vendors
MFC after: 1 week
|
#
172232 |
|
18-Sep-2007 |
sam |
honor IEEE80211_C_TXFRAG; drivers should never get fragmented packets unless they indicate they're able to handle them
Approved by: re (blanket wireless)
|
#
172231 |
|
18-Sep-2007 |
sam |
tag mgmt and null data frames w/ a WME priority so drivers can assume only data frames require classification
Approved by: re (blanket wireless)
|
#
172211 |
|
17-Sep-2007 |
sam |
Update beacon handling to sync w/ vap code base: o add driver callback to handle notification of beacon changes; this is required for devices that manage beacon frames themselves (devices must override the default handler which does nothing) o move beacon update-related flags from ieee80211com to the beacon offsets storage (or handle however a driver wants) o expand beacon offsets structure with members needed for 11h/dfs and appie's o change calling convention for ieee80211_beacon_alloc and ieee80211_beacon_update o add overlapping bss support for 11g; requires driver to pass beacon frames from overlapping bss up to net80211 which is not presently done by any driver o move HT beacon contents update to a routine in the HT code area
Reviewed by: avatar, thompsa, sephe Approved by: re (blanket wireless)
|
#
171950 |
|
24-Aug-2007 |
sam |
drop frames marked for encryption when no key is available
Reviewed by: avatar Approved by: re (kensmith) Obtained from: madwifi
|
#
170530 |
|
11-Jun-2007 |
sam |
Update 802.11 wireless support: o major overhaul of the way channels are handled: channels are now fully enumerated and uniquely identify the operating characteristics; these changes are visible to user applications which require changes o make scanning support independent of the state machine to enable background scanning and roaming o move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resources o add background scanning in station mode (no support for adhoc/ibss mode yet) o significantly speedup sta mode scanning with a variety of techniques o add roaming support when background scanning is supported; for now we use a simple algorithm to trigger a roam: we threshold the rssi and tx rate, if either drops too low we try to roam to a new ap o add tx fragmentation support o add first cut at 802.11n support: this code works with forthcoming drivers but is incomplete; it's included now to establish a baseline for other drivers to be developed and for user applications o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locally o add support for Atheros protocol extensions; mainly the fast frames encapsulation (note this can be used with any card that can tx+rx large frames correctly) o add sta support for ap's that beacon both WPA1+2 support o change all data types from bsd-style to posix-style o propagate noise floor data from drivers to net80211 and on to user apps o correct various issues in the sta mode state machine related to handling authentication and association failures o enable the addition of sta mode power save support for drivers that need net80211 support (not in this commit) o remove old WI compatibility ioctls (wicontrol is officially dead) o change the data structures returned for get sta info and get scan results so future additions will not break user apps o fixed tx rate is now maintained internally as an ieee rate and not an index into the rate set; this needs to be extended to deal with multi-mode operation o add extended channel specifications to radiotap to enable 11n sniffing
Drivers: o ath: add support for bg scanning, tx fragmentation, fast frames, dynamic turbo (lightly tested), 11n (sniffing only and needs new hal) o awi: compile tested only o ndis: lightly tested o ipw: lightly tested o iwi: add support for bg scanning (well tested but may have some rough edges) o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data o wi: lightly tested
This work is based on contributions by Atheros, kmacy, sephe, thompsa, mlaier, kevlo, and others. Much of the scanning work was supported by Atheros. The 11n work was supported by Marvell.
|
#
170360 |
|
06-Jun-2007 |
sam |
copyright updates: o update to include 2007 o switch back to a 2-clause bsd-only license
Reviewed by: onoe
|
#
167439 |
|
11-Mar-2007 |
sam |
keep tx/rx seq #'s for non-QoS traffic separate from QoS; stations aren't supposed mix traffic but if they did frames might be mis-handled
Obtained from: Atheros MFC after: 2 weeks
|
#
167432 |
|
11-Mar-2007 |
sam |
add IEEE80211_KEY_UNDEFINED and use it instead of local defs
Obtained from: netbsd
|
#
165569 |
|
27-Dec-2006 |
sam |
First cut at half/quarter-rate 11a channel support (e.g. for use in the Public Safety Band): o add channel flags to identify half/quarter-rate operation o add rate sets (need to check spec on 4Mb/s in 1/4 rate) o add if_media definitions for new rates o split net80211 channel setup out into ieee80211_chan_init o fixup ieee80211_mhz2ieee and ieee80211_ieee2mhz to understand half/quarter rate channels: note we temporarily use a nonstandard/hack numbering that avoids overlap with 2.4G channels because we don't (yet) have enough state to identify and/or map overlapping channel sets o fixup ieee80211_ifmedia_init so it can be called post attach and will recalculate the channel list and associated state; this enables changing channel-related state like the regulatory domain after attach (will be needed for 802.11d support too) o add ieee80211_get_suprates to return a reference to the supported rate set for a given channel o add 3, 4.5, and 27 MB/s tx rates to rate <-> media conversion routines o const-poison channel arg to ieee80211_chan2mode
|
#
164805 |
|
01-Dec-2006 |
sam |
back out use of LLC_SNAPFRAMELEN now that sizeof(struct llc) isn't padded on arm
|
#
164782 |
|
01-Dec-2006 |
sam |
sizeof(struct llc) includes padding on arm; use LLC_SNAPFRAMELEN for now
Submitted by: jhay MFC after: 2 weeks
|
#
162375 |
|
17-Sep-2006 |
andre |
Move ethernet VLAN tags from mtags to its own mbuf packet header field m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content.
Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field:
m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG;
to mark the packet m with the specified VLAN tag.
On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid:
if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... }
VLAN tags are stored in host byte order. Byte swapping may be necessary.
(Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.)
Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done.
Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
|
#
161144 |
|
10-Aug-2006 |
sam |
add per-sta ucast/mcast stats
MFC after: 1 week
|
#
160690 |
|
26-Jul-2006 |
sam |
add support for 802.11 packet injection via bpf
Together with: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Reviewed by: arch@ MFC after: 1 month
|
#
156758 |
|
15-Mar-2006 |
sam |
when doing s/w crypto make sure work is done w/ a writable mbuf chain; this corrects problems with drivers that rely on the host to do crypto (iwi, ipw, ral, ural, wi (hostap), awi)
Hard work by: luigi, mlaier Reviewed by: luigi, mlaier MFC after: 1 week
|
#
155999 |
|
25-Feb-2006 |
sam |
consolidate calculation of capabilities ie
Reviewed by: avatar MFC after: 2 weeks
|
#
155460 |
|
08-Feb-2006 |
sam |
set the mgt frame tx timer before dispatching the frame to the driver; this closes a race where a response could be processed before the timer was started and cause a RUN->SCAN state change when operating in station mode
Reviewed by: avatar, dyoung MFC after: 1 week
|
#
153973 |
|
02-Jan-2006 |
sam |
update erp information element in the beacon frame to reflect changes in the bss
Reviewed by: avatar Obtained from: atheros MFC after: 2 weeks
|
#
153139 |
|
05-Dec-2005 |
sam |
correct handling of dtim for periods > 1
Obtained from: madwifi
|
#
151967 |
|
02-Nov-2005 |
andre |
Retire MT_HEADER mbuf type and change its users to use MT_DATA.
Having an additional MT_HEADER mbuf type is superfluous and redundant as nothing depends on it. It only adds a layer of confusion. The distinction between header mbuf's and data mbuf's is solely done through the m->m_flags M_PKTHDR flag.
Non-native code is not changed in this commit. For compatibility MT_HEADER is mapped to MT_DATA.
Sponsored by: TCP/IP Optimization Fundraise 2005
|
#
148936 |
|
10-Aug-2005 |
sam |
Clarify/fix handling of the current channel: o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine
Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
|
#
148843 |
|
08-Aug-2005 |
sam |
Cleanup beacon/listen interval handling: o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard
Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
|
#
148582 |
|
31-Jul-2005 |
sam |
close a race between reclaiming a node when a station is inactive and sending the null data frame used to probe inactive stations
MFC after: 5 days
|
#
148315 |
|
22-Jul-2005 |
sam |
split xmit of probe request frame out into a separate routine that takes explicit parameters; this will be needed when scanning is decoupled from the state machine to do bg scanning
MFC after: 3 days
|
#
148314 |
|
22-Jul-2005 |
sam |
split 802.11 frame xmit setup code into ieee80211_send_setup
MFC after: 3 days
|
#
148304 |
|
22-Jul-2005 |
sam |
simplify tim callback api
MFC after: 3 days
|
#
148302 |
|
22-Jul-2005 |
sam |
simplify ieee80211_node_authorize and ieee80211_node_unauthorize api's
MFC after: 3 days
|
#
148301 |
|
22-Jul-2005 |
sam |
simplifiy ieee80211_send_nulldata api
MFC after: 3 days
|
#
147789 |
|
05-Jul-2005 |
sam |
Fix handling of data frames queued for a station in power save mode: don't mark the MORE_DATA bit when taking it off the ps queue, there's no 802.11 header then; we must wait to do this at encap time so mark the mbuf instead.
Reviewed by: avatar Approved by: re (scottl) Obtained from: Atheros
|
#
147223 |
|
10-Jun-2005 |
sam |
mark stations authorized during recv processing instead of doing it as a side effect of sending an auth success frame; sending mgmt frames should not have side effects
|
#
147066 |
|
06-Jun-2005 |
sam |
WPA/802.11i interoperability fixes: o only include capabilities word in the WPA ie when non-zero and not preauth o always include the capabilities in the RSN ie
Obtained from: Atheros
|
#
147045 |
|
06-Jun-2005 |
sam |
add force flag to enmic/demic crypto api for use in xmit fragmentation and h/w mic verification
Reviewed by: avatar
|
#
144136 |
|
26-Mar-2005 |
sam |
don't include wme ie in probe request frames; it was meant for probe response frames--move it there
Noticed by: Ghislain Mary Submitted by: Michael Wong
|
#
143716 |
|
16-Mar-2005 |
sam |
correct comparison for null ptr
Noticed by: Coverity Prevent analysis tool
|
#
141660 |
|
10-Feb-2005 |
sam |
rev 1.19 fixed wpa supplicant but broke wpa authenticator; when operating as an authenticator need to always check for the unicast key in the node (as was the case before)
Submitted by: Divy Le Ray
|
#
141210 |
|
03-Feb-2005 |
sam |
correct check for unicast key being setup; wpa_supplicant in particular uses only the global key state so looking in the per-node key slot is wrong
Submitted by: Tai-hwa Liang
|
#
140766 |
|
24-Jan-2005 |
sam |
update node reference count debug msgs to include the node address since the mac address may not be sufficient to uniquely identify a node
|
#
140764 |
|
24-Jan-2005 |
sam |
clear IEEE80211_F_WMEUPDATE when building the initial beacon frame so we don't do an update on the first beacon
|
#
140636 |
|
22-Jan-2005 |
sam |
handle potential stale values of bssid in neighbor nodes that can occur after an ibss merge
Submitted by: David Young
|
#
139530 |
|
31-Dec-2004 |
sam |
bump copyright for 2005
|
#
139527 |
|
31-Dec-2004 |
sam |
Relearn how WPA keying is supposed to work and fix WPA+WME while we're at it: o WPA/802.11i has a unicast key and a group key; in station mode everything is sent with the unicast key--we were consulting the destination mac address and incorrectly using the group key o (perpetuate fallback use of the default tx key to maintain compatibility with the way wpa_supplicant works) o correct EAPOL encryption logic to check unicast key instead of assuming other state implies this o move QoS encapsulation up to before enmic work so TKIP has the information required to calculate the pseudo-header o do not do QoS-encapsulation of EAPOL frames as some ap's do the wrong thing with such frames (may need to revisit this if ap's start dropping non-QoS frames from stations assoc'd with QoS) o move ieee80211_mbuf_adjust closer to its caller
|
#
138609 |
|
08-Dec-2004 |
sam |
fixup printf arguments for 64-bit machines
|
#
138568 |
|
08-Dec-2004 |
sam |
Update 802.11 support; too much new functionality to fully describe here but it includes completed 802.11g, WPA, 802.11i, 802.1x, WME/WMM, AP-side power-save, crypto plugin framework, authenticator plugin framework, and access control plugin frameowrk.
|
#
132712 |
|
27-Jul-2004 |
rwatson |
Add a new network interface flag, IFF_NEEDSGIANT, which will allow device drivers to declare that the ifp->if_start() method implemented by the driver requires Giant in order to operate correctly.
Add a 'struct task' to 'struct ifnet' that can be used to execute a deferred ifp->if_start() in the event that if_start needs to be called in a Giant-free environment. To do this, introduce if_start(), a wrapper function for ifp->if_start(). If the interface can run MPSAFE, it directly dispatches into the interface start routine. If it can't run MPSAFE, we're running with debug.mpsafenet != 0, and Giant isn't currently held, the task is queued to execute in a swi holding Giant via if_start_deferred().
Modify if_handoff() to use if_start() instead of direct dispatch. Modify 802.11 to use if_start() instead of direct dispatch.
This is intended to provide increased compatibility for non-MPSAFE network device drivers in the presence of Giant-free operation via asynchronous dispatch. However, this commit does not mark any network interfaces as IFF_NEEDSGIANT.
|
#
127772 |
|
02-Apr-2004 |
sam |
fix adhoc/ibss operation for drivers that require host support (e.g. ath):
o remove IEEE80211_C_RCVMGT capability o on transmit craft new nodes as needed using new ieee80211_find_txnode routine o add ieee80211_find_txnode routine to lookup a node by mac address and if not present create one when operating in ibss/ahdemo mode; new nodes are dup'd from bss and the driver is told to treat the node as if a new association has been created so driver-private state (e.g. rate control handling) is setup
Obtained from: netbsd (basic idea)
|
#
121180 |
|
17-Oct-2003 |
sam |
add statistics for all failures and/or abnormal events; still need to add per-node statistics
|
#
121178 |
|
17-Oct-2003 |
sam |
include FH/DS parameters element in probe response frames
|
#
121174 |
|
17-Oct-2003 |
sam |
o add capability to indicate if device receives all management frames o use recv mgmt capability to decide if outbound frames should be discarded if no node table entry is present
|
#
120070 |
|
14-Sep-2003 |
sam |
Honor the short preamble capability/state flag when calculating the capabilities for outbound management frames. But beware of sending this when operating on 5GHz channels; some 11a AP's reject association requests if this bit is set in the capabilities listed.
Obtained from: MADWIFI (with modifications)
|
#
119627 |
|
01-Sep-2003 |
sam |
o correct logic that checks frame size to decide if a cluaster is needed o add an assertion to check the max possible packet size
Noticed by: David Young <dyoung@pobox.com>
|
#
119150 |
|
19-Aug-2003 |
sam |
MFp4 changes to fix locking issues and correct reference count handling of station entries in hostap mode:
Input path:
o driver is now expected to find the node associated with the sender of a received frame; use ic_bss if none is located o driver passes the (referenced) node into ieee80211_input for use within the wlan module and is responsible for cleaning up on return o the antenna state is no longer passed up with each frame; this is now considered driver-private state and drivers are responsible for keeping it in the driver-private part of a node
Output path:
Revamp output path for management frames to eliminate redundant locking that causes problems and to correct reference counting bogosity that occurs when stations are timed out due to inactivity (in AP mode). On output the refcnt'd node is stashed in the pkthdr's recvif field (yech) and retrieved by the driver. This eliminates an unref/ref scenario and related node table unlock/lock due to the driver looking up the node. This is particularly important when stations are timed out as this causes a lock order reversal that can result in a deadlock. As a byproduct we also reduce the overhead for sending management frames (minimal). Additional fallout from this is a change to ieee80211_encap to return a refcn't node for tieing to the outbound frame. Node refcnts are not reclaimed until after a frame is completely processed (e.g. in the tx interrupt handler). This is especially important for timed out stations as this deref will be the final one causing the node entry to be reclaimed.
Additional semi-related changes: o replace m_copym use with m_copypacket (optimization) o add assert to verify ic_bss is never free'd during normal operation o add comments explaining calling conventions by drivers for frames going in each direction o remove extraneous code that "cannot be executed" (e.g. because pointers may never be null)
|
#
117817 |
|
21-Jul-2003 |
sam |
add monitor mode
|
#
116904 |
|
27-Jun-2003 |
sam |
revise copyright notices per discussion with Atsushi Onoe <onoe@sm.sony.co.jp>
|
#
116742 |
|
23-Jun-2003 |
sam |
new 802.11 layer:
o code reorg (relative to old netbsd-derived code) for future growth o drivers now specify available channels and rates and 802.11 layer handles almost all ifmedia actions o multi-mode support for 11a/b/g devices o 11g protocol additions (incomplete) o new element id additions (for other than 11g) o node/station table redone for proper locking and to eliminate driver incestuousness o split device flags and capabilities to reduce confusion and provide room for expansion o incomplete power management infrastructure (need to revisit) o incomplete hooks for software retry o more...
|