summaryrefslogtreecommitdiffstats
path: root/sys/net80211
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typo in ifdef mesh support. This would make mesh unworkable ifrpaulo2009-08-171-1/+1
| | | | | | TDMA support was compiled out. Approved by: re (kib)
* Drain link state event changes posted during vap destroy. This is asam2009-08-121-1/+3
| | | | | | | | | | band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Spotted by: thompsa Reviewed by: rwatson Approved by: re (rwatson)
* Merge the remainder of kern_vimage.c and vimage.h into vnet.c andrwatson2009-08-012-2/+1
| | | | | | | | | | vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket)
* fix misplaced #endif that caused tdma handling to be merged with ESS handlingsam2009-07-311-1/+1
| | | | | | (causing tdma scanning to break) Approved by: re (kib)
* Filter setting IFF_PROMISC on tdma vaps; we don't want the underyling devicesam2009-07-311-1/+2
| | | | | | to be in promiscuous mode as we have a h/w bssid. Approved by: re (kib)
* Mesh fixes, namely:rpaulo2009-07-274-80/+141
| | | | | | | | | | | | * don't clobber proxy entries * HWMP seq number processing, including discard of old frames * flush routing table entries based on nexthop * print route flags in ifconfig * more debugging messages and comments Proxy changes submitted by sam. Approved by: re (kib)
* revert OACTIVE part of r195845; instead fix the comment so it does not refersam2009-07-241-1/+13
| | | | | | to the old hack removed in r193312 Approved by: re (implicit)
* correct handling of IFF_PROMISC; this should not be pushed to the parentsam2009-07-241-1/+2
| | | | | | | device except for monitor and ahdemo mode vaps Reviewed by: rpaulo Approved by: re (kensmith)
* monitor mode vaps are meant to be read-only so they can operate on anysam2009-07-241-5/+18
| | | | | | | | frequency w/o regulatory issues, do this by hooking if_transmit and if_output with routines that discard all transmits Reviewed by: thompsa, cbzimmer (intent) Approved by: re (kensmith)
* o kill old code no longer needed after r193312sam2009-07-241-14/+3
| | | | | | o count output packets+errors for frames sent through ieee80211_output Approved by: re (kensmith)
* store mesh timers as ticks and sysctls for changing the defaultssam2009-07-213-39/+43
| | | | | Reviewed by: rpaulo Approved by: re (kib)
* Correct handling of keys that already have a hardware/device key index:sam2009-07-212-6/+8
| | | | | | | | | | | | this was broken in r183248 when the check of wk_keyix was replaced by a check of IEEE80211_KEY_DEVKEY (because the flag was clobbered). Define IEEE80211_KEY_DEVICE to specify flags that are owned by net80211/driver and use this to preserve IEEE80211_KEY_DEVKEY so we don't ask the driver for another key index when we already have one. Testing by: Daniel Thiele, Wes Morgan Reviewed by: rpaulo Approved by: re (kib)
* More mesh bits, namely:rpaulo2009-07-206-137/+453
| | | | | | | | | | | | | | * 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)
* Move code that does payload realigment to a new routine, ieee80211_realign,sam2009-07-184-48/+44
| | | | | | | so it can be reused. While here rewrite the logic to always use a single mbuf. Reviewed by: rpaulo Approved by: re (kib)
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorrwatson2009-07-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables. Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker. Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided. This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS. Bump __FreeBSD_version and update UPDATING. Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith)
* Fix inline function declaration and prototype.rpaulo2009-07-131-5/+4
| | | | Approved by: re (kensmith)
* Implementation of the upcoming Wireless Mesh standard, 802.11s, on therpaulo2009-07-1121-123/+5191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* mark struct ieee80211req_maclist packed so sizeof works as intended on arm;sam2009-07-101-1/+1
| | | | | | fixes "list mac" Approved by: re (kensmith)
* correctly set the tailq ptr when removing the last item in the qsam2009-07-101-1/+2
| | | | Approved by: re (kensmith)
* Add ieee80211_ageq; a facility for staging packets that requiresam2009-07-058-140/+391
| | | | | | | | | | | | | | | | | | | 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)
* Revamp 802.11 action frame handling:sam2009-07-059-354/+716
| | | | | | | | | | | | | | o add a new facility for components to register send+recv handlers o ieee80211_send_action and ieee80211_recv_action now use the registered handlers to dispatch operations o rev ieee80211_send_action api to enable passing arbitrary data o rev ieee80211_recv_action api to pass the 802.11 frame header as it may be difficult to locate o update existing IEEE80211_ACTION_CAT_BA and IEEE80211_ACTION_CAT_HT handling o update mwl for api rev Reviewed by: rpaulo Approved by: re (kensmith)
* Modify most routines returning 'struct ifaddr *' to return referencesrwatson2009-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than pointers, requiring callers to properly dispose of those references. The following routines now return references: ifaddr_byindex ifa_ifwithaddr ifa_ifwithbroadaddr ifa_ifwithdstaddr ifa_ifwithnet ifaof_ifpforaddr ifa_ifwithroute ifa_ifwithroute_fib rt_getifa rt_getifa_fib IFP_TO_IA ip_rtaddr in6_ifawithifp in6ifa_ifpforlinklocal in6ifa_ifpwithaddr in6_ifadd carp_iamatch6 ip6_getdstifaddr Remove unused macro which didn't have required referencing: IFP_TO_IA6 This closes many small races in which changes to interface or address lists while an ifaddr was in use could lead to use of freed memory (etc). In a few cases, add missing if_addr_list locking required to safely acquire references. Because of a lack of deep copying support, we accept a race in which an in6_ifaddr pointed to by mbuf tags and extracted with ip6_getdstifaddr() doesn't hold a reference while in transmit. Once we have mbuf tag deep copy support, this can be fixed. Reviewed by: bz Obtained from: Apple, Inc. (portions) MFC after: 6 weeks (portions)
* After cleaning up rt_tables from vnet.h and cleaning up opt_route.hbz2009-06-231-1/+0
| | | | | a lot of files no longer need route.h either. Garbage collect them. While here remove now unneeded vnet.h #includes as well.
* ieee80211_dwds_mcast(): check the correct mbuf ptr after encap.rpaulo2009-06-181-1/+1
|
* Rev IEEE80211_IOC_STA_INFO abi: ni_flags grew from 16 bits to 32sam2009-06-131-1/+2
| | | | | | | | bits but isi_state did not follow; expand it to 32 bits and pad to maintain alignment. Note this is an incompatible change that requires rebuilding of user applications. Submitted by: rpaulo, cbzimmer, avatar
* make implicit pad visiblesam2009-06-111-0/+1
|
* 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)
* When associating to an AP we don't know if HT is negotiated untilsam2009-06-113-6/+8
| | | | | | 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.
* protect callouts with the com locksam2009-06-091-5/+7
| | | | Prodded by: jhb
* add missing calls to ieee80211_dfs_attach/detachsam2009-06-091-0/+2
|
* Correct ieee80211_gettid:sam2009-06-094-9/+12
| | | | | | | | | | o don't increment extracted tid, this was a vestige of IEEE80211_NONQOS_TID being defined as 0 (w/ real tid's +1) o handle 4-address frames (add IEEE80211_IS_DSTODS to check if an 802.11 header is DSTODS) Submitted by: cbzimmer Reviewed by: avatar
* purge dead codesam2009-06-081-29/+0
|
* fix big-endian machinessam2009-06-081-4/+4
|
* After r193232 rt_tables in vnet.h are no longer indirectly dependent onbz2009-06-081-1/+0
| | | | | | | | | the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer depend on it for module builds. Remove the hidden include in flowtable.h as well and leave the two explicit #includes in ip_input.c and ip_output.c.
* do not strip M_MORE_DATA on packets coming through ieee80211_start;sam2009-06-081-3/+4
| | | | | | 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
* prefer callout_schedulesam2009-06-071-2/+1
|
* use c99-style initializerssam2009-06-071-7/+7
|
* teach ieee80211_classify about ipv6 packetssam2009-06-071-1/+23
| | | | Reviewed by: bz, rrs
* add iv_flags_ht and ic_flags_htsam2009-06-071-0/+2
|
* iv_flags_ext is full, make room by moving HT-related flags to a newsam2009-06-0711-116/+166
| | | | iv_flags_ht word
* o add bits for STBC and Greenfieldsam2009-06-061-5/+8
| | | | o fix some comments
* reserve node flag bits for a-msdu tx/rxsam2009-06-051-3/+7
|
* reserve ioc's for Greenfield and STBCsam2009-06-051-0/+2
|
* correct status code returned for ht capability mismatch on assoc/reassocsam2009-06-051-1/+1
|
* o correct/add action frame categoriessam2009-06-051-1/+5
| | | | o add IEEE80211_STATUS_MISSING_HT_CAPS, added in 11n D3.0 spec
* add tid param to ieee80211_notify_replay_failure to get the correct rscsam2009-06-054-6/+6
|
* Fix spelling of MAC check for 8.x version of MAC Framework, not noticed duerwatson2009-06-051-1/+3
| | | | | | | 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
* o station mode channel switch supportsam2009-06-049-22/+207
| | | | | | | | | | 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
* When a channel switch is done to a channel with different operatingsam2009-06-031-0/+34
| | | | | | | | characteristics force the stations to re-associate so protocol state is re-initialized. Note that for 11h/DFS this is irrelevant as channel changes are never cross-band. Reviewed by: ctlaw
* After a channel switch mark associated stations so they will immediatelysam2009-06-031-0/+18
| | | | | be probed as inactive; this more quickly weeds out stations that don't follow to the new channel.
OpenPOWER on IntegriCloud