summaryrefslogtreecommitdiffstats
path: root/sys/net80211
Commit message (Collapse)AuthorAgeFilesLines
* Correct the ordering of tid/crypto ic_name.adrian2012-03-271-1/+1
| | | | | | | | | Because the code lacks all the GNU extensions to printf() format stuff, the compiler doesn't helpfully tell us that I messed up in a previous commit. Pointy hat to: adrian, who likely only cares about this because he's the only one who bothers flipping on net80211 debugging.
* Create a new task to handle 802.11n channel width changes.adrian2012-03-258-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a channel width change updates the 802.11n HT info data in net80211 but it doesn't trigger any device changes. So the device driver may decide that HT40 frames can be transmitted but the last device channel set only had HT20 set. Now, a task is scheduled so a hardware reset or change isn't done during any active ongoing RX. It also means that it's serialised with the other task operations (eg channel change.) This isn't the final incantation of this work, see below. For now, any unmodified drivers will simply receive a channel change log entry. A subsequent patch to ath(4) will introduce some basic channel change handling (by resetting the NIC.) Other NICs may need to update their rate control information. TODO: * There's still a small window at the present moment where the channel width has been updated but the task hasn't been fired. The final version of this should likely pass in a channel width field to the driver and let the driver atomically do whatever it needs to before changing the channel. PR: kern/166286
* Re-commit this - store the alq payload in network order.adrian2012-03-211-1/+1
|
* .. revert out a local change that I hadn't yet completely finished fleshingadrian2012-03-181-124/+1
| | | | | | out and testing. sorry!
* Add a missing endian conversion.adrian2012-03-181-1/+124
|
* Pull in a dependency on ALQ if it's compiled with IEEE80211_ALQ.adrian2012-03-161-0/+4
|
* Add missing \n's.adrian2012-03-081-2/+2
| | | | | This showed up when testing the wtap module, as it attaches with no radiotap tx/rx configuration.
* Modify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios.adrian2012-03-063-69/+305
| | | | | | | | | | | | | | | * 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
* Oops - used the wrong field.adrian2012-03-051-1/+1
| | | | Noticed by: nwhitehorn
* Add the thread id to the net80211 alq records.adrian2012-03-042-1/+4
| | | | This will (hopefully) aid in debugging concurrency related issues.
* Fix style(9) issues.adrian2012-03-041-10/+12
|
* Fix build w/o 'options IEEE80211_SUPPORT_MESH'.glebius2012-03-041-0/+2
|
* * Introduce new flag for QoS control field;adrian2012-03-043-28/+88
| | | | | | | | | | | | * 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-046-131/+146
| | | | | | | | | | | | | | | | | * 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
* Attempt to catch scan cancellations at exactly the wrong time from occuring.adrian2012-03-021-0/+13
| | | | | | | | | | | | | | | | | | | The scan code unlocks the comlock and calls into the driver. It then assumes the state hasn't changed from underneath it. Although I haven't seen this particular condition trigger, I'd like to be informed if I or anyone else sees it. What I'm thinking may occur: * A cancellation comes in during the scan_end call; * the cancel flag is set; * but it's never checked, so scandone isn't updated; * .. and the interface stays in the STA power save mode. It's a subtle race, if it even exists. PR: kern/163318
* Only increment is_beacon_bad if we're not scanning.adrian2012-02-281-1/+2
| | | | | Otherwise things such as off-channel probe responses and beacons are also silently discarded and logged against this error counter.
* Print out the bogus beacon interval.adrian2012-02-281-1/+2
|
* Track the number of bad beacons received.adrian2012-02-282-2/+5
| | | | PR: kern/165517
* Hold IF_LOCK when manipulating the interface flags.adrian2012-02-241-1/+6
| | | | | | 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.
* Although it's documented that the vap newstate call can drop theadrian2012-02-241-0/+6
| | | | | | | | comlock, I'd like to find and analyse these cases to see if they really are valid. So, throw in a lock here and wait for the (hopefully!) inevitable complaints.
* Add a radiotap vendor header definition.adrian2012-02-241-0/+6
|
* Remove redundant forward declaration of struct ieee80211com.ray2012-02-201-2/+0
| | | | Approved by: bschmidt
* Correct the 802.11s mesh configuration structure and related tidbits.adrian2012-02-132-20/+53
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Update the 802.11s IE numbers to represent the latest 802.11 amendment standard.adrian2012-02-081-20/+25
| | | | | Submitted by: monthadar@gmail.com Reviewed by: rpaulo
* Update the mesh reason codes to match the latest 802.11s specification.adrian2012-02-061-13/+15
| | | | | Submitted by: <monthadar@gmail.com> Reviewed by: rpaulo
* Whitespace removal.rpaulo2012-02-031-12/+12
|
* Add a DFS debugging mode which is useful when doing automated DFSadrian2012-01-312-16/+72
| | | | | | | | | | | | | | | | | | | | compliance testing. In order to allow for radar pattern matching to occur, the DFS CAC/NOL handling needs to be made configurable. This commit introduces a new sysctl, "net.wlan.dfs_debug", which controls which DFS debug mode net80211 is in. * 0 = default, CSA/NOL handling as per normal. * 1 = announce a CSA, but don't add the channel to the non-occupy list (NOL.) * 2 = disable both CSA and NOL - only print that a radar event occured. This code is not compiled/enabled by default as it breaks regulatory handling. A user must enable IEEE80211_DFS_DEBUG in their kernel configuration file for this option to become available. Obtained from: Atheros
* Missing code for receiving MESH PREP that should be part of r230409.adrian2012-01-291-6/+15
| | | | Submitted by: <monthadar@gmail.com>
* Mark the taskqueue as the _net80211_ taskqueue.adrian2012-01-221-1/+1
| | | | | | This makes it much easier to determine whether an event occurs in the net80211 taskqueue (which was called "ath0 taskq") or the ath driver taskqueue (which is also called "ath0 taskq".)
* Fix the hwmp code to handle nodes in a "line" topology.adrian2012-01-211-39/+99
| | | | | | | | | | For example, this particular topology didn't work correctly from all nodes: [A] - [B] - [C] - [D] Submitted by: Monthadar Al Jaberi <monthadar@gmail.com> Reviewed by: bschmidt, adrian
* Change the hwmp debugging to use %6D rather than ether_sprintf().adrian2012-01-211-35/+36
| | | | | | | | This allows for multiple MAC addresses to be printed on the same debugging line. ether_sprintf() uses a static char buffer and thus isn't very useful here. Submitted by: Monthadar Al Jaberi <monthadar@gmail.com>
* Fix the situation where net80211 is built with IEEE80211_SUPPORT_TDMA but a ↵adrian2012-01-151-0/+4
| | | | | | | | | | | | | | module is used. Although the module _builds_, it fails to load because of a missing symbol from ieee80211_tdma.c. Specifics: * Always build ieee80211_tdma.c in the module; * only compile in the code if IEEE80211_SUPPORT_TDMA is defined.
* 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>
* Add the MCS radiotype entry.adrian2012-01-112-0/+5
|
* Add in the vendor extension bit in the radiotap header.adrian2012-01-101-0/+1
|
* Correct comment for the IPv6 case to say "traffic class" not "TOS"bz2012-01-071-1/+1
| | | | | | as pointed out back in 2009. MFC after: 3 days
* MCS32 equals 32, not 8*ic_txstream.bschmidt2012-01-021-1/+1
|
* Remove now redundant mac argument.bschmidt2011-12-174-14/+8
| | | | Discussed with: adrian@
* Fix some net80211 enum nits:bschmidt2011-12-174-15/+21
| | | | | | | | | | - 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@
* Modify the ACL code slightly to support a few nifty things:adrian2011-12-154-4/+17
| | | | | | | | | | | | | * 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.
* .. add missing include from an incorrect merge.adrian2011-11-081-0/+2
| | | | Sponsored by: Hobnob, Inc.
* Reject frames in STA mode which are not destined to the local STA address.adrian2011-11-081-0/+24
| | | | | | | | | | | | | | | | | Some hardware (eg the AR9160 in STA mode) seems to "leak" unicast FROMDS frames which aren't destined to itself. This angers the net80211 stack - the existing code would fail to find an address in the node table and try passing the frame up to each vap BSS. It would then be accepted in the input routine and its contents would update the local crypto and sequence number state. If the sequence number / crypto IV replay counters from the leaked frame were greater than the "real" state, subsequent "real" frames would be rejected due to out of sequence / IV replay conditions. This is also likely helpful if/when multi-STA modes are added to net80211. Sponsored by: Hobnob, Inc.
* Add 802.11h quiet time element support into net80211.adrian2011-11-0810-2/+131
| | | | | | | | | | | | 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
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-072-2/+2
| | | | | | 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.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-074-4/+4
| | | | This means that their use is restricted to a single C file.
* Include the tid when printing out crypto replay errors.adrian2011-10-281-2/+2
| | | | | | I found this useful when trying to debug the AR9160 STA RX filter issue - I'd get crypto reply errors but it wasn't entirely clear which TID it was for.
* Fix an unused variable warning/error when invariants isn't enabled.adrian2011-10-121-2/+1
| | | | Reported by: bz
* Fix a panic in the wifi stack when a software beacon miss occurs in the ↵adrian2011-10-023-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | wrong state. The ieee80211_swbmiss() callout is not called with the ic lock held, so it's quite possible the scheduler will run the callout during a state change. This patch: * changes the swbmiss callout to be locked by the ic lock * enforces the ic lock being held across the beacon vap functions by grabbing it inside beacon_miss() and beacon_swmiss(). This ensures that the ic lock is held (and thus the VAP state stays constant) during beacon miss and software miss processing. Since the callout is removed whilst the ic lock is held, it also ensures that the ic lock can't be called during a state change or exhibit any race conditions seen above. Both Edgar and Joel report that this patch fixes the crash and doesn't introduce new issues. Reported by: Edgar Martinez <emartinez@kbcnetworks.com> Reported by: Joel Dahl <joel@vnode.se> Reported by: emaste
* This patch fixes beacon frame sequence number generation. The codeadrian2011-08-241-0/+8
| | | | | | | | | | | 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)
* Correctly handle BAR TX failures.adrian2011-08-191-1/+5
| | | | | | | | On a TX failure, ic_raw_xmit will still call ieee80211_node_free(). There's no need to call it here. Submitted by: moonlightakkiy@yahoo.ca Approved by: re (kib)
OpenPOWER on IntegriCloud