summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_mesh.c
Commit message (Collapse)AuthorAgeFilesLines
* Modify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios.adrian2012-03-061-0/+4
| | | | | | | | | | | | | | | * Added verify_mesh_*_len functions that verify the length according to the amendment spec and return number of destination addresses for allocation of appropriate struct size in memory; * Modified hwmp_recv_action_meshpath to allocate HWMP ie instead of storing them on the stack and store all available field according the flags; * Modify hwmp_add_mesh* to work with all cases of HWMP according to amendment. * Modify hwmp_send_* to calculate correct len of bytes for the HWMP ie. * Added new M_80211_MESH_* malloc defines. * Added macros with magic numbers for HWMP ie sizes according to amendment. * Added the external address to all HWMP ie structs. Submitted by: monthadar@gmail.com
* * Introduce new flag for QoS control field;adrian2012-03-041-25/+60
| | | | | | | | | | | | * 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
* * Added IEEE80211_ACTION_CAT_MESH in ieee80211.h as specified amendment spec;adrian2012-03-041-77/+38
| | | | | | | | | | | | | | | | | * Moved old categories as specified by D4.0 to be action fields of MESH category as specified in amendment spec; * Modified functions to use MESH category and its action fields: + ieee80211_send_action_register + ieee80211_send_action + ieee80211_recv_action_register +ieee80211_recv_action; * Modified ieee80211_hwmp_init and hwmp_send_action so they uses correct action fields as specified in amendment spec; * Modified ieee80211_parse_action so that it verifies MESH frames. * Change Mesh Link Metric to use one information element as amendment spec. Draft 4.0 defined two different information elements for request and response. Submitted by: monthadar@gmail.com
* Correct the 802.11s mesh configuration structure and related tidbits.adrian2012-02-131-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Change the mesh IE size to be IEEE80211_MESH_CONF_SZ rather than the size of the structure; * conf_cap is now a uint8_t rather than a uint16_t (uint16_t in D3.0, uint8_t in the amendment spec); * Update mesh config capability bits - earlier bits were from draft X, current is amendment spec; * Update the following to be an enum rather than #define and added a VENDOR entry too from the amendment spec; IEEE80211_MESHCONF_PATH_* IEEE80211_MESHCONF_METRIC_* IEEE80211_MESHCONF_CC_* IEEE80211_MESHCONF_SYNC_* IEEE80211_MESHCONF_AUTH_* * Kept IEEE80211_MESHCONF_FORM_* and IEEE80211_MESHCONF_CAP_* as defines because they are defined in a way that we need to mask in/out information; * In IEEE80211_MESHCONF_CAP_* IEEE80211_MESHCONF_CAP_TBTTA is removed and 0x80 is made reserved as defined in the amendment spec. Submitted by: monthadar@gmail.com Reviewed by: rpaulo
* Whitespace removal.rpaulo2012-02-031-12/+12
|
* Remove now redundant mac argument.bschmidt2011-12-171-4/+2
| | | | Discussed with: adrian@
* Modify the ACL code slightly to support a few nifty things:adrian2011-12-151-2/+3
| | | | | | | | | | | | | * Call it before sending probe responses, so the ACL code has the chance to reject sending them. * Pass the whole frame to the ACL code now, rather than just the destination MAC - that way the ACL module can look at the frame contents to determine what the response should be. This is part of some uncommitted work to support band steering. Sponsored by: Hobnob, Inc.
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Fix some corner cases in the net80211 sequence number retransmissionadrian2011-05-041-4/+1
| | | | | | | | | | | | | | | | | | | | | | | handling. The current sequence number code does a few things incorrectly: * It didn't try eliminating duplications from HT nodes. I guess it's assumed that out of order / retransmission handling would be handled by the AMPDU RX routines. If a HT node isn't doing AMPDU RX, then retransmissions need to be eliminated. Since most of my debugging is based on this (as AMPDU TX software packet aggregation isn't yet handled), handle this corner case. * When a sequence number of 4095 was received, any subsequent sequence number is going to be (by definition) less than 4095. So if the following sequence number (0) doesn't initially occur and the retransmit is received, it's incorrectly eliminated by the IEEE80211_FC1_RETRY && SEQ_LEQ() check. Try to handle this better. This almost completely eliminates out of order TCP statistics showing up during iperf testing for the 11a, 11g and non-aggregate 11n AMPDU RX case. The only other packet loss conditions leading to this are due to baseband resets or heavy interference.
* Make sure to only accept and handle action frames which are for us. Inbschmidt2011-02-221-20/+8
| | | | | promiscuous mode we might receive stuff which otherwise gets filtered by hardware.
* Add a new mgmt subtype "ACTION NO ACK" defined in 802.11n-2009, while herebschmidt2011-02-211-11/+19
| | | | | | | | | clean up parts of the *_recv_mgmt() functions. - make sure appropriate counters are bumped and debug messages are printed - order the unhandled subtypes by value and add a few missing ones - fix some whitespace nits - remove duplicate code in adhoc_recv_mgmt() - remove a useless comment, probably left in while c&p
* Jump to the next element and not to an arbitrary point. frm[1] containsbschmidt2011-01-191-1/+1
| | | | | | | the element's data length, frm[2] is the first byte of the element's data. Submitted by: Monthadar Al Jaberi <monthadar at gmail.com> MFC after: 1 week
* Fix a couple of bugs with 802.11n:rpaulo2010-03-181-0/+13
| | | | | | | | | | | o Process the BAR frame on the adhoc, mesh and sta modes o Fix the format of the ADDBA reply frame o Fix references to the spec section numbers Also, print the all the MCS rates in bootverbose. Sponsored by: iXsystems, Inc. Obtained from: //depot/user/rpaulo/80211n/...
* Avoid a null pointer deref when parsing the meshid.rpaulo2010-02-031-3/+4
| | | | Found with: clang static analyzer
* Fix bugs introduced in previous commit: off-by-one in add_meshconf() andrpaulo2010-01-141-2/+4
| | | | big-endian bug on verify_meshconf()
* Update mesh code to to D4.0.rpaulo2010-01-121-3/+5
|
* Don't call the newstate callback as that's dangerous. Rely no ENETRESETrpaulo2009-10-211-4/+0
| | | | | | to DTRT. MFC after: 3 days
* Implement the missing support for updating the mesh conf number ofrpaulo2009-10-191-0/+14
| | | | | | neighbors via ieee80211_beacon_notify(). MFC after: 3 days
* Properly initialize the mesh conf capabilities byte.rpaulo2009-10-131-0/+1
| | | | MFC after: 2 days
* Fix a wrong initialization that snuck in the latest commit.rpaulo2009-10-121-1/+1
| | | | MFC after: 3 days
* Another 3.03 draft bit that I missed in the previous 802.11s stackrpaulo2009-10-121-49/+30
| | | | | | | update. The Mesh Configuration IE has changed quite a bit. Refactor the code to handle this change. MFC after: 3 days
* Update 802.11s mesh support to draft 3.03. This includes a revised framerpaulo2009-09-221-74/+38
| | | | | | | | format for peering and changes to the PERR frames. Note that this is incompatible with the previous code. Reviewed by: sam MFC after: 1 week
* Mesh fixes, namely:rpaulo2009-07-271-6/+27
| | | | | | | | | | | | * 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)
* store mesh timers as ticks and sysctls for changing the defaultssam2009-07-211-12/+4
| | | | | Reviewed by: rpaulo Approved by: re (kib)
* More mesh bits, namely:rpaulo2009-07-201-54/+302
| | | | | | | | | | | | | | * 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)
* 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-111-0/+2538
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
OpenPOWER on IntegriCloud