summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_ioctl.c
Commit message (Collapse)AuthorAgeFilesLines
* Add the ability to kick an existing mesh node without waiting for itadrian2012-01-111-0/+11
| | | | | | to time out. Submitted by: Monthadar Al Jaberi <monthadar@gmail.com>
* Fix some net80211 enum nits:bschmidt2011-12-171-2/+2
| | | | | | | | | | - ic_vap_create() uses an ieee80211_opmode argument - ieee80211_rate2media() takes an ieee80211_phymode argument - ieee80211_plcp2rate() takes an ieee80211_phytype argument - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warnings Submitted by: arundel@
* Add 802.11h quiet time element support into net80211.adrian2011-11-081-0/+33
| | | | | | | | | | | | 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
* Change i_len in ieee80211req to be unsigned and fix other signed/unsignedkevlo2011-06-161-5/+5
| | | | | | | issues. Reviewed by: bschmidt Obtained from: NetBSD
* Instead of always returning 0 to a scan request, indicate if there isbschmidt2011-01-301-4/+5
| | | | | | one running already. MFC after: 1 month
* Fix resource leaks in ieee80211_ioctl_setchanlist() in case of error.rpaulo2010-06-011-2/+6
| | | | | | Found with: Coverity Prevent(tm) CID: 4115 MFC after: 3 days
* Properly initialize stack variable sr in setmlme_assoc_adhoc().rpaulo2010-06-011-0/+1
| | | | | | Found with: Coverity Prevent(tm) CID 4365 MFC after: 3 days
* Add WPA-None support:bschmidt2010-04-101-60/+106
| | | | | | | | | | | | | | | | | | * WPA-None requires ap_scan=2: The major difference between ap_scan=1 (default) and 2 is, that no IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a dependency on those. For example the call to wpa_driver_bsd_scan() sets the interface UP, this never happens, therefore the interface must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID also is not called, which means that the SSID has not been set prior to the IEEE80211_MLME_ASSOC call. * WPA-None has no support for sequence number updates, it doesn't make sense to check for replay violations.. * I had some crashes right after the switch to RUN state, issue is that sc->sc_lastrs was not yet defined. Approved by: rpaulo (mentor) MFC after: 3 weeks
* While flushing the multicast filter of an interface, do not zero the relevantsyrinx2010-01-241-2/+5
| | | | | | | | | | ifmultiaddr structures' reference to the parent interface, unless the parent interface is really detaching. While here, program only link layer multicast filters to a wlan's hardware parent interface. PR: kern/142391, kern/142392 Reviewed by: sam, rpaolo, bms MFC after: 1 week
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on therpaulo2009-07-111-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* use negotiated short gi to calculate the tx rate; using the htcapssam2009-06-111-2/+2
| | | | does not take into account local state (e.g. manual disable of sgi)
* iv_flags_ext is full, make room by moving HT-related flags to a newsam2009-06-071-35/+35
| | | | iv_flags_ht word
* o station mode channel switch supportsam2009-06-041-2/+6
| | | | | | | | | | 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
* fix typosam2009-06-021-1/+1
|
* Remove hack used to deal with ifnet teardown now that if_detach and thesam2009-06-021-18/+3
| | | | | | | | | | | | | bridge do a better job. o move ether_ifdetach to the top of ieee80211_detach o do not clear if_softc at the top of ieee80211_detach; we no longer need this because we are safeguarded against calls coming back through if_ioctl o simplify the bpf tracker now that we don't null if_softc This also fixes an issue where having a bpf consumer active when a vap is destroyed would cause a crash because bpf referenced free'd memory. Reviewed by: imp
* Create a taskqueue for each wireless interface which provides a serialisedthompsa2009-05-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* add IEEE80211_FEXT_4ADDR to indicate ieee80211_encap should do 4-addresssam2009-04-261-1/+6
| | | | | encapsulation when relaying frames; this reduces the cost of the test and enables use for situations other than "sta vap + dwds"
* correct bssid reporting for wds vapssam2009-04-261-4/+7
|
* 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-39/+0
| | | | with a new IEEE80211_SUPPORT_SUPERG option
* add linker sets for get/set ioctl handlers so optional net80211sam2009-03-241-21/+50
| | | | code is isolated
* Add modes for 1/2 and 1/4-width channels so we have separate roamingsam2009-02-191-0/+2
| | | | | | | | | | | | | | | | | | 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 looseen abi dependencies on IEEE80211_MODE_MAX by accepting smallersam2009-02-191-49/+31
| | | | | | 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
* use c99 initializerssam2009-02-191-11/+11
|
* instead of special casing lookups for the 11na/g legacy rate set, justsam2009-02-191-2/+1
| | | | install the rates once when creating the com structure
* Add a ieee80211_waitfor_parent() function that will wait for all deferredthompsa2009-02-121-1/+1
| | | | | | | | 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
* add an assert to verify the number of channels returned by ic_getradiocapssam2009-01-281-0/+2
| | | | | | correlates with the size of the channel array passed down might want to promote this to be always present to catch for driver errors
* Remove assumptions about the max # channels in ioctl's:sam2009-01-271-24/+52
| | | | | | | | | 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
* change ic_getradiocaps driver callback to include the max # channelssam2009-01-271-1/+1
| | | | so callers know the size of the array passed down
* If the parent up/down task was queued then sync with it before returning fromthompsa2009-01-251-0/+3
| | | | | | | | | 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.
* add missing return that broke WPA1+2 supportsam2009-01-111-0/+1
| | | | Submitted by: "Jared Go" <jared@hobnob.com>
* TDMA support for long distance point-to-point links using ath devices:sam2009-01-081-1/+20
| | | | | | | | | | | | | | | 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
* convert MALLOC/FREE to malloc/freesam2008-12-181-12/+12
|
* Fix definition of IEEE80211_CHAN_MAX; it was defined as 255 butsam2008-12-151-16/+8
| | | | | | | 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
* change ieee80211_sta_join to take an explicit channel instead ofsam2008-10-251-1/+1
| | | | | 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-12/+15
| | | | Requested by: sam
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-15/+12
| | | | MFC after: 3 months
* RIFS support; needs driver callback for dynamic state changesam2008-09-221-0/+20
|
* MIMO power save support; still needs callbacks for notifying driverssam2008-09-211-0/+25
| | | | of dynamic state change in station mode.
* only return the negotiated ampdu density for sta modesam2008-09-061-1/+2
|
* Verify that the WPA flags set are actually compatible with theimp2008-08-091-4/+13
| | | | | | | driver's set of valid flags. Otherwise, wpa_supplicant wouldn't report an error for old wi cards that can't do WPA. Reviewed by: sam@
* Add a mac address to the key definition as otherwise we lose thesam2008-05-281-3/+5
| | | | | | | | | | address specified in the ioctl and for drivers that need the address to locate a key (e.g. for delete). Note this changes net80211-private api's but not the driver callback; may want to change that in the future. Reviewed by: sephe, thompsa
* we have a DFS capability now so enable checksam2008-05-111-3/+0
|
* Multi-bss (aka vap) support for 802.11 devices.sam2008-04-201-930/+1581
| | | | | | | | | | | 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)
* sync 11n support with vap code base; many changes based on interopsam2007-11-021-0/+32
| | | | | | testing with all major vendors MFC after: 1 week
* Fixup sta inactivity handling:sam2007-09-061-0/+9
| | | | | | | | | | | | o reset ni_inact when ni_inact_reload is changed so we're assured a valid setting o never let ni_inact go negative o add a knob to disable hostap sta idle handling (e.g. so it can be done by a user application) o remove bogus reload on associate Reviewed by: avatar Approved by: re (blanket wireless)
* Update 802.11 wireless support:sam2007-06-111-1050/+852
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* copyright updates:sam2007-06-061-7/+1
| | | | | | | o update to include 2007 o switch back to a 2-clause bsd-only license Reviewed by: onoe
* change ic_modecaps to a bit vector and use setbit, et. al.sam2007-03-111-1/+1
|
* keep tx/rx seq #'s for non-QoS traffic separate from QoS; stationssam2007-03-111-2/+2
| | | | | | | aren't supposed mix traffic but if they did frames might be mis-handled Obtained from: Atheros MFC after: 2 weeks
OpenPOWER on IntegriCloud