<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/ath/ath_hal, branch release/12.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-09-10T19:00:17Z</updated>
<entry>
<title>MFC r344749-344750,344841-344843,345284,346405,346470,347140-347141,348331,</title>
<updated>2020-09-10T19:00:17Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2020-09-10T19:00:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=15a31d4c1a7da894840315916b3011190cc3e7c7'/>
<id>urn:sha1:15a31d4c1a7da894840315916b3011190cc3e7c7</id>
<content type='text'>
    349593,351868,353506-353507,353809,353853,353858,353860,356852,359063,
    359158,360819,360888,360950-360951,360953-360954,360998,361009,361025,
    361085,361087,361098,361106-361107,361115,361118,361319-361321,361486,
    361560,361566,361626,361636-361637,361687,361726,361737-361738,361768,
    361778,361811-361813,361819-361822,361825-361826,361834,361863-361864,
    361878,361885-361886,362016,362084-362085,362156-362157,362161-362162,
    362210-362213,362216,362256-362257,362671,362815-362816,363325,
    363327-363328,364011-364012,364299,364301,364303,364312,364315,
    364326-364327,364551,364553,364673,365097,365116,365125-365126,
    365130-365131,365198,365419
  by adrian(78), bcran(1), bz(13), cem(1), gavin(1), glebius(6),
     landonf(1), mjg(7)

Merge WiFi net80211, drivers, and management in order to support better 11n
and upcoming 11ac.

This includes an ath(4) update, some run(4) 11n support, 11n for otus(4),
A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options, scanning fixes,
enahnced PRIV checks for jails, restored parent device name printing,
improvements for upcoming VHT support, lots of under-the-hood infrastructure
improvements, new device ID, debug tools updates, some whistespace changes
(to make future MFCs easier).

This does not include (nost) epoch(9) related changes as too much other
infrastructure was not merged for that.

Bump __FreeBSD_veresion as this changes the priv(9) names (not know to be
used externally), and net80211 structures.

Tested on:	some ath(4) AP, run(4) STA, and rtwn(4) STA
Discussed with:	adrian (extremly briefly)
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate") [partially]
Relnotes:	yes
</content>
</entry>
<entry>
<title>[ath_hal] Return failure if noise floor calibration fails.</title>
<updated>2018-06-08T18:21:57Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-06-08T18:21:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a97beff9839557b5baf2817e3f201133feeb1df'/>
<id>urn:sha1:8a97beff9839557b5baf2817e3f201133feeb1df</id>
<content type='text'>
If we fail noise floor calibration then we may end up with a deaf NIC
which we can't recover without a full chip reset.

Earlier chips seem to get less stuck in this condition versus AR9280/later
and AR9300/later, but whilst here just fix up the AR5212 era chips to also
return NF calibration failures.

This HAL routine would only return failure if the channel was not configured.

This is a no-op until the driver side code for doing resets and the HAL
code for being told about the reset type (and then handling it!) is
implemented.

Tested:

* AR9280, STA mode
* AR2425, STA mode
* AR9380, STA mode
</content>
</entry>
<entry>
<title>[ath_hal] Don't do ANI processing if we've reset.</title>
<updated>2018-06-08T18:15:23Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-06-08T18:15:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7b1c2c4ec25d2e80ffa3417cc2dff36f66b9fa25'/>
<id>urn:sha1:7b1c2c4ec25d2e80ffa3417cc2dff36f66b9fa25</id>
<content type='text'>
If we've reset then we can't trust the current state of the ANI tracking,
so just wait until next time.

Tested:

* AR5424, STA mode (2GHz)
</content>
</entry>
<entry>
<title>[ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal.</title>
<updated>2018-05-25T01:27:39Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2018-05-25T01:27:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a861b06b97b838e5905bfb644ebafa65bf75e930'/>
<id>urn:sha1:a861b06b97b838e5905bfb644ebafa65bf75e930</id>
<content type='text'>
I'm in the process of reworking how the reset path works with an eye
to better recovery when the chips hang and/or go RF/PHY deaf.
This is the first step in a lot of unification and API changes.
</content>
</entry>
<entry>
<title>SPDX: license IDs for some ISC-related files.</title>
<updated>2017-12-08T15:57:29Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-12-08T15:57:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6e778a7efdc0e804471750157f6bacd1ef7d1580'/>
<id>urn:sha1:6e778a7efdc0e804471750157f6bacd1ef7d1580</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>urn:sha1:718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>Increase timeout in Atheros HAL</title>
<updated>2017-05-29T09:21:38Z</updated>
<author>
<name>Wojciech Macek</name>
<email>wma@FreeBSD.org</email>
</author>
<published>2017-05-29T09:21:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=71083394495f64ce830c97ed5587b9d712ba5d4f'/>
<id>urn:sha1:71083394495f64ce830c97ed5587b9d712ba5d4f</id>
<content type='text'>
It turned out, that some models of the Atheros PCIe
adapters (e.g. AR983x family) may fail to attach
due to insufficient timeout value.

Submitted by:   Bartosz Szczepanek &lt;bsz@semihalf.com&gt;
Obtained from:  Semihalf
Sponsored by:   Stormshield
Reviewed by:    adrian
Differential revision: https://reviews.freebsd.org/D10903
</content>
</entry>
<entry>
<title>[ath] [ath_hal] retire AH_SUPPORT_AR5416 changing anything.</title>
<updated>2017-05-25T04:26:26Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2017-05-25T04:26:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f46839b9e307390fd4e9e51746f07aae6c521d1d'/>
<id>urn:sha1:f46839b9e307390fd4e9e51746f07aae6c521d1d</id>
<content type='text'>
Yes, the memory bloat is large, but it's 2017 and I'll fix it later
by making it runtime configurable / per-chip configurable if I ever need to.
</content>
</entry>
<entry>
<title>[ath] [ath_hal] (etc, etc) - begin the task of re-modularising the HAL.</title>
<updated>2017-05-25T04:18:46Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2017-05-25T04:18:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=41059135ce931c0f1014a999ffabc6bc470ce856'/>
<id>urn:sha1:41059135ce931c0f1014a999ffabc6bc470ce856</id>
<content type='text'>
In the deep past, when this code compiled as a binary module, ath_hal
built as a module.  This allowed custom, smaller HAL modules to be built.
This was especially beneficial for small embedded platforms where you
didn't require /everything/ just to run.

However, sometime around the HAL opening fanfare, the HAL landed here
as one big driver+HAL thing, and a lot of the (dirty) infrastructure
(ie, #ifdef AH_SUPPORT_XXX) to build specific subsets of the HAL went away.
This was retained in sys/conf/files as "ath_hal_XXX" but it wasn't
really floated up to the modules themselves.

I'm now in a position where for the reaaaaaly embedded boards (both the
really old and the last couple generation of QCA MIPS boards) having a
cut down HAL module and driver loaded at runtime is /actually/ beneficial.

This reduces the kernel size down by quite a bit.  The MIPS modules look
like this:

adrian@gertrude:~/work/freebsd/head-embedded/src % ls -l ../root/mips_ap/boot/kernel.CARAMBOLA2/ath*ko
-r-xr-xr-x  1 adrian  adrian    5076 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_dfs.ko
-r-xr-xr-x  1 adrian  adrian  100588 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal.ko
-r-xr-xr-x  1 adrian  adrian  627324 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal_ar9300.ko
-r-xr-xr-x  1 adrian  adrian  314588 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_main.ko
-r-xr-xr-x  1 adrian  adrian   23472 May 23 23:45 ../root/mips_ap/boot/kernel.CARAMBOLA2/ath_rate.ko

And the x86 versions, like this:

root@gertrude:/home/adrian # ls -l /boot/kernel/ath*ko
-r-xr-xr-x  1 root  wheel   36632 May 24 18:32 /boot/kernel/ath_dfs.ko
-r-xr-xr-x  1 root  wheel  134440 May 24 18:32 /boot/kernel/ath_hal.ko
-r-xr-xr-x  1 root  wheel   82320 May 24 18:32 /boot/kernel/ath_hal_ar5210.ko
-r-xr-xr-x  1 root  wheel  104976 May 24 18:32 /boot/kernel/ath_hal_ar5211.ko
-r-xr-xr-x  1 root  wheel  236144 May 24 18:32 /boot/kernel/ath_hal_ar5212.ko
-r-xr-xr-x  1 root  wheel  336104 May 24 18:32 /boot/kernel/ath_hal_ar5416.ko
-r-xr-xr-x  1 root  wheel  598336 May 24 18:32 /boot/kernel/ath_hal_ar9300.ko
-r-xr-xr-x  1 root  wheel  406144 May 24 18:32 /boot/kernel/ath_main.ko
-r-xr-xr-x  1 root  wheel   55352 May 24 18:32 /boot/kernel/ath_rate.ko

.. so you can see, not building the whole HAL can save quite a bit.
For example, if you don't need AR9300 support, you can actually avoid
wasting half a megabyte of RAM.  On embedded routers this is quite a
big deal.

The AR9300 HAL can be later further shrunk because, hilariously,
it indeed supports AH_SUPPORT_&lt;xxx&gt; for optionally adding chipset support.
(I'll chase that down later as it's quite a big savings if you're only
building for a single embedded target.)

So:

* Create a very hackish way to load/unload HAL modules
* Create module metadata for each HAL subtype - ah_osdep_arXXXX.c
* Create module metadata for ath_rate and ath_dfs (bluetooth is
  currently just built as part of it)
* .. yes, this means we could actually build multiple rate control
  modules and pick one at load time, but I'd rather just glue this
  into net80211's rate control code.  Oh well, baby steps.
* Main driver is now "ath_main"
* Create an "if_ath" module that does what the ye olde one did -
  load PCI glue, main driver, HAL and all child modules.
  In this way, if you have "if_ath_load=YES" in /boot/modules.conf
  it will load everything the old way and stuff should still work.
* For module autoloading purposes, I actually /did/ fix up
  the name of the modules in if_ath_pci and if_ath_ahb.

If you want to selectively load things (eg on ye cheape ARM/MIPS platforms
where RAM is at a premium) you should:

* load ath_hal
* load the chip modules in question
* load ath_rate, ath_dfs
* load ath_main
* load if_ath_pci and/or if_ath_ahb depending upon your particular
  bus bind type - this is where probe/attach is done.

TODO:

* AR5312 module and associated pieces - yes, we have the SoC side support
  now so the wifi support would be good to "round things out";
* Just nuke AH_SUPPORT_AR5416 for now and always bloat the packet
  structures; this'll simplify other things.
* Should add a simple refcnt thing to the HAL RF/chip modules so you
  can't unload them whilst you're using them.
* Manpage updates, UPDATING if appropriate, etc.
</content>
</entry>
<entry>
<title>Renumber copyright clause 4</title>
<updated>2017-02-28T23:42:47Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2017-02-28T23:42:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fbbd9655e5107c68e4e0146ff22b73d7350475bc'/>
<id>urn:sha1:fbbd9655e5107c68e4e0146ff22b73d7350475bc</id>
<content type='text'>
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</content>
</entry>
</feed>
