summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_var.h
AgeCommit message (Collapse)Author
2010-07-19in hostap mode, notify drivers via a new callback when a STA leavesDamien Bergamini
the BSS. this is needed by drivers that need to maintain a hardware table of associated STAs (like ral(4) RT2860). idea from Nathanael Rensen
2009-05-19prevent injection of raw 802.11 control frames through bpf on driversDamien Bergamini
that do not explicitly state this capability (using flag IEEE80211_C_RAWCTL). also, perform all the sanity checks on injected raw 802.11 frames earlier (in ieee80211_output instead of ieee80211_encap). prevent kernel panics with many drivers when running aircrack-ng. when/if all drivers are capable, we can remove this C_RAWCTL flag.
2009-03-26move #define IEEE80211_NO_HT under #ifdef SMALL_KERNEL insteadDamien Bergamini
of defining it unconditionnaly. although the HT code is not ready yet, making it compile on GENERIC kernels will help catch regressions/bugs if any.
2009-02-08initial 802.11 defragmentation bits.Damien Bergamini
the code will allow the concurrent reception of fragments of three fragmented MSDUs or MMPDUs as required by the 802.11 standard.
2009-01-28Block Ack agreements are unidirectional.Damien Bergamini
Maintain state for both originator and recipient roles separately. Do not allocate receive reordering buffer in addba_request(). Test the "initiator" bit in incoming DELBA frames and set it appropriately in outgoing DELBA frames. Separate callbacks for Tx/Rx too. no binary change since all this is #ifdef'ed out.
2009-01-26Add some initial HT bits (not enabled yet) based on 802.11n Draft 7.01:Damien Bergamini
- implement A-MPDU frames buffering and reordering - implement A-MSDU decapsulation - process/send ADDBA Request, ADDBA Response and DELBA action frames - process Block Ack Request control frames (including MTBAR) - implement PBAC support (Protected Block Ack) - add some incomplete HT Capabilities and HT Operation IEs parsing Add more Management Frame Protection bits based on 802.11w Draft 7.0: - implement SA Query procedure (both AP and STA) - cleanup BIP Fix some bugs: - fix check for WEP key length that otherwise caused a stack smash in ieee80211_wep_encrypt (pointed out by Xavier Santolaria on macppc) - properly stop EAPOL timeout: fixes a panic that occured in HostAP mode when turning the interface down while a 4-way handshake is in progress (pointed out by Doughertys) Did some code cleanup too. The HT bits are currently not compiled in (IEEE80211_NO_HT is defined) because they won't be ready until after the next release and I didn't want to grow the kernel or to inadvertently introduce new bugs. They are here such that other people can look at the code. Notice that I had to add an extra parameter to ic_send_mgmt() for action frames, that is why there are small changes in drivers defining their own ic_send_mgmt() handler. Sorry for the not very incremental diff but this has been sitting in my tree for too long now.
2008-11-13use different TSCs when sending the two MIC failure report framesDamien Miller
to our AP as we enter TKIP countermeasures by caching the TSC of the last frame to fail the MIC; prompted by and ok damien@
2008-09-27Initial implementation of PMKSA caching and pre-authentication.Damien Bergamini
This will be required for future WPA-Enterprise support (802.1X). Add ieee80211_needs_auth() function (not implemented yet) to notify the userland 802.1X PACP machine when an 802.1X port becomes enabled (that is after successfull 802.11 Open System authentication). Add SIOCS80211KEYRUN and SIOCS80211KEYAVAIL ioctls so that the PACP state machine can kick the 802.11 key state machine and install PMKs obtained from 802.1X (pre-)authentication. Enable SHA-256 based AKMPs by default while I'm here (TGw). This uses SHA-256 for key-derivation (instead of SHA1), AES-128-CMAC for data integrity, and AES Key Wrap for data protection of EAPOL-Key frames. An OpenBSD AP will always advertise this capability and an OpenBSD STA will always prefer SHA-256 based AKMPs over SHA1 based ones if both are supported by an AP.
2008-09-08define IEEE80211_STA_ONLY if SMALL_KERNEL is defined to shrinkJonathan Gray
the size of install media. ok damien@ deraadt@
2008-09-01add ic_tid_noack bitmap to indicate a per-TID ACK policy (1=no ack,Damien Bergamini
0=normal ack). all bits are currently set to 0. use this bitmap to set the ACK policy of the QoS control field of outgoing QoS frames.
2008-09-01rework previously unused ieee80211_pwrsave() function, call it fromDamien Bergamini
ieee80211_mgmt_output() and ieee80211_encap(). use new IEEE80211_C_APPMGT capability flag where appropriate. rename ic_tim_mcast to ic_tim_mcast_pending.
2008-08-29move code to support Frequency-Hopping spread spectrum (FHSS) PHYsDamien Bergamini
to the Attic. nothing uses it in the tree and it is very unlikely that something will use it one day. the only driver supporting FHSS PHYs in the tree is ray(4) and it does not use net80211.
2008-08-29garbage collect unused capabilities and configurations flags.Damien Bergamini
add two capabilities flags: IEEE80211_C_HT for HT STAs (802.11n) and IEEE80211_C_APPMGT which indicates the capability for an AP to buffer unicast and multicast traffic for STAs in PS mode. all drivers claiming HostAP support should support that but the truth is that none of them do. most of them are still at the 802.11b-only era and do not update dynamic parts of beacons or process frames from ic_pwrsaveq.
2008-08-27move definitions of channels attributes away from ieee80211.h suchDamien Bergamini
that ieee80211.h contains only definitions that are part of the 802.11 standard and not constants used internally by net80211. because channels attributes are exported to userland through the radiotap BPF interface, add the definitions to ieee80211_radiotap.h too (which must be kept in sync with what is used in net80211). also, do not export combinations of channel attributes to userland so that noone get stupid ideas.
2008-08-27introduce new IEEE80211_STA_ONLY kernel option that can be set toDamien Bergamini
remove IBSS and HostAP support from net80211 and 802.11 drivers. it can be used to shrink RAMDISK kernels for instance (like what was done for wi(4)). it also has the benefit of highlighting what is specific to IBSS and HostAP modes in the code. the cost is that we now have two code paths to maintain.
2008-08-12nuke unused fields.Damien Bergamini
2008-08-12add IEEE80211_F_MFPR config flags (management frame protection required)Damien Bergamini
and IEEE80211_C_MFP capability bit (driver supports MFP).
2008-08-12extend the ic_nw_keys[] array to 6 elements.Damien Bergamini
indices 0-3 will be used for group data keys while indices 4-5 will be used for integrity group keys. add a ic_rsngroupmgmtcipher field too.
2008-08-12Change the way we process EAPOL-Key frames.Damien Bergamini
Free the mbuf in the ieee80211_eapol_key_input() function. Do not assume the frame is contiguous, call m_pullup2() if it is not. We need the frame to be contiguous to process KDEs efficiently in EAPOL-Key frames (just like we process IEs in management frames). However, there are drivers like upgt(4) that use m_devget() in the RX path. m_devget() can return fragmented mbuf chains. Notice that we should do the same m_pullup2() for management frames. This will be done later. Remove the ic_recv_eapol callback.
2008-07-28ignore PS mode changes and PS-Poll from non-associated STAs.Damien Bergamini
keep track of the number of associated STAs in PS mode.
2008-07-27sanitize RX path a bit.Damien Bergamini
make sure drivers pass a contiguous header, check header length earlier. fix checking of frames sequence number for frames containing an Address 4 field (required for future work). fix processing of control frames (only pspoll for now).
2008-07-21add ieee80211_priv.h file: contains definitions private to net80211.Damien Bergamini
this must not be included by drivers.
2008-07-21instead of passing rx tstamp and rssi to the ieee80211_input function,Damien Bergamini
pass a pointer to an ieee80211_rxinfo structure containing those two fields plus an extra flags field that indicates whether the frame was decrypted by hardware or not. required for a future fix.
2008-04-16Kernel implementation of the 4-way handshake and group-keyDamien Bergamini
handshake protocols (both supplicant and authenticator state machines) as defined in the IEEE 802.11i standard. Software implementation of the TKIP (Temporal Key Integrity Protocol) and CCMP (CTR with CBC-MAC Protocol) protocols. This diff doesn't implement any of the 802.1X authentication protocols and thus only PSK authentication (using pre-shared keys) is currently supported. In concrete terms, this adds support for WPA-PSK and WPA2-PSK protocols, both in station and hostap modes. The following drivers are marked as WPA-capable and should work: bwi(4), malo(4), ral(4), iwn(4), wpi(4), ural(4), rum(4), upgt(4), and zyd(4) The following options have been added to ifconfig(8): wpa, wpapsk, wpaprotos, wpaakms, wpaciphers, wpagroupcipher wpa-psk(8) can be used to generate keys from passphrases. tested by many@ ok deraadt@
2007-11-17make it clear in the code and in the man page that the rate2plcp andDamien Bergamini
plcp2rate functions use plcp codes in most-significant-bit-first format (R4-R1). some drivers like wpi(4) and iwn(4) want plcp codes in lsb-first format so they can't use those functions. also the IEEE standard uses R1-R4 notation so this can be a bit confusing for those refering to it. use u_int8_t for plcp code and rate instead of int.
2007-11-14Add ieee80211_rate2plcp() and ieee80211_plcp2rate() functions, whichMarcus Glocker
convert the PLCP header signal field to a rate value and vice versa. This implementation has been discussed with Damien and doesn't change any existing net80211 structures. ok damien@
2007-11-03Revert last commit which added ieee80211_rate2plcp() andMarcus Glocker
ieee80211_plcp2rate() because I've got a late feedback from Damien that he dislike the implementation method a lot.
2007-11-01Add ieee80211_rate2plcp() and ieee80211_plcp2rate() functions.Marcus Glocker
Help and OK reyk@
2007-08-22- add k_rxmic and k_txmic fields to struct ieee80211_key to store theDamien Bergamini
Tx/Rx MIC for TKIP. - add two functions to map a PTK and a GTK to an IEEE 802.11 key and use them in ieee80211_input.c instead of duplicating the same code. properly set Tx/Rx MIC in the IEEE 802.11 key in the case of TKIP. - add ic_psk to struct ieee80211com to store the pre-shared key. - fix setting of the SECURE bit in outgoing EAPOL-Key frames. - when receiving msg 2 of the 4-way handshake, deauthenticate the station if the RSN IE does not match that of the (Re)Association request. - before parsing an RSN or WPA IE, check that there's enough room for the version field (2 bytes) which is mandatory. - various tweaks while i'm here.
2007-07-28add callbacks that drivers must implement to install/reset keys.Damien Bergamini
add a 64-bit replay counter for sending EAPOL-Key request frames. add a ic_recv_eapol callback to process EAPOL frames. drivers can redefine this callback but net80211 will implement it.
2007-07-24add ic_globalcnt to struct ieee80211com:Damien Bergamini
in an RSNA, each STA must maintain a 256-bit global key counter that must be initialized to a random value (see 8.5.7).
2007-07-18replace the ieee80211_wepkey structure with a more generic ieee80211_keyDamien Bergamini
one that can be used with other ciphers than WEP.
2007-07-05split ieee80211_add_rsn() so that the code can be reused forDamien Bergamini
vendor-specific IE.
2007-07-04add RSN flags for ic_caps and ic_flags.Damien Bergamini
2007-07-03maintain the traffic-indication (TIM) virtual bitmap by definingDamien Bergamini
a default ieee80211_set_tim() function that drivers can override by setting ic_set_tim.
2007-07-02initial bits for proper TIM support.Damien Bergamini
2007-06-21add (currently unused) code to parse RSN IEs.Damien Bergamini
2007-06-21add fields for EDCA.Damien Bergamini
2007-06-17Add a new capability flag IEEE80211_C_QOS indicating that the driverDamien Bergamini
supports QoS. Add a new flag IEEE80211_F_QOS indicating whether QoS is enabled or not. Add a callback to notify drivers that AC parameters have changed in the QBSS. Drivers implementing QoS should define this callback and update their EDCA settings accordingly.
2007-06-16constifyDamien Bergamini
2007-06-11adds 802.11e EDCA tables for QAPs and non-AP QSTAs.Damien Bergamini
not used yet. ok jsg@ deraadt@
2007-06-07expand the IEEE80211_NODE_{LOCK,UNLOCK}* macros into their respectiveDamien Bergamini
definitions. remove comments about "lock order reversals" that are specific to freebsd. ok reyk@ jsg@ mglocker@
2007-06-06The license permits us to redistribute this code under the BSD or the GPLv2.Damien Bergamini
Choose the BSD license so that future enhancements will be BSD-only. ok jsg@ reyk@ deraadt@
2006-11-15s/roundup/howmany/ where it makes sense.Damien Bergamini
2006-10-19s/Mhz/MHz/ in comments and printf() stringsTom Cosgrove
ok jsg@
2006-06-27add the net80211 hostap options "nwflag hidenwid" for hidden SSID modeReyk Floeter
and "nwflag nobridge" to prevent inter-station communications. "hidenwid" will also work with wi(4) to replace the old -E 3 option of wicontrol. ok damien@ jmc@
2006-06-24ieee80211_cfgget() and ieee80211_cfgset() are dead; ok jsgTheo de Raadt
2006-06-23add an optional max_rssi attribute to the ieee80211com structure andReyk Floeter
allow to export the RSSI Max value with ioctls and by radiotap headers. ok damien@ jsg@ description: we currently use "dB" as an indication for the signal strength in ifconfig and in the radiotap headers. it means "decibel difference from an arbitrary, fixed reference". this is quite confusing, because different chipsets have different references for the dB/rssi values. we can use the plain RSSI which is described in IEEE 802.11: "The receive signal strength indicator (RSSI) is an optional parameter that has a value of 0 through RSSI Max.". all wireless chipsets have something like a RSSI (normally as a Rx descriptor field), but the value for RSSI Max is chipset-specific. if we know the RSSI Max, we can calculate a percentage which is much easier to understand for the user. we even don't have to use the absolute RSSI Max, we can use an average RSSI Max, figured out by monitoring and tuning the RSSI Max of the drivers. if the user gets a signal of 110%, it would mean "better than the average Max signal". there's no need to do any RSSI calculations in the kernel, it just passes the the relative rssi and max_rssi values to userspace. this is done in the ieee80211_nodereq ioctl structure and possible with a new radiotap header. the radiotap RSSI header allows to get a flexible but common signal indicator instead of the complex and unrelated dB/dBm signal fields. it must include two 8bit values current rssi and RSSI max.
2006-06-18Improve 802.11b/g interoperability and move toward better complianceDamien Bergamini
with IEEE Std 802.11g-2003 standard: - add ERP Information Element in probe responses and beacons - keep track of the number of associated non-ERP STAs and non-short slot time capable STAs in the BSS - enable use of RTS/CTS or CTS-to-self protection when required by the BSS - add a ic_updateslot() callback to notify drivers of slot time changes - cleanup computation of mgmt frames sizes in ieee80211_output.c - nuke unnecessary <sys/cdefs.h> includes - remove an unused macro (LOGICALLY_EQUAL) while i'm here From {free,net}bsd, with additional fixes. ok brad@, reyk@
2005-09-13replace the node hash table with a red-black tree. this fixes someReyk Floeter
bugs in the node table (like duplicate nodes in hostap mode), we get rid of possible hash collisions, and it simplifies the code. tested by many, ok damien@, jsg@