#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
272292 |
|
30-Sep-2014 |
adrian |
Add initial support for the AR9485 CUS198 / CUS230 variants.
These variants have a few differences from the default AR9485 NIC, namely:
* a non-default antenna switch config; * slightly different RX gain table setup; * an external XLNA hooked up to a GPIO pin; * (and not yet done) RSSI threshold differences when doing slow diversity.
To make this possible:
* Add the PCI device list from Linux ath9k, complete with vendor and sub-vendor IDs for various things to be enabled; * .. and until FreeBSD learns about a PCI device list like this, write a search function inspired by the USB device enumeration code; * add HAL_OPS_CONFIG to the HAL attach methods; the HAL can use this to initialise its local driver parameters upon attach; * copy these parameters over in the AR9300 HAL; * don't default to override the antenna switch - only do it for the chips that require it; * I brought over ar9300_attenuation_apply() from ath9k which is cleaner and easier to read for this particular NIC.
This is a work in progress. I'm worried that there's some post-AR9380 NIC out there which doesn't work without the antenna override set as I currently haven't implemented bluetooth coexistence for the AR9380 and later HAL. But I'd rather have this code in the tree and fix it up before 11.0-RELEASE happens versus having a set of newer NICs in laptops be effectively RX deaf.
Tested:
* AR9380 (STA) * AR9485 CUS198 (STA)
Obtained from: Qualcomm Atheros, Linux ath9k
|
#
244943 |
|
01-Jan-2013 |
adrian |
Bring over the basic spectral scan framework code from Qualcomm Atheros.
This includes the HAL routines to setup, enable/activate/disable spectral scan and configure the relevant registers.
This still requires driver interaction to enable spectral scan reporting. Specifically:
* call ah_spectralConfigure() to configure and enable spectral scan; * .. there's currently no way to disable spectral scan... that will have to follow. * call ah_spectralStart() to force start a spectral report; * call ah_spectralStop() to force stop an active spectral report.
The spectral scan results appear as PHY errors (type 0x5 on the AR9280, same as radar) but with the spectral scan bit set (0x10 in the last byte of the frame) identifying it as a spectral report rather than a radar FFT report.
Caveats:
* It's likely quite difficult to run spectral _and_ radar at the same time. Enabling spectral scan disables the radar thresholds but leaves radar enabled. Thus, the driver (for now) needs to ensure that only one or the other is enabled.
* .. it needs testing on HT40 mode.
Tested:
* AR9280 in STA mode, HT/20 only
TODO:
* Test on AR9285, AR9287; * Test in both HT20 and HT40 modes; * .. all the driver glue.
Obtained from: Qualcomm Atheros
|
#
242408 |
|
31-Oct-2012 |
adrian |
HAL updates!
* Add some more ANI spur immunity levels. * For AR5111 radios attached to an AR5212, limit the 5GHz channels that are available. A later revision of the AR5111 supports the 4.9GHz PSB channels but right now there's no check in place for the radio revision.
If someone wants PSB support on AR5212+AR5111 radios then please let me know and I'll add the relevant version check.
Obtained from: Qualcomm Atheros
|
#
239703 |
|
26-Aug-2012 |
adrian |
Add EEPROM data hooks for the AR9287.
Tested: * AP99 Reference board (AR7241 + AR9287)
|
#
235972 |
|
25-May-2012 |
adrian |
oops - ath_hal_disablepcie is actually destined for another purpose, not to disable the PCIe PHY in prepration for reset.
Extend the enablepci method to have a "poweroff" flag, which if equal to true means the hardware is about to go to sleep.
|
#
235957 |
|
25-May-2012 |
adrian |
Prepare for improved (read: pcie) suspend/resume support.
* Flesh out the pcie disable method for 11n chips, as they were defaulting to the AR5212 (empty) PCIe disable method.
* Add accessor macros for the HAL PCIe enable/disable calls.
* Call disable on ath_suspend()
* Call enable on ath_resume()
NOTE:
* This has nothing to do with the NIC sleep/run state - the NIC still will stay in network-run state rather than supporting network-sleep state. This is preparation work for supporting correct suspend/resume WARs for the 11n PCIe NICs.
TODO:
* It may be feasible at this point to keep the chip powered down during initial probe/attach and only power it up upon the first configure/reset pass. This however would require correct (for values of "correct") tracking of the NIC power configuration state from the driver and that just isn't attempted at the moment.
Tested:
* AR9280 on my Lenovo T60, but with no suspend/resume pass (yet).
|
#
227387 |
|
09-Nov-2011 |
adrian |
Tidy up the AR9287 HAL a tiny bit - fix up AR9280 references.
|
#
227373 |
|
09-Nov-2011 |
adrian |
Add in some more PCI/PCIe differentiation.
|
#
225883 |
|
30-Sep-2011 |
adrian |
Fix a corner case in the HAL debugging changes, where ah was NULL.
Although I tried to fix this earlier by introducing HALDEBUG_G(), it turns out there seem to be other cases where the pointer value is still NULL.
* Fix DO_HALDEBUG() and the HALDEBUG macro to check whether ah is NULL before deferencing it * Remove HALDEBUG_G() as it's no longer needed
This is hopefully a merge candidate for 9.0-RELEASE as enabling debugging at startup could result in a kernel panic.
|
#
224644 |
|
03-Aug-2011 |
adrian |
Undo this for now. It's "right", but it means everything will rely on the ar9130 code.
Since at least one kernel config specifies individual ath HAL chips rather than just "device ath_hal" (arm/AVILA), I'm doing this so people aren't caught out when they update to -HEAD or 9.0 and discover their ath setup doesn't compile.
I'll revisit this with a proper fix sometime before 9.0-RELEASE.
Approved by: re (kib, blanket) Pointed out by: ray@ Pointy hat to: adrian@
|
#
224634 |
|
03-Aug-2011 |
adrian |
Add in a dirty hack that allows for AR9280/AR9285/AR9287 embedded systems, in the same way that AR9130 embedded systems work.
This isn't -everything- that is required - the PCI glue still needs to be taught about the eepromdata hint, along the same lines as the AHB glue.
Approved by: re (kib, blanket)
|
#
224243 |
|
21-Jul-2011 |
adrian |
Break out the PLL setup into (mostly) per-chip methods, rather than polluting the AR5416 code with later chipset support.
Note: ar9280InitPLL() supports Merlin (AR9280) and later (AR9285, AR9287.)
Submitted by: ssgriffonuser@gmail.com Approved by: re (kib)
|
#
223615 |
|
27-Jun-2011 |
adrian |
Make sure the extended regdomain word is initialised.
As with the AR9285, the AR9287 has a default word of 0x1F which means all the various bits in that field are set on by default.
|
#
223466 |
|
23-Jun-2011 |
adrian |
Re-introduce a global ath_hal_debug again for now, whilst I figure out what to do about the few cases where the HAL state isn't available (regdomain) or isn't yet setup (probe/attach.)
The global ath_hal_debug now affects all instances of the HAL.
This also restores the ability for probe/attach debugging to work; as the sysctl tree may not be attached at that point. Users can just set the global "hw.ath.hal.debug" to a suitable value to enable probe/attach related debugging.
|
#
222584 |
|
01-Jun-2011 |
adrian |
Add some missing DFS chipset functionality to the FreeBSD HAL.
Please note - this doesn't in any way constitute a full DFS implementation, it merely adds the relevant capability bits and radar detection threshold register access.
The particulars:
* Add new capability bits outlining what the DFS capabilities are of the various chipsets. * Add HAL methods to set and get the radar related register values. * Add AR5212 and AR5416+ DFS radar related register value routines. * Add a missing HAL phy error code that's related to radar event processing. * Add HAL_PHYERR_PARAM, a data type that encapsulates the radar register values.
The AR5212 routines are just for completeness. The AR5416 routines are a super-set of those; I may later on do a drive-by pass to tidy up duplicate code.
Obtained from: Linux, Atheros
|
#
222432 |
|
28-May-2011 |
adrian |
Teach if_ath about devices which have short-GI in 20MHz channel modes.
This has been disabled until now because there hasn't been any supported device which has this feature. Since the AR9287 is the first device to support it, and since now the HAL has functional AR9287+11n support, flip this on.
|
#
222308 |
|
26-May-2011 |
adrian |
Flesh out the TX power calibration for the AR9287.
I'm assuming for now that the AR9287 is only open-loop TX power control (as mine is) so I've hard-coded the attach path to fail if the NIC is not open-loop.
This greatly simplifies the TX calibration path and the amount of code which needs to be ported over.
This still isn't complete - the rate calculation code still needs to be ported and it all needs to be glued together.
Obtained from: Linux ath9k
|
#
222301 |
|
26-May-2011 |
adrian |
Bring over my AR9287 work in progress.
It isn't linked into the build because it's missing the TX power and PDADC programming code.
This code is mostly based on the ath9k codebase, compared against the Atheros codebase as appropriate.
What's implemented:
* probe/attach * EEPROM board value programming * RX initial calibration * radio channel programming * general MAC / baseband setup * async fifo setup * open-loop tx power calibration
What's missing before it can be enabled by default:
* TX power / calibration setting code * closed-loop tx power calibration routines * TSF2 handling * generic timer support from ath9k
Obtained from: Atheros, ath9k
|