summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.c
Commit message (Collapse)AuthorAgeFilesLines
...
* correct WMM packet classification:sam2007-11-231-40/+9
| | | | | | | o use TID_TO_WME_AC on vlan tag priority o ignore ECN bits in DSCP when mapping IP TOS and use TID_TO_WME_AC MFC after: 3 days
* sync 11n support with vap code base; many changes based on interopsam2007-11-021-37/+55
| | | | | | testing with all major vendors MFC after: 1 week
* honor IEEE80211_C_TXFRAG; drivers should never get fragmented packetssam2007-09-181-0/+1
| | | | | | unless they indicate they're able to handle them Approved by: re (blanket wireless)
* tag mgmt and null data frames w/ a WME priority so drivers can assumesam2007-09-181-0/+6
| | | | | | only data frames require classification Approved by: re (blanket wireless)
* Update beacon handling to sync w/ vap code base:sam2007-09-171-22/+20
| | | | | | | | | | | | | | | | | | | o add driver callback to handle notification of beacon changes; this is required for devices that manage beacon frames themselves (devices must override the default handler which does nothing) o move beacon update-related flags from ieee80211com to the beacon offsets storage (or handle however a driver wants) o expand beacon offsets structure with members needed for 11h/dfs and appie's o change calling convention for ieee80211_beacon_alloc and ieee80211_beacon_update o add overlapping bss support for 11g; requires driver to pass beacon frames from overlapping bss up to net80211 which is not presently done by any driver o move HT beacon contents update to a routine in the HT code area Reviewed by: avatar, thompsa, sephe Approved by: re (blanket wireless)
* drop frames marked for encryption when no key is availablesam2007-08-241-0/+1
| | | | | | Reviewed by: avatar Approved by: re (kensmith) Obtained from: madwifi
* Update 802.11 wireless support:sam2007-06-111-193/+657
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o major overhaul of the way channels are handled: channels are now fully enumerated and uniquely identify the operating characteristics; these changes are visible to user applications which require changes o make scanning support independent of the state machine to enable background scanning and roaming o move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resources o add background scanning in station mode (no support for adhoc/ibss mode yet) o significantly speedup sta mode scanning with a variety of techniques o add roaming support when background scanning is supported; for now we use a simple algorithm to trigger a roam: we threshold the rssi and tx rate, if either drops too low we try to roam to a new ap o add tx fragmentation support o add first cut at 802.11n support: this code works with forthcoming drivers but is incomplete; it's included now to establish a baseline for other drivers to be developed and for user applications o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locally o add support for Atheros protocol extensions; mainly the fast frames encapsulation (note this can be used with any card that can tx+rx large frames correctly) o add sta support for ap's that beacon both WPA1+2 support o change all data types from bsd-style to posix-style o propagate noise floor data from drivers to net80211 and on to user apps o correct various issues in the sta mode state machine related to handling authentication and association failures o enable the addition of sta mode power save support for drivers that need net80211 support (not in this commit) o remove old WI compatibility ioctls (wicontrol is officially dead) o change the data structures returned for get sta info and get scan results so future additions will not break user apps o fixed tx rate is now maintained internally as an ieee rate and not an index into the rate set; this needs to be extended to deal with multi-mode operation o add extended channel specifications to radiotap to enable 11n sniffing Drivers: o ath: add support for bg scanning, tx fragmentation, fast frames, dynamic turbo (lightly tested), 11n (sniffing only and needs new hal) o awi: compile tested only o ndis: lightly tested o ipw: lightly tested o iwi: add support for bg scanning (well tested but may have some rough edges) o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data o wi: lightly tested This work is based on contributions by Atheros, kmacy, sephe, thompsa, mlaier, kevlo, and others. Much of the scanning work was supported by Atheros. The 11n work was supported by Marvell.
* copyright updates:sam2007-06-061-7/+1
| | | | | | | o update to include 2007 o switch back to a 2-clause bsd-only license Reviewed by: onoe
* keep tx/rx seq #'s for non-QoS traffic separate from QoS; stationssam2007-03-111-4/+4
| | | | | | | aren't supposed mix traffic but if they did frames might be mis-handled Obtained from: Atheros MFC after: 2 weeks
* add IEEE80211_KEY_UNDEFINED and use it instead of local defssam2007-03-111-5/+5
| | | | Obtained from: netbsd
* First cut at half/quarter-rate 11a channel support (e.g. for usesam2006-12-271-4/+4
| | | | | | | | | | | | | | | | | | | | in the Public Safety Band): o add channel flags to identify half/quarter-rate operation o add rate sets (need to check spec on 4Mb/s in 1/4 rate) o add if_media definitions for new rates o split net80211 channel setup out into ieee80211_chan_init o fixup ieee80211_mhz2ieee and ieee80211_ieee2mhz to understand half/quarter rate channels: note we temporarily use a nonstandard/hack numbering that avoids overlap with 2.4G channels because we don't (yet) have enough state to identify and/or map overlapping channel sets o fixup ieee80211_ifmedia_init so it can be called post attach and will recalculate the channel list and associated state; this enables changing channel-related state like the regulatory domain after attach (will be needed for 802.11d support too) o add ieee80211_get_suprates to return a reference to the supported rate set for a given channel o add 3, 4.5, and 27 MB/s tx rates to rate <-> media conversion routines o const-poison channel arg to ieee80211_chan2mode
* back out use of LLC_SNAPFRAMELEN now that sizeof(struct llc) isn'tsam2006-12-011-3/+3
| | | | padded on arm
* sizeof(struct llc) includes padding on arm; use LLC_SNAPFRAMELEN for nowsam2006-12-011-3/+3
| | | | | Submitted by: jhay MFC after: 2 weeks
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldandre2006-09-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content. Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field: m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG; to mark the packet m with the specified VLAN tag. On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid: if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... } VLAN tags are stored in host byte order. Byte swapping may be necessary. (Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.) Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done. Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
* add per-sta ucast/mcast statssam2006-08-101-0/+4
| | | | MFC after: 1 week
* add support for 802.11 packet injection via bpfsam2006-07-261-0/+124
| | | | | | Together with: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Reviewed by: arch@ MFC after: 1 month
* when doing s/w crypto make sure work is done w/ a writable mbuf chain;sam2006-03-151-0/+15
| | | | | | | | | this corrects problems with drivers that rely on the host to do crypto (iwi, ipw, ral, ural, wi (hostap), awi) Hard work by: luigi, mlaier Reviewed by: luigi, mlaier MFC after: 1 week
* consolidate calculation of capabilities iesam2006-02-251-47/+34
| | | | | Reviewed by: avatar MFC after: 2 weeks
* set the mgt frame tx timer before dispatching the frame to thesam2006-02-081-8/+10
| | | | | | | | | driver; this closes a race where a response could be processed before the timer was started and cause a RUN->SCAN state change when operating in station mode Reviewed by: avatar, dyoung MFC after: 1 week
* update erp information element in the beacon frame to reflectsam2006-01-021-4/+16
| | | | | | | | changes in the bss Reviewed by: avatar Obtained from: atheros MFC after: 2 weeks
* correct handling of dtim for periods > 1sam2005-12-051-1/+1
| | | | Obtained from: madwifi
* Retire MT_HEADER mbuf type and change its users to use MT_DATA.andre2005-11-021-1/+1
| | | | | | | | | | | | Having an additional MT_HEADER mbuf type is superfluous and redundant as nothing depends on it. It only adds a layer of confusion. The distinction between header mbuf's and data mbuf's is solely done through the m->m_flags M_PKTHDR flag. Non-native code is not changed in this commit. For compatibility MT_HEADER is mapped to MT_DATA. Sponsored by: TCP/IP Optimization Fundraise 2005
* Clarify/fix handling of the current channel:sam2005-08-101-10/+10
| | | | | | | | | | | | | | | | | | | o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
* Cleanup beacon/listen interval handling:sam2005-08-081-3/+3
| | | | | | | | | | | | | | | | | o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
* close a race between reclaiming a node when a station is inactivesam2005-07-311-1/+6
| | | | | | and sending the null data frame used to probe inactive stations MFC after: 5 days
* split xmit of probe request frame out into a separate routine thatsam2005-07-221-33/+85
| | | | | | | takes explicit parameters; this will be needed when scanning is decoupled from the state machine to do bg scanning MFC after: 3 days
* split 802.11 frame xmit setup code into ieee80211_send_setupsam2005-07-221-36/+72
| | | | MFC after: 3 days
* simplify tim callback apisam2005-07-221-1/+1
| | | | MFC after: 3 days
* simplify ieee80211_node_authorize and ieee80211_node_unauthorize api'ssam2005-07-221-1/+1
| | | | MFC after: 3 days
* simplifiy ieee80211_send_nulldata apisam2005-07-221-1/+2
| | | | MFC after: 3 days
* Fix handling of data frames queued for a station in power save mode:sam2005-07-061-0/+2
| | | | | | | | | | don't mark the MORE_DATA bit when taking it off the ps queue, there's no 802.11 header then; we must wait to do this at encap time so mark the mbuf instead. Reviewed by: avatar Approved by: re (scottl) Obtained from: Atheros
* mark stations authorized during recv processing instead of doing itsam2005-06-101-8/+0
| | | | | as a side effect of sending an auth success frame; sending mgmt frames should not have side effects
* WPA/802.11i interoperability fixes:sam2005-06-071-3/+2
| | | | | | | | o only include capabilities word in the WPA ie when non-zero and not preauth o always include the capabilities in the RSN ie Obtained from: Atheros
* add force flag to enmic/demic crypto api for use in xmit fragmentationsam2005-06-061-1/+1
| | | | | | and h/w mic verification Reviewed by: avatar
* don't include wme ie in probe request frames; it was meant for probe responsesam2005-03-261-4/+4
| | | | | | | frames--move it there Noticed by: Ghislain Mary Submitted by: Michael Wong
* correct comparison for null ptrsam2005-03-161-1/+1
| | | | Noticed by: Coverity Prevent analysis tool
* rev 1.19 fixed wpa supplicant but broke wpa authenticator; when operatingsam2005-02-101-1/+2
| | | | | | | as an authenticator need to always check for the unicast key in the node (as was the case before) Submitted by: Divy Le Ray
* correct check for unicast key being setup; wpa_supplicant in particularsam2005-02-031-1/+1
| | | | | | uses only the global key state so looking in the per-node key slot is wrong Submitted by: Tai-hwa Liang
* update node reference count debug msgs to include the node addresssam2005-01-241-3/+3
| | | | since the mac address may not be sufficient to uniquely identify a node
* clear IEEE80211_F_WMEUPDATE when building the initial beacon frame so wesam2005-01-241-0/+1
| | | | don't do an update on the first beacon
* handle potential stale values of bssid in neighbor nodes thatsam2005-01-221-1/+5
| | | | | | can occur after an ibss merge Submitted by: David Young
* bump copyright for 2005sam2004-12-311-1/+1
|
* Relearn how WPA keying is supposed to work and fix WPA+WME whilesam2004-12-311-111/+128
| | | | | | | | | | | | | | | | | we're at it: o WPA/802.11i has a unicast key and a group key; in station mode everything is sent with the unicast key--we were consulting the destination mac address and incorrectly using the group key o (perpetuate fallback use of the default tx key to maintain compatibility with the way wpa_supplicant works) o correct EAPOL encryption logic to check unicast key instead of assuming other state implies this o move QoS encapsulation up to before enmic work so TKIP has the information required to calculate the pseudo-header o do not do QoS-encapsulation of EAPOL frames as some ap's do the wrong thing with such frames (may need to revisit this if ap's start dropping non-QoS frames from stations assoc'd with QoS) o move ieee80211_mbuf_adjust closer to its caller
* fixup printf arguments for 64-bit machinessam2004-12-081-3/+3
|
* Update 802.11 support; too much new functionality to fully describesam2004-12-081-155/+1171
| | | | | | here but it includes completed 802.11g, WPA, 802.11i, 802.1x, WME/WMM, AP-side power-save, crypto plugin framework, authenticator plugin framework, and access control plugin frameowrk.
* Add a new network interface flag, IFF_NEEDSGIANT, which will allowrwatson2004-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | device drivers to declare that the ifp->if_start() method implemented by the driver requires Giant in order to operate correctly. Add a 'struct task' to 'struct ifnet' that can be used to execute a deferred ifp->if_start() in the event that if_start needs to be called in a Giant-free environment. To do this, introduce if_start(), a wrapper function for ifp->if_start(). If the interface can run MPSAFE, it directly dispatches into the interface start routine. If it can't run MPSAFE, we're running with debug.mpsafenet != 0, and Giant isn't currently held, the task is queued to execute in a swi holding Giant via if_start_deferred(). Modify if_handoff() to use if_start() instead of direct dispatch. Modify 802.11 to use if_start() instead of direct dispatch. This is intended to provide increased compatibility for non-MPSAFE network device drivers in the presence of Giant-free operation via asynchronous dispatch. However, this commit does not mark any network interfaces as IFF_NEEDSGIANT.
* fix adhoc/ibss operation for drivers that require host support (e.g. ath):sam2004-04-021-29/+7
| | | | | | | | | | | | o remove IEEE80211_C_RCVMGT capability o on transmit craft new nodes as needed using new ieee80211_find_txnode routine o add ieee80211_find_txnode routine to lookup a node by mac address and if not present create one when operating in ibss/ahdemo mode; new nodes are dup'd from bss and the driver is told to treat the node as if a new association has been created so driver-private state (e.g. rate control handling) is setup Obtained from: netbsd (basic idea)
* add statistics for all failures and/or abnormal events; still needsam2003-10-171-11/+14
| | | | to add per-node statistics
* include FH/DS parameters element in probe response framessam2003-10-171-0/+18
|
* o add capability to indicate if device receives all management framessam2003-10-171-6/+17
| | | | | o use recv mgmt capability to decide if outbound frames should be discarded if no node table entry is present
OpenPOWER on IntegriCloud