summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo. No functional change.rpaulo2010-04-281-1/+1
| | | | Obtained from: DragonFlyBSD
* net80211 rate control framework (net80211 ratectl).rpaulo2010-04-071-0/+2
| | | | | | | | | | | | | | | | | This framework allows drivers to abstract the rate control algorithm and just feed the framework with the usable parameters. The rate control framework will now deal with passing the parameters to the selected algorithm. Right now we have AMRR (the default) and RSSADAPT but there's no way to select one with ifconfig, yet. The objective is to have more rate control algorithms in the net80211 stack so all drivers[0] can use it. Ideally, we'll have the well-known sample rate control algorithm in the net80211 at some point so all drivers can use it (not just ath). [0] all drivers that do rate control in software, that is. Reviewed by: bschmidt, thompsa, weyongo MFC after: 1 months
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on therpaulo2009-07-111-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add ieee80211_ageq; a facility for staging packets that requiresam2009-07-051-8/+11
| | | | | | | | | | | | | | | | | | | long-term work before they can be serviced. Packets are tagged and assigned an age (in seconds) at the point they are added to the queue. If a packet is not retrieved before it's age expires it is reclaimed. Tagging can take two forms: a reference to an ieee80211_node (as happens in the tx path) or an opaque token in cases where there is no reference or the node structure is not stable (i.e. it's going to be destroyed). o add ic_stageq to replace the per-node wds staging queue used for dynamic wds o add ieee80211_mac_hash for building ageq tokens; this computes a 32-bit hash from an 802.11 mac address (copied from the bridge) o while here fix a stray ';' noticed in IEEE80211_PSQ_INIT Reviewed by: rpaulo Approved by: re (kensmith)
* When associating to an AP we don't know if HT is negotiated untilsam2009-06-111-6/+6
| | | | | | we receive the AssocResp, so we can only set ni_txparms properly at that point. To make this possible make node_setuptxparms public as ieee80211_node_setuptxparms.
* iv_flags_ext is full, make room by moving HT-related flags to a newsam2009-06-071-4/+4
| | | | iv_flags_ht word
* Overhaul monitor mode handling:sam2009-05-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* correct handling of ctl frames: the sender's address is always i_addr2 forsam2009-05-141-12/+0
| | | | | | | frames we should expect to process (old code was trying to handle frames we should never see--like ACK) Reviewed by: thompsa, cbzimmer
* Create a taskqueue for each wireless interface which provides a serialisedthompsa2009-05-021-3/+15
| | | | | | | | | | | | | | | | | | | | | | | sleepable context for net80211 driver callbacks. This removes the need for USB and firmware based drivers to roll their own code to defer the chip programming for state changes, scan requests, channel changes and mcast/promisc updates. When a driver callback completes the hardware state is now guaranteed to have been updated and is in sync with net80211 layer. This nukes around 1300 lines of code from the wireless device drivers making them more readable and less race prone. The net80211 layer has been updated as follows - all state/channel changes are serialised on the taskqueue. - ieee80211_new_state() always queues and can now be called from any context - scanning runs from a single taskq function and executes to completion. driver callbacks are synchronous so the channel, phy mode and rx filters are guaranteed to be set in hardware before probe request frames are transmitted. Help and contributions from Sam Leffler. Reviewed by: sam
* fix txparms setup for 108G sta's: ieee80211_iserp_rateset does notsam2009-04-131-2/+3
| | | | | | 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
* Hoist 802.11 encapsulation up into net80211:sam2009-03-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* o add ic_rt to track the rate table for the current channel; this enablessam2009-03-291-0/+2
| | | | | calculation of packet transmit times to do things like check txop limits o remove equivalent driver code and convert to use net80211 state
* split Atheros SuperG support out into it's own file that's included onlysam2009-03-241-0/+13
| | | | with a new IEEE80211_SUPPORT_SUPERG option
* mark nodes created by way of neighbor discovery need to be marked as ERPsam2009-02-201-0/+4
| | | | so they get the correct tx parameters setup by node_settxparms
* Add modes for 1/2 and 1/4-width channels so we have separate roamingsam2009-02-191-0/+4
| | | | | | | | | | | | | | | | | | 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.
* o replace ieee80211_node_reclaim by individual operations to release thesam2009-02-121-60/+2
| | | | | | | | | | 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
* improve key index map reclaim debug msgsam2009-02-111-6/+5
|
* set ni_txparms for static turbo modesam2009-01-291-6/+11
|
* TDMA support for long distance point-to-point links using ath devices:sam2009-01-081-1/+15
| | | | | | | | | | | | | | | 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
* only mark an infrastructure node to require an associd for xmit; fixes adhocsam2009-01-071-1/+4
| | | | mode sta's that join an existing ibss
* mark discovered neighbors QoS capable if they advertise wmesam2008-12-311-0/+4
|
* convert MALLOC/FREE to malloc/freesam2008-12-181-10/+10
|
* Fix ucastkey teardown for drivers that plumb clear keys or similarsam2008-12-151-1/+1
| | | | | | | | | | (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
* Replace adhoc checks in ieee80211_start with a per-node flag thatsam2008-12-151-13/+5
| | | | | | | | 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
* o re-enable a lock assertsam2008-10-261-5/+5
| | | | o while here reformat a comment to sync w/ other repot's
* New ap-side power save implementation; the main change is to allow driverssam2008-10-261-7/+6
| | | | | to queue frames previously encapsulated on a separate high priority list that is dispatched before the unencapsulated frames (to preserve order).
* set erp flag and tx parameter state when joining a bss; this allowssam2008-10-251-0/+3
| | | | drivers to use ni_txparms
* improve inactivity handling debug supportsam2008-10-251-5/+29
|
* change ieee80211_sta_join to take an explicit channel instead ofsam2008-10-251-2/+2
| | | | | using the value in the scan parameters; this will be used to fix issues with 11b operation
* Revert the removal of the MALLOC and FREE macros from the net80211 code.des2008-10-231-10/+12
| | | | Requested by: sam
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-12/+10
| | | | MFC after: 3 months
* cleanup bss node setup; syncs w/ p4 state that's been in use for monthssam2008-09-221-8/+10
|
* RIFS support; needs driver callback for dynamic state changesam2008-09-221-1/+2
|
* MIMO power save support; still needs callbacks for notifying driverssam2008-09-211-1/+3
| | | | of dynamic state change in station mode.
* Add current transmit parameters for fixed rate handling so driverssam2008-09-211-0/+45
| | | | | | | | | | | don't duplicate this. These are setup according to the role of the node--the bss node for ap and adhoc modes need to use parameters that are the least common denomimator of all nodes in the bss; otherwise we are setting up params for a station joining a bss and we select those according to the capabilities of the station. This stuff needs more work as we do extra work due to having setup in common code paths shared by nodes using both roles.
* make all checks if ni_chw consistentsam2008-09-061-1/+1
|
* Change the calling convention for ic_node_alloc to deal withsam2008-06-071-4/+5
| | | | | | | | | | | | some longstanding issues: o pass the vap since it's now the "coin of the realm" and required to do things like set initial tx parameters in private node state for use prior to association o pass the mac address as cards that maintain outboard station tables require this to create an entry (e.g. in ibss mode) o remove the node table reference, we only have one node table and it's unlikely this will change so this is not needed to find the com structure
* Split ieee80211_notify_erp into locked and unlocked variantssam2008-06-071-4/+12
| | | | | | | and use the locked version to handle the hostap input path case where the com lock is not already held. Noticed by: Jared Go
* Fix node cleanup issues when the last reference is held bysam2008-06-071-16/+27
| | | | | the driver (e.g. in the tx q); ni_vap may not be valid, we must carefully check before using it.
* correct code returned in AsssocResp; the previous code is spec'd for usesam2008-06-071-2/+1
| | | | | | | only in deauth+disassoc frames Submitted by: Chris Zimmermann MFC after: 1 month
* Don't override the txpower cap installed by ieee80211_alloc_node;sam2008-05-281-3/+0
| | | | we use ic_txpowlimit (for now) to initialize all new sta entries.
* special-case broadcast probe request in ieee80211_find_rxnode; we needsam2008-05-221-16/+30
| | | | | | | | to spam all vaps and this won't happen if the frame comes from a station that is associated to an ap vap (and so has an entry in the table) Noticed by: Jared Go Reviewed by: thompsa
* fix build w/ IEEE80211_DEBUG_REFCNT enabledsam2008-05-011-1/+1
|
* Multi-bss (aka vap) support for 802.11 devices.sam2008-04-201-605/+1000
| | | | | | | | | | | 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)
* o correct re-association indicator dispatched in node join eventsam2007-11-231-3/+3
| | | | | | o remove misleading "reassociation" msg on sta join MFC after: 3 days
* parse htcap ie early so ampdu density and max rx size are availablesam2007-11-231-1/+3
| | | | | | for constructing the AssocReq frame MFC after: 3 days
* sync 11n support with vap code base; many changes based on interopsam2007-11-021-14/+40
| | | | | | testing with all major vendors MFC after: 1 week
* Close longstanding race dropping inactive stations; grab a referencesam2007-09-181-0/+2
| | | | | | | | to the node before starting the work, otherwise the node may go away before a reference is made in ieee80211_send_mgmt. Approved by: re (blanket wireless) Obtained from: Atheros
* Safeguard count of stations in power save; don't touch it unless we'resam2007-09-181-1/+2
| | | | | | | operating in a mode where it should be maintained. Approved by: re (blanket wireless) MFC after: 2 weeks
OpenPOWER on IntegriCloud