summaryrefslogtreecommitdiff
path: root/sys/dev/ic/athn.c
AgeCommit message (Collapse)Author
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2014-12-22unifdef INETTed Unangst
2014-12-19Use <sys/endian.h> instead of <machine/endian.h>Philip Guenther
ok dlg@ mpi@ bcook@ millert@ miod@
2014-07-22Fewer <netinet/in_systm.h>Martin Pieuchot
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-03-19Stop abusing the rcvif pointer to pass wireless nodes down to theMartin Pieuchot
driver start routines. Instead add & use a pointer in the pkthdr since we don't want the overhead of using a mbuf_tags(9). claudio@ pointed out that other subsystems might want to use this pointer too, so here's a new cookie! ok claudio@, mikeb@, deraadt@
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
2013-11-26Instead of comparing the lower and higher addresses of all the multicastMartin Pieuchot
entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
2013-11-15Add missing parenthesis to make tick calculation work as intended. ShouldKenneth R Westerback
fix excessive timeouts and 'Michael mic' errors. Problem pointed out by vigdis via bugs@ ok dlg@
2013-11-11replace things like "start + interval > ticks" withDavid Gwynne
"ticks - start > interval" because the latter copes with ticks wrapping. pointed out by guenther@
2013-08-07Most network drivers include netinet/in_var.h, but apparently theyAlexander Bluhm
don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
2013-01-14Fix the sotfware.Joel Sing
2012-10-20Init values for the AR9485 were for version 1.0 of this chip, which accordingStefan Sperling
to Atheros Linux developers was never sold. So update initvals to what Linux is using for the 1.1 generation. Because the serdes values are written to different registers on the AR9485 this involves tweaking the serdes init code for all athn(4) chip families. This commit doesn't make AR9485 devices work yet but is a step in the right direction. Tested by krw, kettenis, and Andrew Ngo. ok kettenis@
2012-08-25Add support for power saving in Host AP mode.Mark Kettenis
ok stsp@, deraadt@
2012-06-10Allow a variable number of words for the Serializer/Deserializer programming.Mark Kettenis
Probably not enought to make the AR9380 chips to work, but at least the kernel shouldn't crash anymore when we see one. ok stsp@
2011-01-08fix LEDs handling.Damien Bergamini
do not read back the LED GPIO pin since it is configured in output only mode. makes the link LED blink on the WiFiStation EXT when scanning (the LEDs indicating the signal strength are not working yet).
2011-01-08the USB frontend has its own switch_chan() function, so no need toDamien Bergamini
do AR9271-specific stuff here.
2011-01-06"athn* at uhub? port ?"Damien Bergamini
this adds preliminary support for the Atheros AR9271 chipset and probably the AR9280+AR7010 and AR9287+AR7010 too though those were not tested. scanning still takes a very long time (~1 sec per channel) but otherwise, operation in STA mode seems stable. will implement fast channel change soon. committed over the Ubiquiti WifiStation EXT (AR9271) on i386 with WPA. requires firmware (see man page for details) ok deraadt@ (who checked the .h files)
2010-12-31when stopping Rx, set the AR_DIAG_RX_ABORT bit too.Damien Bergamini
2010-12-31move reading of the hardware revision earlier.Damien Bergamini
2010-12-31commit some bits that will be required by AR9271/AR7010Damien Bergamini
2010-12-31move the printing of the MAC address to the same line than the MAC rev.Damien Bergamini
2010-12-31Make the athn(4) back-end more bus agnostic by moving read and writeDamien Bergamini
operations to callbacks in the PCI and CardBus front-ends. This will allow support of other buses like USB. Assume the following memory model: - writes are ordered but may be buffered and require explicit flush - a read always flushes all buffered writes
2010-08-27remove the unused if_init callback in struct ifnetJonathan Gray
ok deraadt@ henning@ claudio@
2010-08-18- in STA mode, when associated, stop receiving beacons from other BSS.Damien Bergamini
tested by ray@ - no periodic PA calibration for the Osprey (AR9380)
2010-08-12Enable periodic (every 4 minutes) power amplifier calibrationDamien Bergamini
on AR9285 and AR9287.
2010-08-12For chips in open-loop power control mode, periodically (every 30 secs)Damien Bergamini
compensate Tx gain for temperature changes.
2010-08-11Typo in comment: auhtorized->authorizedRay Lai
2010-08-02There is no reason to call the start function upon resume; the network stackMark Kettenis
is perfectly capable to get things going again all by itself. ok damien@, deraadt@
2010-07-22When suspending, only call athn_stop() when IFF_RUNNING is set.Mark Kettenis
ok damien@
2010-07-21Add suspend/unsuspend logic.Mark Kettenis
ok damien@, deraadt@
2010-07-15According to Linux ath9k, the AR9280 1.0 was never sold.Damien Bergamini
Since this is the only chip revision that requires split TKIP MIC keys, remove code that deal with that.
2010-07-15Remove initialization values for chips that never made it into production:Damien Bergamini
- AR9280 1.0 - AR9285 1.0 and 1.1 - AR9287 1.0 Remove checks that are now useless since we know we will never see those chips, and rename some functions.
2010-06-21use LE_READ_4/LE_READ_2 instead of hardcodingDamien Bergamini
2010-06-21allow Tx flags to be passed to the tx() routine.Damien Bergamini
2010-06-21use correct clock rate when computing the listen time for ANIDamien Bergamini
2010-06-12Add missing arg to a printf call.Jonathan Gray
ok damien@
2010-06-05- fix athn_set_key() on big-endian machines (function is not used yet)Damien Bergamini
- change sign extension such that we do not rely on >> being an arithmetic shift on signed integers - various changes to AR9003 code, fix Tx path, enable Tx IQ calibration
2010-06-03enable async fifo for >=AR9287 1.3 only.Damien Bergamini
from ath9k.
2010-05-16fix (again) TKIP MIC entries in set_key().Damien Bergamini
2010-05-16fix ic_max_nnodes computation.Damien Bergamini
no need to set KEY3&KEY4 entries in the split TKIP MIC case (these entries are set to 0 already.)
2010-05-16no need to set the MAC address to 0 for TKIP MIC entries; the keyDamien Bergamini
cache is already cleared at startup and entries >64 will never have their MAC addresses set. removes pairs of writes in set_key.
2010-05-16cleanup hardware key cache management (not used yet)Damien Bergamini
2010-05-16cleanup calibration bits (not everything is enabled yet.)Damien Bergamini
2010-05-16initial Host AP bits.Damien Bergamini
2010-05-16>=AR9287 devices support short GI in 20MHz channels, so indicate thisDamien Bergamini
capability in the HT Capabilities field of the HT IE (not used yet.)
2010-05-16fix athn_updateslot for fast PLL clock and 40MHz CBWDamien Bergamini
2010-05-16cleanup interrupts mask management.Damien Bergamini
2010-05-11enable fast PLL clock for 5GHz on AR9280 >=2.0 (unless EEPROM says theDamien Bergamini
opposite) and on AR9380 2.0. tested on my AR9280 2.1 with a NETGEAR WNHDE111 AP.
2010-05-10athn(4) is going to support a new family of Atheros 802.11nDamien Bergamini
chips (AR9003), which differs from the currently supported families (AR5008, AR9001 and AR9002). The main differences (from a driver point of view) are: * DMA: Tx and Rx descriptors have changed. A single Tx descriptor can now reference up to 4 scatter/gather DMA segments. There is now a DMA ring for reporting Tx status with separate Tx status descriptors (this ring is used to report Tx status for all the Tx FIFOs). Rx status descriptors are now put at the beginning of Rx buffers and do not need to be allocated separately from buffers. There are two Rx FIFOs (low priority and high priority) instead of one. * ROM: The AR9003 family uses OTP-ROM instead of EEPROM. Reading the ROM is totally insane since vendors can provide only the chunks of ROM that differ from a default image (and thus the default image has to be stored in the driver). This is referenced as "compressed ROM" in the Linux driver, though there is no real compression involved, at least for the moment. * PHY registers: All PHY registers have changed. Some registers offsets do not fit on 16 bits anymore, but since they are 32-bit aligned, we can still make them fit on 16 bits to save .rodata space in initialization tables. * MAC registers: Some MAC registers offsets have changed (GPIO, interrupt masks) which is quite annoying (though ~98% remain the same.) * Initialization values: Initialization values are now split in mac/soc/bb/radio blocks and pre/core/post phases in the Linux driver. I have chosen to not go that road and merge these blocks in modal and non-modal initialization values (similar to the other families). The initialization order remains exactly the same as the Linux driver though. To manage these differences, I have split athn.c in two backends: ar5008.c contains the bits that are specific to the AR5008, AR9001 and AR9002 families (used by ar5416.c, ar9280.c, ar9285.c and ar9287.c) and that were previously in athn.c. ar9003.c contains the bits that are specific to the new AR9003 family (used by ar9380.c only for now.) I have introduced a thin hardware abstraction layer (actually a set of pointers to functions) that is used in athn.c. My intent is to keep this abstraction layer as thin as possible and not to create another ugly pile of abstraction layers a la MadWifi. I think I've managed to keep things sane, probably at the expense of duplicating some code in both ar5008.c and ar9003.c, but at least we do not have to dig through layers and layers of virtual descriptors to figure out what is mapped to the hardware. Tested for non-regression on various AR5416 (sparc64+i386), AR9281 and AR9285 (i386 only) adapters. AR9380 part is not tested (hardware is not available to the general public yet). Committed over my AR9285 2.0.