#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
225444 |
|
07-Sep-2011 |
adrian |
Update the TSF and next-TBTT methods to work for the AR5416 and later NICs. This is another commit in a series of TDMA support fixes for the 11n NICs.
* Move ath_hal_getnexttbtt() into the HAL; write methods for it. This returns a timer value in TSF, rather than TU.
* Move ath_hal_getcca() and ath_hal_setcca() into the HAL too, where they likely now belong.
* Create a new HAL capability: HAL_CAP_LONG_RXDESC_TSF. The pre-11n NICs write 15 bit TSF snapshots into the RX descriptor; the AR5416 and later write 32 bit TSF snapshots into the RX descriptor. * Use the new capability to choose between 15 and 31 bit TSF adjustment functions in ath_extend_tsf().
* Write ar5416GetTsf64() and ar5416SetTsf64() methods. ar5416GetTsf64() tries to compensate for TSF changes at the 32 bit boundary.
According to yin, this fixes the TDMA beaconing on 11n chipsets and TDMA stations can now associate/talk, but there are still issues with traffic stability which need to be investigated.
The ath_hal_extendtsf() function is also used in RX packet timestamping; this may improve adhoc mode on the 11n chipsets. It also will affect the timestamps seen in radiotap frames.
Submitted by: Kang Yin Su <cantona@cantona.net> Approved by: re (kib)
|
#
224720 |
|
08-Aug-2011 |
adrian |
And add another missing brace. Another pointy hat moment. This one however isn't used by any public code yet, so it didn't break the build.
Approved by: re (kib, blanket)
|
#
224715 |
|
08-Aug-2011 |
adrian |
.. and add a missing bracket.
Approved by: re (kib, blanket)
|
#
224714 |
|
08-Aug-2011 |
adrian |
Fix method naming to match the reference HAL definition.
Obtained from: Atheros Approved by: re (kib, blanket)
|
#
224709 |
|
08-Aug-2011 |
adrian |
Add another HAL method - ah_isFastClockEnabled - which returns AH_TRUE if 5ghz fast clock is enabled in the current operating mode.
It's slightly dirty, but it's part of the reference HAL and used by the (currently closed-source) radar event code to map radar pulses back to microsecond durations.
Obtained from: Atheros Approved by: re (kib, blanket)
|
#
224588 |
|
02-Aug-2011 |
adrian |
Fix a corner case in RXEOL handling which was likely introduced by yours truly.
Before 802.11n, the RX descriptor list would employ the "self-linked tail descriptor" trick which linked the last descriptor back to itself. This way, the RX engine would never hit the "end" of the list and stop processing RX (and assert RXEOL) as it never hit a descriptor whose next pointer was 0. It would just keep overwriting the last descriptor until the software freed up some more RX descriptors and chained them onto the end.
For 802.11n, this needs to stop as a self-linked RX descriptor tickles the block-ack logic into ACK'ing whatever frames are received into that self-linked descriptor - so in very busy periods, you could end up with A-MPDU traffic that is ACKed but never received by the 802.11 stack. This would cause some confusion as the ADDBA windows would suddenly be out of sync.
So when that occured here, the last descriptor would be hit and the PCU logic would stop. It would only start again when the RX descriptor list was updated and the PCU RX engine was re-tickled. That wasn't being done, so RXEOL would be continuously asserted and no RX would continue.
This patch introduces a new flag - sc->sc_kickpcu - which when set, signals the RX task to kick the PCU after its processed whatever packets it can. This way completed packets aren't discarded.
In case some other task gets called which resets the hardware, don't update sc->sc_imask - instead, just update the hardware interrupt mask directly and let either ath_rx_proc() or ath_reset() restore the imask to its former setting.
Note: this bug was only triggered when doing a whole lot of frame snooping with serial console IO in the RX task. This would defer interrupt processing enough to cause an RX descriptor overflow. It doesn't happen in normal conditions.
Approved by: re (kib, blanket)
|
#
224540 |
|
31-Jul-2011 |
adrian |
Fix typo!
Approved by: re (kib)
|
#
222815 |
|
07-Jun-2011 |
adrian |
Flesh out a new HAL method to fetch the radar PHY error frame information.
For the AR5211/AR5212, this is apparently a one byte pulse duration counter value. It is only coded up here for the AR5212 as I don't have any AR5211-series hardware to test it on.
This information was extracted from the Madwifi DFS branch along with some local additions.
Please note - all this does is extract out the radar event duration, it in no way reflects the presence of a radar. Further code is needed to take a set of radar events and filter them to extract out correct radar pulse trains (and ignore other events.)
For further information, please see:
http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection
This includes references to the relevant patents which describe what is going on.
Obtained from: Madwifi
|
#
222668 |
|
04-Jun-2011 |
adrian |
A few changes to make radar detection implementable in a hal_dfs/ module.
* If sc->sc_dodfs is set to 1 by the ath_dfs_radar_enable(), set the relevant rx filter bit to begin receiving radar PHY errors. The HAL code already knows how to set the relevant error mask register to enable radar events.
* Add a missing call to ath_dfs_radar_enable() after ath_hal_reset()
* change ath_dfs_process_phyerr() to take a const char *buf for now, rather than a descriptor. This way it can get access to the packet buffer contents.
|
#
222585 |
|
01-Jun-2011 |
adrian |
Flesh out the radar detection related operations for the ath driver.
This is in no way a complete DFS/radar detection implementation! It merely creates an abstracted interface which allows for future development of the DFS radar detection code.
Note: Net80211 already handles the bulk of the DFS machinery, all we need to do here is figure out that a radar event has occured and inform it as such. It then drives the DFS state engine for us.
The "null" DFS radar detection module is included by default; it doesn't require a device line.
This commit:
* Adds a simple abstracted layer for radar detection state - sys/dev/ath/ath_dfs/; * Implements a null DFS module which doesn't do anything; (ie, implements the exact behaviour at the moment); * Adds hooks to the ath driver to process received radar events and gives the DFS module a chance to determine whether a radar has been detected.
Obtained from: Atheros
|
#
222277 |
|
25-May-2011 |
adrian |
The current ANI capability information uses a different set of values for the commands, compared to the internal command values (HAL_ANI_CMD.)
My eventual aim is to make the HAL_ANI_CMD internal enum match the public API and then remove all this messiness.
This now allows HAL_CAP_INTMIT users to use a public HAL_CAP_INTMIT_ enum rather than magic constants.
The only magic constants currently used by if_ath are "enable" and "present". Some local tools of mine allow for direct, manual fiddling of the ANI variables and I'll convert these to use the public enum API before I commit them.
|
#
220772 |
|
18-Apr-2011 |
adrian |
Add global TX timeout handling.
The global TX timeout counter increments whenever a frame is ready to be transmitted and the medium is busy.
|
#
220324 |
|
04-Apr-2011 |
adrian |
Add a HAL capability bit for supporting self-linked RX descriptors and disable it for the 11n chipsets.
From the ath9k source:
==
11N: we can no longer afford to self link the last descriptor. MAC acknowledges BA status as long as it copies frames to host buffer (or rx fifo). This can incorrectly acknowledge packets to a sender if last desc is self-linked.
==
Since this is useful for pre-AR5416 chips that communicate PHY errors via error frames rather than by on-chip counters, leave the support in there, but disable it for AR5416 and later.
|
#
220053 |
|
27-Mar-2011 |
adrian |
Rename AH_ENABLE_11N to ATH_ENABLE_11 - the HAL supports 11n by default but the ath driver doesn't. This is a much more consistent name.
|
#
220033 |
|
26-Mar-2011 |
adrian |
If 802.11n is enabled, bump the number of buffers used up to a larger level.
This is important for AMPDU RX as each burst is multiple packets in a row.
|
#
218490 |
|
09-Feb-2011 |
adrian |
Expose the 4k transaction workaround hooks to the driver, but don't (yet) fix the descriptor allocation.
|
#
218151 |
|
01-Feb-2011 |
adrian |
Add TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series.
|
#
218067 |
|
29-Jan-2011 |
adrian |
Fix some errors introduced w/ the last commit; fix setting RTS/CTS in the 11n rate scenario.
* I messed up a couple of things in if_athvar.h; so fix that. * Undo some guesswork done in ar5416Set11nRateScenario() and introduce a flags parameter which lets the caller set a few things. To begin with, this includes whether to do RTS or CTS protection. * If both RTS and CTS is set, only do RTS. Both RTS and CTS shouldn't be set on a frame.
|
#
218066 |
|
29-Jan-2011 |
adrian |
Link in the 11n specific TX methods into the HAL.
|
#
217684 |
|
21-Jan-2011 |
adrian |
ANI changes #1 - split out the ANI polling from the RxMonitor hook.
The rxmonitor hook is called on each received packet. This can get very, very busy as the tx/rx/chanbusy registers are thus read each time a packet is received.
Instead, shuffle out the true per-packet processing which is needed and move the rest of the ANI processing into a periodic event which runs every 100ms by default.
|
#
217627 |
|
20-Jan-2011 |
adrian |
Add in the public method to access the tx completion rates.
|
#
217624 |
|
20-Jan-2011 |
adrian |
Include the initial support for external EEPROMs.
The AR9100 at least doesn't have an external serial EEPROM attached to the MAC; it instead stores the calibration data in the normal system flash.
I believe earlier parts can do something similar but I haven't experienced it first-hand.
This commit introduces an eepromdata pointer into the API but doesn't at all commit to using it. A future commit will include the glue needed to allow the AR9100 support code to use this data pointer as the EEPROM.
|
#
203683 |
|
08-Feb-2010 |
rpaulo |
Add multicast key search support. This fixes corrupted mcast packets when we have more than one hostap vap.
Submitted by: Russell Yount <russell.yount at gmail.com> MFC after: 2 weeks
|
#
195807 |
|
21-Jul-2009 |
sam |
track whether any mesh vaps are present to correctly setup the rx filter when, for example, an ap vap is created first
Reviewed by: rpaulo Approved by: re (kib)
|
#
195618 |
|
11-Jul-2009 |
rpaulo |
Implementation of the upcoming Wireless Mesh standard, 802.11s, on the 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
|
#
195114 |
|
27-Jun-2009 |
sam |
Add HAL_RX_FILTER_BSSID support (to disable bssid match): o add HAL_CAP_BSSIDMATCH to identify parts that have the support for disabling bssid match o honor capability for set/get rx filter o use HAL_CAP_BSSIDMATCH in driver to decide whether to use the bssid match disable or fall back to promisc mode
Reviewed by: rpaulo Approved by: re (rwatson)
|
#
192468 |
|
20-May-2009 |
sam |
Overhaul monitor mode handling: o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO and remove explicit bpf support from wireless drivers; drivers now use ieee80211_radiotap_attach to setup shared data structures that hold the radiotap header for each packet tx/rx o remove rx timestamp from the rx path; it was used only by the tdma support for debugging and was mostly useless due to it being 32-bits and mostly unavailable o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and per-com state when there are active taps o track the number of monitor mode vaps o use bpf tap and monitor mode vap state to decide when to collect radiotap state and dispatch frames; drivers no longer explicitly directly check bpf state or use bpf calls to tap frames o handle radiotap state updates on channel change in net80211; drivers should not do this (unless they bypass net80211 which is almost always a mistake) o update various drivers to be more consistent/correct in handling radiotap o update ral to include TSF in radiotap'd frames o add promisc mode callback to wi
Reviewed by: cbzimmer, rpaulo, thompsa
|
#
190848 |
|
08-Apr-2009 |
sam |
remove unused struct member
|
#
190579 |
|
30-Mar-2009 |
sam |
Hoist 802.11 encapsulation up into net80211: o call ieee80211_encap in ieee80211_start so frames passed down to drivers are already encapsulated o remove ieee80211_encap calls in drivers o fixup wi so it recreates the 802.3 head it requires from the 802.11 header contents o move fast-frame aggregation from ath to net80211 (conditional on IEEE80211_SUPPORT_SUPERG): - aggregation is now done in ieee80211_start; it is enabled when the packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames are held on a staging queue according to ieee80211_ffagemax (net.wlan.ffagemax) to wait for a frame to combine with - drivers must call back to age/flush the staging queue (ath does this on tx done, at swba, and on rx according to the state of the tx queues and/or the contents of the staging queue) - remove fast-frame-related data structures from ath - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle per-node fast-frames state (we reuse 11n tx ampdu state) o change ieee80211_encap calling convention to include an explicit vap so frames coming through a WDS vap are recognized w/o setting M_WDS
With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.
Reviewed by: thompsa, rpaulo, avatar, imp, sephe
|
#
190571 |
|
30-Mar-2009 |
sam |
Remove ATH_SUPPORT_TDMA and use IEEE80211_SUPPORT_TDMA instead. It doesn't make much sense to configure driver support w/o net80211. Note this means ath now depends on opt_wlan.h.
|
#
190096 |
|
19-Mar-2009 |
sam |
purge hal abi support; now that the hal is merged w/ the driver we cannot be out of sync
MFC after: 1 week
|
#
189605 |
|
09-Mar-2009 |
sam |
replace if_watchdog w/ private callout; probably can merge this with the calibration work sometime in the future
|
#
189380 |
|
04-Mar-2009 |
sam |
add a sysctl to ena/dis frobbing cca
|
#
188974 |
|
23-Feb-2009 |
sam |
5416 and later parts mux the gpio outputs; extend the api to include a signal type that's used to select the appropriate mux
|
#
188783 |
|
19-Feb-2009 |
sam |
remove private support for IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER now that net80211 has them
|
#
187831 |
|
28-Jan-2009 |
sam |
Overhaul regulatory support: o remove HAL_CHANNEL; convert the hal to use net80211 channels; this mostly involves mechanical changes to variable names and channel attribute macros o gut HAL_CHANNEL_PRIVATE as most of the contents are now redundant with the net80211 channel available o change api for ath_hal_init_channels: no more reglass id's, no more outdoor indication (was a noop), anM contents o add ath_hal_getchannels to have the hal construct a channel list without altering runtime state; this is used to retrieve the calibration list for the device in ath_getradiocaps o add ath_hal_set_channels to take a channel list and regulatory data from above and construct internal state to match (maps frequencies for 900MHz cards, setup for CTL lookups, etc) o compact the private channel table: we keep one private channel per frequency instead of one per HAL_CHANNEL; this gives a big space savings and potentially improves ani and calibration by sharing state (to be seen; didn't see anything in testing); a new config option AH_MAXCHAN controls the table size (default to 96 which was chosen to be ~3x the largest expected size) o shrink ani state and change to mirror private channel table (one entry per frequency indexed by ic_devdata) o move ani state flags to private channel state o remove country codes; use net80211 definitions instead o remove GSM regulatory support; it's no longer needed now that we pass in channel lists from above o consolidate ADHOC_NO_11A attribute with DISALLOW_ADHOC_11A o simplify initial channel list construction based on the EEPROM contents; we preserve country code support for now but may want to just fallback to a WWR sku and dispatch the discovered country code up to user space so the channel list can be constructed using the master regdomain tables o defer to net80211 for max antenna gain o eliminate sorting of internal channel table; now that we use ic_devdata as an index, table lookups are O(1) o remove internal copy of the country code; the public one is sufficient o remove AH_SUPPORT_11D conditional compilation; we always support 11d o remove ath_hal_ispublicsafetysku; not needed any more o remove ath_hal_isgsmsku; no more GSM stuff o move Conformance Test Limit (CTL) state from private channel to a lookup using per-band pointers cached in the private state block o remove regulatory class id support; was unused and belongs in net80211 o fix channel list construction to set IEEE80211_CHAN_NOADHOC, IEEE80211_CHAN_NOHOSTAP, and IEEE80211_CHAN_4MSXMIT o remove private channel flags CHANNEL_DFS and CHANNEL_4MS_LIMIT; these are now set in the constructed net80211 channel o store CHANNEL_NFCREQUIRED (Noise Floor Required) channel attribute in one of the driver-private flag bits of the net80211 channel o move 900MHz frequency mapping into the hal; the mapped frequency is stored in the private channel and used throughout the hal (no more mapping in the driver and/or net80211) o remove ath_hal_mhz2ieee; it's no longer needed as net80211 does the calculation and available in the net80211 channel o change noise floor calibration logic to work with compacted private channel table setup; this may require revisiting as we no longer can distinguish channel attributes (e.g. 11b vs 11g vs turbo) but since the data is used only to calculate status data we can live with it for now o change ah_getChipPowerLimits internal method to operate on a single channel instead of all channels in the private channel table o add ath_hal_gethwchannel to map a net80211 channel to a h/w frequency (always the same except for 900MHz channels) o add HAL_EEBADREG and HAL_EEBADCC status codes to better identify regulatory problems o remove CTRY_DEBUG and CTRY_DEFAULT enum's; these come from net80211 now o change ath_hal_getwirelessmodes to really return wireless modes supported by the hardware (was previously applying regulatory constraints) o return channel interference status with IEEE80211_CHANSTATE_CWINT (should change to a callback so hal api's can take const pointers) o remove some #define's no longer needed with the inclusion of <net80211/_ieee80211.h>
Sponsored by: Carlson Wireless
|
#
186904 |
|
08-Jan-2009 |
sam |
TDMA support for long distance point-to-point links using ath devices: o add net80211 support for a tdma vap that is built on top of the existing adhoc-demo support o add tdma scheduling of frame transmission to the ath driver; it's conceivable other devices might be capable of this too in which case they can make use of the 802.11 protocol additions etc. o add minor bits to user tools that need to know: ifconfig to setup and configure, new statistics in athstats, and new debug mask bits
While the architecture can support >2 slots in a TDMA BSS the current design is intended (and tested) for only 2 slots.
Sponsored by: Intel
|
#
185744 |
|
07-Dec-2008 |
sam |
New periodic calibration scheme needed for 11n parts that have multiple algorithms and potentially collect multiple samples. Instead of a single calibration interval we now have short and long intervals; the long interval roughly corresponds to the previous single interval. The short interval is used to speedup collection of samples and happens much quicker. We make calls using the short interval until we're told the calibration work is complete at which point we fallback to the long interval. In addition there is a much longer reset interval used to flush all calibration state and cause everthing to start anew.
With these changes you can also disable calibration entirely by setting the long interval to zero.
|
#
185522 |
|
01-Dec-2008 |
sam |
Switch to ath hal source code. Note this removes the ath_hal module; the ath module now brings in the hal support. Kernel config files are almost backwards compatible; supplying
device ath_hal
gives you the same chip support that the binary hal did but you must also include
options AH_SUPPORT_AR5416
to enable the extended format descriptors used by 11n parts. It is now possible to control the chip support included in a build by specifying exactly which chips are to be supported in the config file; consult ath_hal(4) for information.
|
#
185242 |
|
23-Nov-2008 |
sam |
nuke special handling of RXORN interrupt; the hal marks the FATAL bit in the interrupt status when RXORN is hit and the chip requires a reset so our special handling was causing useless resets
|
#
184369 |
|
27-Oct-2008 |
sam |
prepare for a new hal
|
#
184368 |
|
27-Oct-2008 |
sam |
o With the addition of HT rates the set of h/w codes has a much wider range making the use of sc_hwmap to do direct mapping impractical. Switch to indexing by the rate index instead of the rate code and adjust associated state and logic appropriately. This has several benefits including simplification of the led code. o fix radiotap capture of HT rates o fix conditional compilation of HT radiotap support to be based on the hal having 5416 support; not the ABI version as hal builds may or may not include 5416 support
|
#
184358 |
|
27-Oct-2008 |
sam |
Fixup statistics: o update tx rssi data only when an ACK was received o return tx rssi from sampled data instead of the last frame o track noise floor o return rx rssi and noise floor (was broken)
|
#
184354 |
|
27-Oct-2008 |
sam |
add sys.dev.ath.X.intmit knob to enable/disable ANI (the intmit name is historical)
|
#
184351 |
|
27-Oct-2008 |
sam |
rename bf_flags to bf_txflags in preparation for the addition of flags separate from the tx descriptor flags currently recorded
|
#
184347 |
|
27-Oct-2008 |
sam |
remove driver-private equivalent of ni_txparms; it's now superfluous
|
#
183221 |
|
20-Sep-2008 |
sam |
fix memory smash on lp64 platforms; mostly noticeable in user mode as being unable to associate
|
#
182893 |
|
09-Sep-2008 |
rpaulo |
Update for new HAL.
Reviewed by: sam
|
#
179401 |
|
28-May-2008 |
sam |
Cleanup power handling and fix suspend/resume: o do not put the chip into full sleep in ath_stop as it gains nothing and causes many parts to hang in ath_detach because we may touch the chip during vap teardown; this may also fix issues with unloading the module o add a note in ath_detach to explain ath_hal_detach puts the chip in low power mode; this is useful to know as it means unloading the module will place a pci device in the lowest possible power state o leave an #ifdef notyet marker for powering down the chip when a device is marked down; we can't do that until we handle all the ways the driver may be entered and touch the chip o fix resume by reloading the h/w key cache as it's been clobbered (for pci) by the socket being powered off; for station mode we directly stop+init the chip and then simulate a beacon miss to get the upper layers sync'd up; for other configs we must brute force stop+start the vaps so they go through the state machine
|
#
178751 |
|
03-May-2008 |
sam |
add back sysctl's to display the regdomain and country code from eeprom; useful for debugging
|
#
178354 |
|
20-Apr-2008 |
sam |
Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware loading to use firmware(9) and a separate module (e.g. ral). Also there no longer are separate wlan_scan* modules; this functionality is now bundled into the wlan module.
Supported by: Hobnob and Marvell Reviewed by: many Obtained from: Atheros (some bits)
|
#
170530 |
|
11-Jun-2007 |
sam |
Update 802.11 wireless support: 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.
|
#
170375 |
|
06-Jun-2007 |
sam |
update copyrights to 2007 and convert to be 2-clause bsd-only
|
#
167252 |
|
05-Mar-2007 |
sam |
Change mtx's to use the formulated name as type so witness does not complain on nested tx q lock acquisitions when processing the cab q.
MFC after: 2 weeks
|
#
166954 |
|
24-Feb-2007 |
sam |
set the antenna switch when fixing the tx antenna using the dev.ath.X.txantenna sysctl; this is typically what folks want but beware this has the side effect of disabling rx diversity
MFC after: 2 weeks
|
#
166016 |
|
15-Jan-2007 |
sam |
add compat shim for ath_hal_isgsmsku until the new hal gets committed
|
#
166013 |
|
14-Jan-2007 |
sam |
Add initial support for 900MHz cards like the Ubiquiti SR9: o eliminate assumptions that half/quarter rate channels on exist in 11a o handle frequency mapping between hal and net80211; hal gives us freq's in the range 2422..2437 that we remap
MFC after: 1 month
|
#
165571 |
|
27-Dec-2006 |
sam |
Add half/quarter rate 11a channel support: o change handling of regdomain-related mib knobs so they can be set post-attach: regdomain, countrycode, outdoor, and xchanmode; the hal will not permit changing the regdomain but we expose it for now o on regdomain/countrycode change recalculate the channel list and push it to the net80211 layer (NB: looks to need more tweaking) o setup rate tables for half/quarter rate channels o honor half/quarter rate channel configs when changing channels o honor half/quarter rate channel configs when setting the slot time o use hack/nonstandard channel numbering scheme for the public safety band to avoid overlapping 2.4G channels on dual-band cards o remove setup of ic_sup_rates; the net80211 layer can do this for us and it simplifies handling of half/quarter rate channels
Tested only in Public Safety Band with cards that have RF5112.
|
#
165185 |
|
13-Dec-2006 |
sam |
Track v0.9.20.3 hal:
o no more ds_vdata in tx/rx descriptors o split h/w tx/rx descriptor from s/w status o as part of the descriptor split change the rate control module api so the ath_buf is passed in to the module so it can fetch both descriptor and status information as needed o add some const poisoning
Also for sample rate control algorithm:
o split debug msgs (node, rate, any) o uniformly bounds check rate indices (and in some cases correct checks) o move array index ops to after bounds checking o use final tsi from the status block instead of the h/w descriptor o replace h/w descriptor struct's with proper mask+shift defs (this doesn't belong here; everything is known by the driver and should just be sent down so there's no h/w-specific knowledge)
MFC after: 1 month
|
#
163187 |
|
09-Oct-2006 |
sam |
correct diag request to fetch isr state on fatal interrupts
MFC after: 1 week
|
#
162410 |
|
18-Sep-2006 |
sam |
Add support for newer parts that do not require separate keycache entries for tx+rx mic keys. This requires a newer hal, but works fine with the current hal in cvs.
MFC after: 2 weeks
|
#
162409 |
|
18-Sep-2006 |
sam |
remove stub radar support; it's never been used and future hal's will not include the calls (due to redesign)
MFC after: 1 week
|
#
161425 |
|
17-Aug-2006 |
imp |
while (0); -> while (0) in multi-line macros
|
#
159938 |
|
26-Jun-2006 |
sam |
Close race in handling mcast traffic when operating as an ap with stations in power save: add a new q where mcast frames are stashed and on beacon update (at DTIM) move frames from the mcast q to the cabq and start it. This ensures the cabq is only manipulated in one place.
Sponsored by: Hobnob MFC after: 2 weeks
|
#
159290 |
|
05-Jun-2006 |
sam |
move hal bus+tag externalization to the bus glue code where it belongs; this is a noop on all current freebsd architectures
MFC after: 1 month
|
#
158298 |
|
05-May-2006 |
sam |
correct type
MFC after: 2 weeks
|
#
156073 |
|
27-Feb-2006 |
sam |
backout 1.136 until we can resolve report that it causes output to stall
|
#
155991 |
|
24-Feb-2006 |
sam |
fix a race whereby a tx descriptor might get reused before the hardware is finished with it; this may only occur when the tx queue is setup as dba-gated but since the fix is cheap apply it to all queues
while here make the queue depth signed for use in assertions
Reviewed by: apatti MFC after: 2 weeks
|
#
155732 |
|
15-Feb-2006 |
sam |
o handle fatal errors directly instead of via the task queue o temporarily dump some h/w state for diagnosis; this will be removed once some issues are resolved
MFC after: 2 weeks
|
#
155515 |
|
10-Feb-2006 |
sam |
Update for rev 0.9.16.16 hal: o add dfs+radar hooks; DFS is presently disabled in the hal o channel and mode handling changes o various api changes o be more aggressive about iq calibration settling so ap mode operation is better immediately after startup o rfkill/rfsilent sysctl support o tpc ack/cts sysctl support
MFC after: 2 weeks
|
#
155496 |
|
09-Feb-2006 |
sam |
Beacon timer setup fixes: o pull nexttbtt forward in adhoc mode too o resync beacon timers on joining a bss or ibss as the tstamp we collected while scanning is almost certainly out of date
Note we may need to refine the ibss mode check in ath_recv_mgmt.
Reviewed by: avatar, dyoung Obtained from: atheros MFC after: 2 weeks
|
#
155492 |
|
09-Feb-2006 |
sam |
Phantom beacon miss workaround: track the tsf of the last received frame and if we get a beacon miss interrupt ignore it if we've received a frame within the beacon miss interval. This should never trigger and the handling at the net80211 layer should likewise deal with this but it doesn't hurt and can suppress extranous probe request frames. Note that we can legtimately get a bmiss when under heavy load.
MFC after: 2 weeks
|
#
155491 |
|
09-Feb-2006 |
sam |
use a private task queue thread
MFC after: 2 weeks
|
#
155490 |
|
09-Feb-2006 |
sam |
add adhoc demo mode support
MFC after: 2 weeks
|
#
155489 |
|
09-Feb-2006 |
sam |
make regdomain sysctl r/w in case it's possible to do this in the future
MFC after: 2 weeks
|
#
155486 |
|
09-Feb-2006 |
sam |
add tx99 hooks
MFC after: 2 weeks
|
#
155485 |
|
09-Feb-2006 |
sam |
move hal statistics to softc; the per-node stats are overkill, they're only used when operating in station mode
MFC after: 2 weeks
|
#
155483 |
|
09-Feb-2006 |
sam |
honor net80211 mcast tx rate
MFC after: 2 weeks
|
#
155482 |
|
09-Feb-2006 |
sam |
craft unique names for tx q + buffer mtx's to help with interpreting ktr data
MFC after: 2 weeks
|
#
155481 |
|
09-Feb-2006 |
sam |
allow the size of tx+rx buffer pools to be tuned
MFC after: 2 weeks
|
#
155480 |
|
09-Feb-2006 |
sam |
lower try count on mgt (and ctl) frames to avoid clogging the tx queue and loading the bss when operating in ap mode under load; adjust recognition of multi-rate retry to match
MFC after: 2 weeks
|
#
155477 |
|
09-Feb-2006 |
sam |
move mgt frame tx rate responsibility from the rate control modules to the driver; this avoids redundant logic and will be necessary for future additions
MFC after: 2 weeks
|
#
154140 |
|
09-Jan-2006 |
sam |
Update monitoring support: o record tsf in tx+rx frames o switch from raw rssi to dbm for signal data and record both signal and noise floor data (hacked for now to assume a fixed noise floor; is correct with new hal) o add monpass sysctl to control which rx'd frames are passed up with errors; especially useful to see frames with CRC errors o mark 'd packets w/ a CRC error with radiotap's BADFCS flag
Also add placeholder code for calibrating the noise floor when using newer hals.
Reviewed by: avatar MFC after: 1 week
|
#
152448 |
|
15-Nov-2005 |
sam |
nuke special handling to extend cts when bursting; it was race prone
MFC after: 7 days
|
#
148863 |
|
08-Aug-2005 |
sam |
Split crypto tx+rx key indices and add a key index -> node mapping table:
Crypto changes: o change driver/net80211 key_alloc api to return tx+rx key indices; a driver can leave the rx key index set to IEEE80211_KEYIX_NONE or set it to be the same as the tx key index (the former disables use of the key index in building the keyix->node mapping table and is the default setup for naive drivers by null_key_alloc) o add cs_max_keyid to crypto state to specify the max h/w key index a driver will return; this is used to allocate the key index mapping table and to bounds check table loookups o while here introduce ieee80211_keyix (finally) for the type of a h/w key index o change crypto notifiers for rx failures to pass the rx key index up as appropriate (michael failure, replay, etc.)
Node table changes: o optionally allocate a h/w key index to node mapping table for the station table using the max key index setting supplied by drivers (note the scan table does not get a map) o defer node table allocation to lateattach so the driver has a chance to set the max key id to size the key index map o while here also defer the aid bitmap allocation o add new ieee80211_find_rxnode_withkey api to find a sta/node entry on frame receive with an optional h/w key index to use in checking mapping table; also updates the map if it does a hash lookup and the found node has a rx key index set in the unicast key; note this work is separated from the old ieee80211_find_rxnode call so drivers do not need to be aware of the new mechanism o move some node table manipulation under the node table lock to close a race on node delete o add ieee80211_node_delucastkey to do the dirty work of deleting unicast key state for a node (deletes any key and handles key map references)
Ath driver: o nuke private sc_keyixmap mechansim in favor of net80211 support o update key alloc api
These changes close several race conditions for the ath driver operating in ap mode. Other drivers should see no change. Station mode operation for ath no longer uses the key index map but performance tests show no noticeable change and this will be fixed when the scan table is eliminated with the new scanning support.
Tested by: Michal Mertl, avatar, others Reviewed by: avatar, others MFC after: 2 weeks
|
#
148362 |
|
24-Jul-2005 |
sam |
o fix setup of sc_diversity; the hal does not give us reliable status after attach, only after a reset o when setting diversity via the sysctl don't update sc_diversity until we know the hal requested worked o while here eliminate sc_hasdiversity and sc_hastpc; just query the hal each time since these are the only places we need to know
MFC after: 3 days
|
#
147803 |
|
06-Jul-2005 |
sam |
only invoke ath_rate_tx_complete to update rate control state when the frame being sent is to be ack'd and hasn't been filtered by the h/w; this insures we don't pass in tx descriptors that have no meaningful state (e.g. mcast/bcast frames are not acked and so have no tx retry counts)
Approved by: re (scottl) Obtained from: Atheros
|
#
147256 |
|
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
#
147067 |
|
06-Jun-2005 |
sam |
Set the correct IFS parameters for the beacon tx queue when operating in ap and adhoc modes.
|
#
147057 |
|
06-Jun-2005 |
sam |
Misc keycache changes: o purge ath_initkeytable; it's not needed o add multicast key search support for supporting multiple group keys (disabled for now; requires updated hal) o create keycache entry for stations using open auth so they get h/w antenna management support o add keycache -> node mapping table; eliminates mac-based lookup in the net80211 layer
|
#
144961 |
|
12-Apr-2005 |
sam |
honor new IEEE80211_KEY_GROUP key flag
Reviewed by: Tai-hwa Liang
|
#
144617 |
|
04-Apr-2005 |
sam |
use frame type returned by ieee80211_input to drive softled code instead of monitoring the input packet count
|
#
144346 |
|
30-Mar-2005 |
sam |
o extend cts to cover packet burst when operating in 11g w/ protection o check current channel parameters, not shadow state, for acm policy on data frames
|
#
140761 |
|
24-Jan-2005 |
sam |
Fixup radiotap handling of FCS and QoS frames per discussion with David Young: o mark rx frames including FCS in the payload with the IEEE80211_RADIOTAP_F_FCS flag o remove hack to copy 802.11 headers with padding out of line; instead mark the frames with IEEE80211_RADIOTAP_F_DATAPAD and require applications to do the work o split precalculated radiotap flags into tx+rx now that they can be different
Note the full usefulness of these changes depends on updates to applications that process radiotap data.
|
#
140438 |
|
18-Jan-2005 |
sam |
adjust tx buffer allocation based on empirical testing: o increase the max per-frame tx descriptor count and the number of tx buffers for forthcoming fast frame support o correct the max scatter/gather count; it cannot be larger than the max(tx,rx,beacon) descriptor counts
|
#
140432 |
|
18-Jan-2005 |
sam |
better led blinking
|
#
139530 |
|
31-Dec-2004 |
sam |
bump copyright for 2005
|
#
139500 |
|
31-Dec-2004 |
sam |
Radiotap fixups: o catch one place where we were not using ath_chan_change to switch channels; this fixes a problem where the channel settings were not being correctly reported in captured packets o return unique channel identification in the channel flags; ethereal gets confused if you return merged flags (e.g. ofdm, cck, and 2Ghz) (this is workaround and should be removed if we can ever cleanup radiotap consumers) o correct short/long preamble flag state for rx and treat tx the same--use a new hwflags array that gives us the data based on the h/w rate index/cookie o add gross hack to handle radiotap capture of frames that come in with hardware padding; should be replaced by a flag in the radiotap header and more smarts in the apps that decode radiotap data
|
#
138570 |
|
08-Dec-2004 |
sam |
Update with last year of work.
|
#
127784 |
|
03-Apr-2004 |
sam |
do proper subclassing of node free+copy; the previous hack falls apart when the 802.11 layer does useful work
Obtained from: madwifi
|
#
127781 |
|
02-Apr-2004 |
sam |
transmit beacon frames directly instead of defering them to a swi; there was too much delay
Obtained from: madwifi
|
#
127780 |
|
02-Apr-2004 |
sam |
update copyright notice for 2004
|
#
127698 |
|
31-Mar-2004 |
sam |
radiotap updates:
o force little-endian byte order for header o pad header to 32-bit boundary to guard against applications that assume packet data alignment
|
#
123044 |
|
28-Nov-2003 |
sam |
o track API change for HAL v0.9.6.1 o fix race condition when processing rx descriptors: because we use a self-linked descriptor at the end of the rx descriptor list to avoid rx overruns (which can easily happen for 5212 parts that enable PHY errors) we must carefully check that a descriptor is "done" by looking ahead to the next descriptor before believing the done bit in the current descriptor (this is all handled in the HAL since the rx descriptor format is chip-specific so we need to pass in two additional parameters--the physical address of the current descriptor and the virtual address of the next descriptor in the list) o check copyout return status for SIOCGATHSTATS ioctl
Approved by: re (scottl)
|
#
121100 |
|
14-Oct-2003 |
sam |
o convert mutex calls to #defines for portability, etc. o destroy mutex's on detach (was missing)
|
#
120105 |
|
15-Sep-2003 |
sam |
Maintain a history of data associated with received frames and use this to calculate smoothed signal quality data for each node.
o add a 16-deep history buffer to each driver-private node storage that holds rssi and antenna info for received frames o override the default per-node "get rssi" method to return an average rssi value based on samples collected over the last second o enable beacon reception so even idle systems maintain a running history of signal quality
This data may also be useful for improving the rate control algorithm. Based on work by Tom Marshall <tommy@home.tig-grr.com> for MADWIFI.
|
#
120071 |
|
14-Sep-2003 |
sam |
o mark the device capable of short preamble (meaningless for the 5210 but safe since the 802.11 layer does the right thing for 11a operation) o select short preamble operation based on the negotiated capabilities; not just the local state/capability o fillin the duration field in the 802.11 header as appropriate o remove detection of 11g support; no longer needed
Obtained from: MADWIFI (with modifications)
|
#
119783 |
|
05-Sep-2003 |
sam |
Add support for the experimental radiotap capture format. With this we no longer need the debugging code to dump packets.
|
#
119150 |
|
19-Aug-2003 |
sam |
MFp4 changes to fix locking issues and correct reference count handling of station entries in hostap mode:
Input path:
o driver is now expected to find the node associated with the sender of a received frame; use ic_bss if none is located o driver passes the (referenced) node into ieee80211_input for use within the wlan module and is responsible for cleaning up on return o the antenna state is no longer passed up with each frame; this is now considered driver-private state and drivers are responsible for keeping it in the driver-private part of a node
Output path:
Revamp output path for management frames to eliminate redundant locking that causes problems and to correct reference counting bogosity that occurs when stations are timed out due to inactivity (in AP mode). On output the refcnt'd node is stashed in the pkthdr's recvif field (yech) and retrieved by the driver. This eliminates an unref/ref scenario and related node table unlock/lock due to the driver looking up the node. This is particularly important when stations are timed out as this causes a lock order reversal that can result in a deadlock. As a byproduct we also reduce the overhead for sending management frames (minimal). Additional fallout from this is a change to ieee80211_encap to return a refcn't node for tieing to the outbound frame. Node refcnts are not reclaimed until after a frame is completely processed (e.g. in the tx interrupt handler). This is especially important for timed out stations as this deref will be the final one causing the node entry to be reclaimed.
Additional semi-related changes: o replace m_copym use with m_copypacket (optimization) o add assert to verify ic_bss is never free'd during normal operation o add comments explaining calling conventions by drivers for frames going in each direction o remove extraneous code that "cannot be executed" (e.g. because pointers may never be null)
|
#
119144 |
|
19-Aug-2003 |
sam |
maintain a table for mapping hardware rate codes to 802.11 rates for calculating the rate for each rx'd frame
|
#
117812 |
|
20-Jul-2003 |
sam |
track changes to 802.11 code:
o override new_state method per new model o use ieee80211_state_name instead of private copy
|
#
117516 |
|
13-Jul-2003 |
sam |
o add read-only sysctls to view regulatory domain, country code, and outdoor use controls o use sysctl-visible values in setting up channel list
|
#
116743 |
|
23-Jun-2003 |
sam |
Atheros 802.11 driver. Requires Atheros Hardware Access Lay (HAL).
Supported by: Atheros Comunications
|