sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
Add a per-node rate control routine for each rate control module.For now, the only module implement is 'sample', and that's only partiallyimplemented. The main issue here with reusing this struct
Add a per-node rate control routine for each rate control module.For now, the only module implement is 'sample', and that's only partiallyimplemented. The main issue here with reusing this structure in userlandis that it uses 'rix' everywhere, which requires the userland code tohave access to the current HAL rate table.For now, this is a very large work in progress.Specific details:* The rate control information is per-node at the moment and wrapped in a TLV, to ease parsing and backwards compatibility.* .. but so I can be slack for now, the userland statistics are just a copy of the kernel-land sample node state.* However, for now use a temporary copy and change the rix entries to dot11rate entries to make it slightly easier to eyeball.Problems:* The actual rate information table is unfortunately indexed by rix and it doesn't contain a rate code. So the userland side of this currently has no way to extract out a mapping.TODO:* Add a TLV payload to dump out the rate control table mapping so 'rix' can be turned into a dot11 / MCS rate.* .. then remove the temporary copy.
In a complete lack of foresight on my part, my previous commit brokethe assumption that ath_softc doesn't change size based on build timeconfiguration.I picked up on this because suddenly radar s
In a complete lack of foresight on my part, my previous commit brokethe assumption that ath_softc doesn't change size based on build timeconfiguration.I picked up on this because suddenly radar stuff didn't work; andalthough the ath_dfs code was setting sc_dodfs=1, the main ath driversaw sc_dodfs=0.So for now, include opt_ath.h in driver source files. This seems likethe sane thing to do anyway.I'll have to do a pass over the code at some later stage and turnthe radiotap TX/RX structs into malloc'ed memory, rather than in-lineinside of ath_softc. I'd rather like to keep ath_softc the samelayout regardless of configuration parameters.Pointy hat to: adrian
Introduce TX aggregation and software TX queue managementfor Atheros AR5416 and later wireless devices.This is a very large commit - the complete history can befound in the user/adrian/if_ath_tx
Introduce TX aggregation and software TX queue managementfor Atheros AR5416 and later wireless devices.This is a very large commit - the complete history can befound in the user/adrian/if_ath_tx branch.Legacy (ie, pre-AR5416) devices also use the per-softwareTXQ support and (in theory) can support non-aggregationADDBA sessions. However, the net80211 stack doesn't currentlysupport this.In summary:TX path:* queued frames normally go onto a per-TID, per-node queue* some special frames (eg ADDBA control frames) are thrown directly onto the relevant hardware queue so they can go out before any software queued frames are queued.* Add methods to create, suspend, resume and tear down an aggregation session.* Add in software retransmission of both normal and aggregate frames.* Add in completion handling of aggregate frames, including parsing the block ack bitmap provided by the hardware.* Write an aggregation function which can assemble frames into an aggregate based on the selected rate control and channel configuration.* The per-TID queues are locked based on their target hardware TX queue. This matches what ath9k/atheros does, and thus simplified porting over some of the aggregation logic.* When doing TX aggregation, stick the sequence number allocation in the TX path rather than net80211 TX path, and protect it by the TXQ lock.Rate control:* Delay rate control selection until the frame is about to be queued to the hardware, so retried frames can have their rate control choices changed. Frames with a static rate control selection have that applied before each TX, just to simplify the TX path (ie, not have "static" and "dynamic" rate control special cased.)* Teach ath_rate_sample about aggregates - both completion and errors.* Add an EWMA for tracking what the current "good" MCS rate is based on failure rates.Misc:* Introduce a bunch of dirty hacks and workarounds so TID mapping and net80211 frame inspection can be kept out of the net80211 layer. Because of the way this code works (and it's from Atheros and Linux ath9k), there is a consistent, 1:1 mapping between TID and AC. So we need to ensure that frames going to a specific TID will _always_ end up on the right AC, and vice versa, or the completion/locking will simply get very confused. I plan on addressing this mess in the future.Known issues:* There is no BAR frame transmission just yet. A whole lot of tidying up needs to occur before BAR frame TX can occur in the "correct" place - ie, once the TID TX queue has been drained.* Interface reset/purge/etc results in frames in the TX and RX queues being removed. This creates holes in the sequence numbers being assigned and the TX/RX AMPDU code (on either side) just hangs.* There's no filtered frame support at the present moment, so stations going into power saving mode will simply have a number of frames dropped - likely resulting in a traffic "hang".* Raw frame TX is going to just not function with 11n aggregation. Likely this needs to be modified to always override the sequence number if the frame is going into an aggregation session. However, general raw frame injection currently doesn't work in general in net80211, so let's just ignore this for now until this is sorted out.* HT protection is just not implemented and won't be until the above is sorted out. In addition, the AR5416 has issues RTS protecting large aggregates (anything >8k), so the work around needs to be ported and tested. Thus, this will be put on hold until the above work is complete.* The rate control module 'sample' is the only currently supported module; onoe/amrr haven't been tested and have likely bit rotted a little. I'll follow up with some commits to make them work again for non-11n rates, but they won't be updated to handle 11n and aggregation. If someone wishes to do so then they're welcome to send along patches.* .. and "sample" doesn't really do a good job of 11n TX. Specifically, the metrics used (packet TX time and failure/success rates) isn't as useful for 11n. It's likely that it should be extended to take into account the aggregate throughput possible and then choose a rate which maximises that. Ie, it may be acceptable for a higher MCS rate with a higher failure to be used if it gives a more acceptable throughput/latency then a lower MCS rate @ a lower error rate. Again, patches will be gratefully accepted.Because of this, ATH_ENABLE_11N is still not enabled by default.Sponsored by: Hobnob, Inc.Obtained from: Linux, Atheros
Add a new method to the rate control modules which extract out thethree other rates and try counts.The 11n rate scenario path wants to take a list of rate and tries,rather than calling setupxtxde
Add a new method to the rate control modules which extract out thethree other rates and try counts.The 11n rate scenario path wants to take a list of rate and tries,rather than calling setupxtxdesc().
remove module glue, it's not used any more
Switch to ath hal source code. Note this removes the ath_halmodule; the ath module now brings in the hal support. Kernelconfig files are almost backwards compatible; supplyingdevice ath_halgiv
Switch to ath hal source code. Note this removes the ath_halmodule; the ath module now brings in the hal support. Kernelconfig files are almost backwards compatible; supplyingdevice ath_halgives you the same chip support that the binary hal did but youmust also includeoptions AH_SUPPORT_AR5416to enable the extended format descriptors used by 11n parts.It is now possible to control the chip support included in abuild by specifying exactly which chips are to be supportedin the config file; consult ath_hal(4) for information.
remove driver-private equivalent of ni_txparms; it's now superfluous
now that the new association callback is used when joining a bss we caneliminate the ath_rate_newassoc callback and associated code
Multi-bss (aka vap) support for 802.11 devices.Note this includes changes to all drivers and moves some device firmwareloading to use firmware(9) and a separate module (e.g. ral). Also thereno l
Multi-bss (aka vap) support for 802.11 devices.Note this includes changes to all drivers and moves some device firmwareloading to use firmware(9) and a separate module (e.g. ral). Also thereno longer are separate wlan_scan* modules; this functionality is nowbundled into the wlan module.Supported by: Hobnob and MarvellReviewed by: manyObtained from: Atheros (some bits)
First in a series of changes to remove the now-unused Giant compatibilityframework for non-MPSAFE network protocols:- Remove debug_mpsafenet variable, sysctl, and tunable.- Remove NET_NEEDS_GIANT
First in a series of changes to remove the now-unused Giant compatibilityframework for non-MPSAFE network protocols:- Remove debug_mpsafenet variable, sysctl, and tunable.- Remove NET_NEEDS_GIANT() and associate SYSINITSs used by it to force debug.mpsafenet=0 if non-MPSAFE protocols are compiled into the kernel.- Remove logic to automatically flag interrupt handlers as non-MPSAFE if debug.mpsafenet is set for an INTR_TYPE_NET handler.- Remove logic to automatically flag netisr handlers as non-MPSAFE if debug.mpsafenet is set.- Remove references in a few subsystems, including NFS and Cronyx drivers, which keyed off debug_mpsafenet to determine various aspects of their own locking behavior.- Convert NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), and NET_ASSERT_GIANT into no-op's, as their entire behavior was determined by the value in debug_mpsafenet.- Alias NET_CALLOUT_MPSAFE to CALLOUT_MPSAFE.Many remaining references to NET_.*_GIANT() and NET_CALLOUT_MPSAFE are stillpresent in subsystems, and will be removed in followup commits.Reviewed by: bz, jhbApproved by: re (kensmith)
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
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 changeso make scanning support independent of the state machine to enable background scanning and roamingo move scanning support into loadable modules based on the operating mode to enable different policies and reduce the memory footprint on systems w/ constrained resourceso add background scanning in station mode (no support for adhoc/ibss mode yet)o significantly speedup sta mode scanning with a variety of techniqueso 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 apo add tx fragmentation supporto 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 applicationso adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates prepending mbufs for traffic generated locallyo 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 supporto change all data types from bsd-style to posix-styleo propagate noise floor data from drivers to net80211 and on to user appso correct various issues in the sta mode state machine related to handling authentication and association failureso 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 appso 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 operationo add extended channel specifications to radiotap to enable 11n sniffingDrivers: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 onlyo ndis: lightly testedo ipw: lightly testedo 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 datao wi: lightly testedThis work is based on contributions by Atheros, kmacy, sephe, thompsa,mlaier, kevlo, and others. Much of the scanning work was supported byAtheros. The 11n work was supported by Marvell.
Track v0.9.20.3 hal:o no more ds_vdata in tx/rx descriptorso split h/w tx/rx descriptor from s/w statuso as part of the descriptor split change the rate control module api so the ath_buf is pas
Track v0.9.20.3 hal:o no more ds_vdata in tx/rx descriptorso split h/w tx/rx descriptor from s/w statuso 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 neededo add some const poisoningAlso 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 checkingo use final tsi from the status block instead of the h/w descriptoro 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
move mgt frame tx rate responsibility from the rate control modulesto the driver; this avoids redundant logic and will be necessaryfor future additionsMFC after: 2 weeks
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andIFF_DRV_RUNNING, as well as the move from ifnet.if_flags toifnet.if_drv_flags. Device drivers are now responsible forsynchron
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andIFF_DRV_RUNNING, as well as the move from ifnet.if_flags toifnet.if_drv_flags. Device drivers are now responsible forsynchronizing access to these flags, as they are in if_drv_flags. Thishelps prevent races between the network stack and device driver inmaintaining the interface flags field.Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;some less so.Reviewed by: pjd, bzMFC after: 7 days
diff reduction against p4: define IEEE80211_FIXED_RATE_NONE and useit instead of -1
Stop embedding struct ifnet at the top of driver softcs. Instead thestruct ifnet or the layer 2 common structure it was embedded in havebeen replaced with a struct ifnet pointer to be filled by a c
Stop embedding struct ifnet at the top of driver softcs. Instead thestruct ifnet or the layer 2 common structure it was embedded in havebeen replaced with a struct ifnet pointer to be filled by a call to thenew function, if_alloc(). The layer 2 common structure is also allocatedvia if_alloc() based on the interface type. It is hung off the newstruct ifnet member, if_l2com.This change removes the size of these structures from the kernel ABI andwill 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
nuke unintentional use of HAL_BOOL type
rev rate control api to pass the both the first+last tx descriptorsto the rate control module for tx complete processing; this enablesrate control algorithms to extract the packet length for xmits
rev rate control api to pass the both the first+last tx descriptorsto the rate control module for tx complete processing; this enablesrate control algorithms to extract the packet length for xmits thatrequire multiple descriptors
simplify callback
statically allocate the station/neighbor node table; the deferredallocation scheme introduced a race condition during device statetransitions
bump copyright for 2005
Like on the ath_rate_onoe component, make this compile on amd64. Convertpointers to an integer via uintptr_t.Fix an apparent bug that caused a compile failure.ieee80211_iterate_nodes() takes ic-
Like on the ath_rate_onoe component, make this compile on amd64. Convertpointers to an integer via uintptr_t.Fix an apparent bug that caused a compile failure.ieee80211_iterate_nodes() takes ic->ic_sta as its first argument on theonoe module. It had just 'ic' here in the same context, which was amismatched argument.
Transmit rate control modules for the ath driver.