aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath
Commit message (Collapse)AuthorAgeFilesLines
* [ath] remove now unused parameters.Adrian Chadd2016-06-041-4/+0
| | | | | | | | These will move to being part of the driver btcoex stuff I'm working on, since the HAL doesn't know what to do with them. Notes: svn path=/head/; revision=301307
* [ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.Adrian Chadd2016-06-041-0/+4
| | | | | | | It just stomps all; which is enough for some testing. Notes: svn path=/head/; revision=301304
* [ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.Adrian Chadd2016-06-041-2/+1
| | | | Notes: svn path=/head/; revision=301303
* [ath] correctly shift the QCA9565 LNA config into the mci config variable.Adrian Chadd2016-06-021-2/+6
| | | | | | | | | Tested: * QCA9565, STA + BT mode Notes: svn path=/head/; revision=301186
* Fix kernel build. Improper definition location of a variable.George V. Neville-Neil2016-06-021-1/+2
| | | | Notes: svn path=/head/; revision=301182
* [ath] commit initial bluetooth coexistence support for the MCI NICs.Adrian Chadd2016-06-027-63/+811
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial framework to call into the MCI HAL routines and drive the basic state engine. The MCI bluetooth coex model uses a command channel between wlan and bluetooth, rather than a 2-wire or 3-wire signaling protocol to control things. This means the wlan and bluetooth chip exchange a lot more information and signaling, even at the per-packet level. The NICs in question can share the input LNA and output PA on the die, so they absolutely can't stomp on each other in a silly fashion. It also allows for the bluetooth side to signal when profiles come and go, so the driver can take appropriate control. There's also the possibility of dynamic bluetooth/wlan duty cycle control which I haven't yet really played with. It configures things up with a static "wlan wins everything" coexistence, configures up the available 2GHz channel map for bluetooth, sets a static duty cycle for bluetooth/wifi traffic priority and drives the basics needed to keep the MCI HAL code happy. It doesn't do any actual coexistence except to default to "wlan wins everything", which at least demonstrates that things do indeed work. Bluetooth inquiry frames still trump wifi (including beacons), so that demonstrates things really do indeed seem to work. Tested: * AR9462 (WB222), STA mode + bt * QCA9565 (WB335), STA mode + bt TODO: * .. the rest of coexistence. yes, bluetooth, not people. That stuff's hard. * It doesn't do the initial BT side calibration, which requires a WLAN chip reset. I'll fix up the reset path a bit more first before I enable that. * The 1-ant and 2-ant configuration bits aren't being set correctly in if_ath_btcoex.c - I'll dig into that and fix it in a subsequent commit. * It's not enabled by default for WB222/WB225 even though I believe it now can be - I'll chase that up in a subsequent commit. Obtained from: Qualcomm Atheros, Linux ath9k Notes: svn path=/head/; revision=301181
* [ath_hal] add extra MCI definitions used by the later chips (QCA9565/Aphrodite).Adrian Chadd2016-06-011-0/+21
| | | | | | | Obtained from: Linux ath9k Notes: svn path=/head/; revision=301089
* [ath_hal] rename the MCI state info routine.Adrian Chadd2016-05-311-1/+1
| | | | | | | It's not /really/ "get state". Notes: svn path=/head/; revision=301043
* [ath_hal] add support for setting the azimuth timestamp in the outgoing TX ↵Adrian Chadd2016-05-311-0/+6
| | | | | | | | | payload. FYI: This is an unsupported/deprecated feature of the 11n hardware. Notes: svn path=/head/; revision=301042
* [ath_hal] reserve a HAL_TXDESC_ bit for azimuth TX timestamp requests.Adrian Chadd2016-05-311-1/+2
| | | | Notes: svn path=/head/; revision=301041
* [ath_hal] migrate the bluetooth definitions out from ah.h / ↵Adrian Chadd2016-05-311-131/+1
| | | | | | | | | | | | | | ar9300_freebsd_inc.h. The eventual MCI driver side of things needs the MCI bits to live in the HAL API so we can get to them. Tested: * QCA9565, STA mode + bluetooth Notes: svn path=/head/; revision=301014
* [ath_hal] add bluetooth coexistence definitions for both legacy and MCI.Adrian Chadd2016-05-311-0/+503
| | | | | | | | | | | The legacy bits are just from ah.h; the MCI bits are from the ar9300 HAL "freebsd" extras. A subsequent commit will include ah_btcoex.h into ah.h and remove the older defintions. Notes: svn path=/head/; revision=301013
* [ath] add BTCOEX debug section; modify DPRINTF() to take a no-arg format string.Adrian Chadd2016-05-311-2/+3
| | | | | | | | | Tested: * QCA9565, STA mode Notes: svn path=/head/; revision=301008
* [ath] add WB335 btcoex for initial testing.Adrian Chadd2016-05-281-0/+64
| | | | | | | | | | | | | | | | | | | This is like the WB222 coexistence (ie, "MCI", a message bus inside the chip), and it's currently a cut/paste so I can start using it to flesh out the differences with WB222. It doesn't completely /do/ bluetooth coexistence, because it turns out I need to add some contigmalloc'ed buffers to the btcoex path for this type of hardware. I'm putting this work in the "people would like to see functioning-ish btcoex before FreeBSD-11" bucket because I see this as "broken". Tested: * QCA9535 (WB335) NIC, BT + 2GHz STA Notes: svn path=/head/; revision=300896
* [ath] convert recent changes over to HAL format.Adrian Chadd2016-05-201-5/+6
| | | | | | | | | | | | This is needed to compile the ath tools, that includes this code to run in userland. Tested: * Carambola 2, AR9331, STA mode Notes: svn path=/head/; revision=300267
* ath: refactor/split getchannels() method.Andriy Voskoboinyk2016-05-192-211/+272
| | | | | | | | | | | | | | Split getchannels() method in ath_hal/ah_regdomain.c into a subset of functions for better readability. Note: due to different internal structure, it cannot use ieee80211_add_channel*() (however, some parts are done in a similar manner). Differential Revision: https://reviews.freebsd.org/D6139 Notes: svn path=/head/; revision=300246
* dev/ath: minor spelling fixes in comments.Pedro F. Giffuni2016-05-0226-43/+43
| | | | | | | | | No functional change. Reviewed by: adrian Notes: svn path=/head/; revision=298939
* [ath] initialise do_ldpc to 0.Adrian Chadd2016-04-291-0/+1
| | | | | | | | | | | | | | | | | | I .. can't believe I missed this. This showed up because the AP was TX'ing LDPC to an iwm(4) chipset, which didn't advertise LDPC and doesn't /accept/ LDPC. Amusingly, all the two other FreeBSD 11n parts I had tested with (AR9380, Intel 7260) and I completely forgot to test on ye olde hardware. That'll teach me. Tested: * AR9580 (AP) - Intel 7260 (STA), AR9380 (STA), Intel 6205 (STA) Notes: svn path=/head/; revision=298792
* [ath] Add LDPC transmit support.Adrian Chadd2016-04-291-0/+33
| | | | | | | | | | | | | | | | | | LDPC adds better transmit reliability if both ends support it. You in theory can do both STBC and LDPC at the same time. If I see issues I'll disable it. * Only enable it if both ends of a connection negotiate it. * Disable it if any rate is non-11n. * Count both LDPC TX and STBC TX. Tested: * AR9380, STA mode Notes: svn path=/head/; revision=298762
* [ath] turn the BA hardware bug back into a printf().Adrian Chadd2016-04-291-1/+1
| | | | | | | | I saw this happen a couple of times and all I saw was a dump of the transmit descriptors. Log the message for now so I can see whta happened. Notes: svn path=/head/; revision=298761
* [ath] Add counters for STBC TX and LDPC TX.Adrian Chadd2016-04-292-1/+9
| | | | | | | | This is a big no-op until the TX path changes to enable LDPC TX are added. Notes: svn path=/head/; revision=298760
* [ath] add LDPC capability support and LDPC RX support.Adrian Chadd2016-04-262-0/+18
| | | | | | | | | | | | | | | | | | This enables LDPC receive support for the AR9300 chips that support it. It'll announce LDPC support via net80211. Tested: * AR9380, STA mode * AR9331, (to verify the HAL didn't attach it to a chip which doesn't support LDPC.) TODO: * Add in net80211 machinery to make this configurable at runtime. Notes: svn path=/head/; revision=298608
* [ath] obey the STBC flag setting in iv_flags_htAdrian Chadd2016-04-261-4/+9
| | | | | | | | | | | Add support for the FHT_STBC_TX flag in iv_flags_ht, so it'll now obey the per-vap ifconfig stbctx flag. This means that we can do STBC TX on one vap and not another VAP. (As well as STBC RX on said vap; that changes the HTCAP announcement.) Notes: svn path=/head/; revision=298607
* net80211: replace internal LE_READ_*/LE_WRITE_* macro with systemAndriy Voskoboinyk2016-04-204-19/+10
| | | | | | | | | | | | | | | | | | | | le*dec / le*enc functions. Replace net80211 specific macros with system-wide bytestream encoding/decoding functions: - LE_READ_2 -> le16dec - LE_READ_4 -> le32dec - LE_WRITE_2 -> le16enc - LE_WRITE_4 -> le32enc + drop ieee80211_input.h include, where it was included for these operations only. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D6030 Notes: svn path=/head/; revision=298359
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-102-2/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* [ath] Only process beacon frames for the IBSS/BSSID if appropriate.Adrian Chadd2016-04-091-64/+81
| | | | | | | | | | | | | | | | | | | | | * Don't use arbitrary frames for the average RX RSSI - only frames from the current BSSID * Don't log / do the syncbeacon logic for another BSSID and definitely don't do the syncbeacon call if we miss beacons outside of STA mode. * Don't do the IBSS merge bits if the current node plainly won't ever match our current BSS (ie, the IBSS doesn't have to match, but all the same bits that we check in ieee80211_ibss_merge() have to match.) Tested: * ath(4), AR9380, IBSS mode, surrounded by a lot of IBSS 11ac networks. Sponsored by: Eva Automation, Inc. Notes: svn path=/head/; revision=297729
* [net80211] migrate the time_* macros to ieee80211_* namespace.Adrian Chadd2016-03-301-1/+1
| | | | | | | | | | It turns out that these will clash very annoyingly with the linux macros in the linuxkpi layer, so let the wookie^Wlinux win. The only user that I can find is ath(4), so fix it there too. Notes: svn path=/head/; revision=297405
* Remove taskqueue_enqueue_fast().John Baldwin2016-03-011-1/+1
| | | | | | | | | | | | | taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go. Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131 Notes: svn path=/head/; revision=296272
* Fix up the ath(4) device names for QCA chipsets.Adrian Chadd2016-02-292-31/+28
| | | | | | | Submitted by: Tobias Kortkamp <t@tobik.me> Notes: svn path=/head/; revision=296176
* [ath] remove the inline version of the register access macros.Adrian Chadd2016-01-032-16/+13
| | | | | | | | | | | | | These are going to be much more efficient on low end embedded systems but unfortunately they make it .. less convenient to implement correct bus barriers and debugging. They also didn't implement the register serialisation workaround required for Owl (AR5416.) So, just remove them for now. Later on I'll just inline the routines from ah_osdep.c. Notes: svn path=/head/; revision=293111
* ... and that would've never worked. Sorry!Adrian Chadd2016-01-021-8/+3
| | | | | | | (Note: everything I tested on locally has ATH_DEBUG / AH_DEBUG set.) Notes: svn path=/head/; revision=293054
* [ath] add explicit bus barriers.Adrian Chadd2016-01-022-2/+33
| | | | | | | | | | | | | | | | | | | | | | The ath hal and driver code all assume the world is an x86 or the bus layer does an explicit bus flush after each operation (eg netbsd.) However, we don't do that. So, to be "correct" on platforms like sparc64, mips and ppc (and maybe ARM, I am not sure), just do explicit barriers after each operation. Now, this does slow things down a tad on embedded platforms but I'd rather things be "correct" versus "fast." At some later point if someone wishes it to be fast then we should add the barrier calls to the HAL and driver. Tested: * carambola 2 (AR9331.) Notes: svn path=/head/; revision=293050
* fix ht/40 configuration for ar9331 (hornet).Adrian Chadd2015-11-302-6/+6
| | | | | | | | | | | | | | | | | | | The synth programming here requires the real centre frequency, which for HT20 channels is the normal channel, but HT40 is /not/ the primary channel. Everything else was using 'freq', which is the correct centre frequency, but the hornet config was using 'ichan' to do the lookup which was also the primary channel. So, modify the HAL call that does the mapping to take a frequency in MHz and return the channel number. Tested: * Carambola 2, AR9331, tested both HT/20 and HT/40 operation. Notes: svn path=/head/; revision=291469
* [ath_hal] use the correct revision information for QCA953x.Adrian Chadd2015-11-282-4/+2
| | | | | | | | | | | | This probe/attaches correctly in my local branch and now displays a useful message: ath0: <Qualcomm Atheros QCA953x> at mem 0x18100000-0x1811ffff irq 0 on nexus0 ... ath0: AR9530 mac 1280.0 RF5110 phy 0.0 Notes: svn path=/head/; revision=291418
* * Add device string for QCA955x (scorpion);Adrian Chadd2015-11-282-0/+7
| | | | | | | * Add device ID and device string for QCA953x (honeybee). Notes: svn path=/head/; revision=291413
* wrap in ATH_DEBUG.Adrian Chadd2015-11-281-2/+2
| | | | | | | Thanks sparc64 build! Notes: svn path=/head/; revision=291412
* [ath] conditionally print out the rate series information if ATH_DEBUG_XMIT ↵Adrian Chadd2015-11-271-3/+4
| | | | | | | is set. Notes: svn path=/head/; revision=291411
* [ath] listen to all beacons in IBSS and software beacon miss.Adrian Chadd2015-11-251-3/+7
| | | | | | | | | | | | | | | | | | | I added MYBEACON support a while ago to listen to beacons that are only for your configured BSSID. For AR9380 and later NICs this results in a lot less chip wakeups in station mode as it then only shows you beacons that are destined to you. However in IBSS mode you really do want to hear all beacons so you can do IBSS merges. Oops. So only use MYBEACON for STA + not-scanning, and just use BEACON for the other modes it used to use BEACON for. This doesn't completely fix IBSS merges though - there are still some conditions to chase down and fix. Notes: svn path=/head/; revision=291304
* [ath] migrate ioctl and busdma memory operations out into separate source files.Adrian Chadd2015-11-249-507/+836
| | | | | | | | | | This should be a big no-op pass; and reduces the size of if_ath.c. I'm hopefully soon going to take a whack at the USB support for ath(4) and this'll require some reuse of the busdma memory code. Notes: svn path=/head/; revision=291233
* Fix kernel build, broken in r290612Renato Botelho2015-11-092-2/+2
| | | | | | | Approved by: adrian Notes: svn path=/head/; revision=290616
* ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.Adrian Chadd2015-11-0913-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now the only way to force a cold reset is: * The HAL itself detects it's needed, or * The sysctl, setting all resets to be cold. Trouble is, cold resets take quite a bit longer than warm resets. However, there are situations where a cold reset would be nice. Specifically, after a stuck beacon, BB/MAC hang, stuck calibration results, etc. The vendor HAL has a separate method to set the reset reason (which is how HAL_RESET_BBPANIC gets set) which informs the HAL during the reset path why it occured. This is almost but not quite the same; I may eventually unify both approaches in the future. This commit just extends HAL_RESET_TYPE to include both status (eg BBPANIC) and type (eg do COLD.) None of the HAL code uses it yet though; that'll come later. It also is a big no-op in each HAL - I need to go teach each of the HALs about cold/warm reset through this path. Notes: svn path=/head/; revision=290612
* ath(4) - reflect whether this is a full or fast channel change.Adrian Chadd2015-11-071-2/+2
| | | | | | | It's no longer "outdoor." Notes: svn path=/head/; revision=290474
* ath(4) - don't try to free buffers / return an error if we've committedAdrian Chadd2015-11-031-1/+11
| | | | | | | | | | | | | | | | | to transmit the buffer. ath_tx_start() may manipulate/reallocate the mbuf as part of the DMA code, so we can't expect the mbuf can be returned back to the caller. Now, the net80211 ifnet work changed the semantics slightly so if an error is returned here, the mbuf/reference is freed by the caller (here, it's net80211.) So, once we reach ath_tx_start(), we never return failure. If we fail then we still return OK and we free the mbuf/noderef ourselves, and we increment OERRORS. Notes: svn path=/head/; revision=290339
* net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ↵Adrian Chadd2015-10-121-1/+0
| | | | | | | | | | | | | ieee80211_raw_output(). This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still doing that. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3774 Notes: svn path=/head/; revision=289165
* net80211: separate mbuf cleanup from ieee80211_fragment()Adrian Chadd2015-10-123-27/+10
| | | | | | | | | | | | | | | * Create ieee80211_free_mbuf() which frees a list of mbufs. * Use it in the fragment transmit path and ath / uath transmit paths. * Call it in xmit_pkt() if the transmission fails; otherwise fragments may be leaked. This should be a big no-op. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3769 Notes: svn path=/head/; revision=289162
* Flip on fast frames support for AR5416 and AR9300 series NICs.Adrian Chadd2015-10-101-7/+1
| | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=289099
* Remove the unnecessary cast.Kevin Lo2015-10-051-2/+1
| | | | Notes: svn path=/head/; revision=288689
* net80211: drop ieee80211_beacon_offsets parameter from ↵Adrian Chadd2015-10-031-3/+3
| | | | | | | | | | ieee80211_beacon_alloc() and ieee80211_beacon_update() Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3659 Notes: svn path=/head/; revision=288636
* net80211: drop redundant 3rd parameter from iv_key_set().Adrian Chadd2015-10-032-4/+2
| | | | | | | | | | | | The MAC can be fetched from the key struct. I added the ndis updates to make it compile. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3657 Notes: svn path=/head/; revision=288635
* Remove the references to the TX IC lock - i ended up solving thisAdrian Chadd2015-09-293-26/+0
| | | | | | | using net80211 to seralise encap+xmit, so now it's a non-issue. Notes: svn path=/head/; revision=288349