summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.c
AgeCommit message (Collapse)Author
2009-01-29fix a panic that occurs when IEEE80211_STA_ONLY is defined (SMALL_KERNEL).Damien Bergamini
noticed by ray@, more investigation from sthen@ fix tested by sthen@
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-28In ieee80211_find_node(), roll our own RB_FIND() based on the key (macaddr)Damien Bergamini
instead of resorting to horrid hacks/casts. Restore the ieee80211_node structure back to its original state.
2009-01-27unbreak SMALL_KERNEL builds by adding missing #ifndef IEEE80211_STA_ONLYDamien Bergamini
pointed out by krw@
2009-01-26move ni_macaddr field at the top of the ieee80211_node structure.Damien Bergamini
this way we can avoid putting a full node structure (which is huge) on the stack in ieee80211_find_node(). this is a bit tricky but the RB_FIND macro wants an "elem" structure, not a field of "elem".
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-12-14Add an ieee80211_notify_dtim() function that drivers should call afterDamien Bergamini
every DTIM in HostAP mode. Flushes all group addressed MSDUs buffered at the AP for power management.
2008-10-23Prevent a crash in ieee80211_setkeys() when unplugging an interface inMichael Knudsen
hostap mode by canceling the group rekey timeout in ieee80211_node_detach(). ok damien
2008-10-15Second pass of simple timeout_add -> timeout_add_sec conversionsBret Lambert
This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
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-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-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-12new SHA-256 based AKMPs.Damien Bergamini
2008-08-12add/process group integrity cipher suite in RSN IEs.Damien Bergamini
add support for MFP negotiation during association.
2008-08-12the only integrity group cipher currently supported is AES-128-CMAC.Damien Bergamini
2008-08-12generate a random IGTK in HostAP mode if we're MFP-capable.Damien Bergamini
2008-08-12get rid of the map_ptk()/map_gtk() functions, just inline themDamien Bergamini
which makes things easier to track.
2008-08-02Drop frames that are received unencrypted when WEP is on or whenDamien Bergamini
WPA is on and RX protection for TA is on. Keep track of the TX/RX protection for each node when WPA is on. tested by djm@ (ral+wpa), ckuethe@ (ath-noenc) and krw@ (wpi<->ral+wpa). hints from bluhm@ has been in snaps for a few days. pointed out by bluhm@ something like 1 year ago but we did not have the right infrastructure to fix it properly at that time. ok deraadt@
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-27s/IEEE80211_DPRINTF/DPRINTF/Damien Bergamini
automatically prepend __func__ to output. deobfuscates debug messages a bit. no binary change unless compiled with IEEE80211_DEBUG.
2008-07-21add ieee80211_priv.h file: contains definitions private to net80211.Damien Bergamini
this must not be included by drivers.
2008-06-09rename arc4random_bytes => arc4random_buf to match libc's nicer name;Damien Miller
ok deraadt@
2008-04-21move ieee80211_ibss_merge() from ieee80211_input.c to ieee80211_node.cDamien Bergamini
2008-04-21move ieee80211_auth_open() to ieee80211_proto.cDamien Bergamini
move ieee80211_setup_rates() to ieee80211_node.c move some prototypes from ieee80211_proto.h to ieee80211_crypto.h
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-10-29MALLOC/FREE -> malloc/freeCharles Longeau
ok krw@
2007-09-07use new malloc M_ZERO flag + replace MALLOC with mallocDamien Bergamini
2007-07-06remove remaining bits for pre-RSNA shared authmode support.Damien Bergamini
it has been #if 0'd since 3.9 and we have never supported this mode (no ifconfig option etc...).
2007-07-06initialize an unitialized variable.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-16constifyDamien Bergamini
2007-06-16don't mix u_int{8,16,32}_t and uint{8,16,32}_tDamien Bergamini
use u_int{8,16,32}_t everywhere.
2007-06-16de-staticDamien Bergamini
ok jsg@
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@
2007-04-10``it's'' -> ``its'' when the grammar gods require this change.Miod Vallat
2006-11-15s/roundup/howmany/ where it makes sense.Damien Bergamini
2006-11-13fix a possible NULL deref.Damien Bergamini
2006-06-19unbreak the code if compiled with IEEE80211_DEBUG by using the rightReyk Floeter
node attribute. ok damien@, figured out by claudio@
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@
2006-02-19Fix a comment in ieee80211_next_scan().Damien Bergamini
2005-10-09if the wireless hostap interface belongs to a bridge, learn the node'sReyk Floeter
address dynamically on this interface after successful association. this could speed wireless roaming to openbsd accesspoints. ok jason@, jsg@ can't see anything obectionable
2005-10-07minor knfReyk Floeter
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@
2005-09-08mostly knfReyk Floeter
ok jsg@
2005-09-08Remove the last of the FreeBSD compatiblity goop.Jonathan Gray
ok reyk@
2005-09-08Remove FreeBSD if_printf compat function from net80211.Jonathan Gray
ok reyk@
2005-09-08reset the scan state for each new modeReyk Floeter
ok jsg@
2005-09-07Remove FreeBSD/NetBSD ifdef mess. We are not likely to beJonathan Gray
doing a wholesale merge with them in future. very enthusiastic ok from reyk@