This was off because the net80211 aggregation code was using the same
state pointers for both fast frames and ampdu tx support which led to some
pretty unfortunate panic-y behaviour.
Now that net80211 doesn't panic, let's flip this back on.
It doesn't (yet) do the horrific sounding thing of A-MPDU aggregates
of fast frames; that'll come next. It's a pre-requisite to supporting
AMSDU + AMPDU anyway, which actually speeds things up quite considerably
(think packing lots of little ACK frames into a single AMSDU.)
Tested:
* QCA955x SoC, AP mode
* AR5416, STA mode
* AR9170, STA mode (with local fast frame patches)
This is required for (more) correct TDMA support. Without it, the
code tries to calculate the required guard interval based on the
current rate, and since this is an 11n NIC and people try using
11n, it calls ath_hal_computetxtime() on an 11n rate which then
panics.
This doesn't fix TDMA slave mode on AR9300 - it just makes it
have one less bug.
Reported by: Berislav Purgar <bpurgar@gmail.com>
This dramatically improves RX sensitivity and behaviour on the
AR9331 hardware I have, including the Carambola 2.
Tested:
* AR9331, Carambola 2 board
Submitted by: Zilvinas Valinskas <zilvinas.valinskas@gmail.com>
This is used by the 'athsurvey' command to print out channel survey
statistics - % busy times transmit, receive and airtime.
It's as buggy and incomplete as the rest of the HAL survey support -
notably, tying into the ANI code to read channel stats and occasionally
getting garbage counters isn't very nice. It also doesn't (yet!) get
channel survey information during a scan. But it's good enough for
basic air-time debugging, which is why I'm committing it in this state.
Tested:
* AR9380, STA mode
path.
* For now there's no exposed control over classic / LNA antenna diversity,
so just stub them out. Adding this will take quite a bit of time.
* Add a function to fetch the CTS timeout.
PR: kern/198558
I don't like having it in this function; I may migrate it to ar9300_freebsd.c
at some point to keep the HAL code pollution down.
This allows ANI to be disabled via a sysctl.
Tested:
* AR9331, STA/TDMA modes
This is a custom FreeBSD HAL method that is used by the TDMA code
to program the beacon timers directly without any guesswork/assumptions
by the HAL.
This brings up basic TDMA master/slave support on the AR9380 HAL,
however there are other issues preventing it from being stable.
(I'm seeing beacon interval instability, which may be due to
busy 2GHz air, but also may be due to some HAL configuration
issues with regards to ANI, or hardware timer programming, etc.)
Tested:
* AR9331 (Carambola2), STA, AP, adhoc and TDMA master mode.
The QCA9565 can have RFKILL on GPIO Pin 11, and thus we need to configure
it up correctly or the NIC may not function.
I'm not sure why the AR9382 can't use GPIO 8 / GPIO 11 ; it's likely
hooked up to some external LNA or filter. The real solution is to
make it only block pin 8 / pin 11 for AR9382, but the AR9382 probes
like an AR9380. Sigh.
Submitted by: Anthony Jenkins <scoobi_doo@yahoo.com>
I've been sitting on this for a year or so now; I've finally
tested it on enough devices to be reasonably sure it won't
cause too much drama. But, if you see issues, please email me.
Tested (all STA mode):
PCIe:
* AR9380
* AR9390
* AR9580
* AR9462
* AR9485
SoC:
* QCA9550
* AR9331
* AR9342
the ia_array field of struct ar9300_ini_array const, and removing the
const-dropping casts. No functional change.
Reviewed by: adrian
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1725
AR9462/AR9565.
This and some upcoming changes to the HAL for these chips should
address some of the signal sensitivity reported by users.
Tested:
* AR9462 (WB222), STA mode
Obtained from: Linux ath9k
AR9565 (Aphrodite.) These need to use the MCI routines, not
the legacy 2-wire / 3-wire bluetooth coexistence methods.
Tested:
* AR9462 (WB222); STA mode
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
If powersave is enabled and there are any transitions to network
or full sleep - even if they're pretty damned brief - eventually
something messes up somewhere and the bus glue between the AR9331
SoC and the AR9331 wifi stops working. It shows up as stuck DMA
and LOCAL_TIMEOUT interrupts.
Both ath9k and the reference driver does a full chip reset if things
get stuck.
So:
* teach the AR9330 HAL about the force_full_reset option I added a
couple of years ago;
* if the chip is currently in full-sleep, do a full-reset;
* if TX DMA and/or RX DMA are still enabled (eg, they did get
stuck during reset) then do a full-reset.
Tested:
* AR9331 SoC, STA mode
This seems to probe/attach as an AR9485 and thus nothing else besides
adding the device id seems to be required.
ath0: <Atheros AR1111> mem 0xf4800000-0xf487ffff irq 19 at device 0.0 on pci5
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 RX streams; 1 TX streams
ath0: AR9485 mac 576.1 RF5110 phy 1926.8
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000
The NIC I have here is a 1 antenna, 2GHz only device.
Thankyou to Jim Thompson <jim@netgate.com> for the AR1111 NIC.
Tested:
* AR1111 (pretending not to be an AR9485, but failing miserably);
STA mode with powersave.
Relnotes: yes
Sponsored by: Netgate
When building AR933x test images, I'd like to only build only the ar9300
HAL. To do this, it needs to supply an RF linker entry or it won't compile.
Tested:
* AR933x test builds
NICs which have bluetooth coexistence enabled.
The WB225 NIC has the common antenna switch configuration set to 0x0 which
disables all external switch bit setting. This obviously won't work when
doing coexistence.
This value is a magic value from the windows .inf files. It _looks_ right
but I haven't yet verified it - unfortunately my AR9285+AR3012 BT combo
has an earlier BT device which doesn't actually _have_ firmware on it.
So I have to fix ath3kfw to handle loading in firmware into the newer
NICs before I can finish testing this.
This may not hold true for CUS198, which is another custom AR9485 board.
The bluetooth setup code actually does a channel lookup during setup,
even though we haven't yet programmed in a channel. Sigh.
Tested:
* WB225 (AR9485) + bluetooth