summaryrefslogtreecommitdiff
path: root/sys/dev/ic/athn.c
AgeCommit message (Collapse)Author
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.
2010-04-20remove proc.h include from uvm_map.h. This has far reaching effects, asTed Unangst
sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
2010-04-10fix athn_stop_tx_dmaDamien Bergamini
2010-04-10always do a full reset when changing the channel on AR5008 devices,Damien Bergamini
until i figure out why TX sometimes gets stucked. a full reset was already necessary on AR9280 devices, so there is no change for these devices.
2010-04-07txq->lastds is only valid when txq is not empty.Damien Bergamini
Check for emptiness of the TX queue instead of lastds != NULL. I have a feeling this might fix the "device timeout" issues reported by Rivo Nurges on his AR5418 unveiled by athn.c r1.28 commit, though he is not around to confirm. This is a candidate for -stable.
2010-04-07update initvals and TX gains for AR9285 >=1.2Damien Bergamini
check result of carrier leakage calibration and redo calibration if needed add support for newer AR9285 chips (AR9285 XE 2.0). tested for non-regression on a DNXA-95 "Still seems to work here" kettenis@
2010-04-05backout these two files i committed by accident.Damien Bergamini
2010-04-05fix regression on RT2860C introduced in previous commit.Damien Bergamini
2010-03-28Four uses of uninitialized variables found by clang via jsg@. ar5416, ar9287Kenneth R Westerback
and athn are only theoretically interesting. i33380211_node fixes a real bug in occupied channel detection. ok damien@
2010-02-24- properly maintain sc->curchanDamien Bergamini
- return 1 in athn_intr for the gpio intr too
2010-02-24Disable Reduced Interframe Space search on AR9160 to workaroundDamien Bergamini
baseband issues. It would be cleaner to modify directly the initvals for AR9160 but I want to keep the exact same initvals as the Linux ath9k driver. from ath9k
2010-02-21Make sure athn_intr() returns 1 if it claims an interrupt and 0 if not,Mark Kettenis
instead of the other way around. Fixes interrupt accounting. ok damien@
2010-02-16fix AR_DTIM_PERIODDamien Bergamini
2010-02-15Properly detect when the band changes from 2GHz to 5GHz andDamien Bergamini
vice-versa, and do a full reset of the chip when it happens. This does not affect the AR9280 since a full reset is always necessary when the channel changes. Should fix dual-band AR5416 devices (problem reported by Rivo Nurges).
2010-02-15- handle SIOCS80211CHANNEL in monitor mode without doing a full resetDamien Bergamini
- call athn_set_multi on SIOCADDMULTI/SIOCDELMULTI
2010-01-27change the MRR pattern from 1/1/1/1 to 2/2/2/4Damien Bergamini
2009-12-05Use the correct member of the ieee80211com struct when testingJonathan Gray
if the current mode is 802.11a or 802.11b. found by gcc svn. ok damien@
2009-11-25fix previousDamien Bergamini
2009-11-25single-stream parts (AR9285) have a hardware bug that limits theDamien Bergamini
usable size of the PCU TX FIFO to 2KB even though the hardware has 4KB.
2009-11-23prevent interrupts storm when the radio switch is turned off whileDamien Bergamini
the interface is up and running by properly clearing the condition.
2009-11-23move things from athn_attach() to athn_init() such that we canDamien Bergamini
power off the cardbus slot after athn_attach() and in athn_stop().
2009-11-23cleanup athn_set_key (not used yet.)Damien Bergamini
2009-11-23remove a global that i used to test protection modes.Damien Bergamini
2009-11-22fix RTS/CTS and CTS-to-self protection modes.Damien Bergamini
fix 802.11a TXTIME computation (802.11a has a 16us SIFS interval but does not have the 6us signal extension that ERP-OFDM has so we can use the same code for 11a and 11g provided that we add the SIFS nterval in the athn_txtime() function itself.)
2009-11-21make the led blink during a scan.Damien Bergamini
prodded by deraadt
2009-11-21debug offDamien Bergamini
reminded by deraadt
2009-11-19if a radio switch exists, configure the GPIO pin to which it isDamien Bergamini
connected to raise an interrupt when the pin goes low (or high depending on the polarity of the radio switch.) turn the interface down when the interrupt occurs. this is the same behaviour as in wpi(4) and iwn(4). cleanup interrupts processing while i'm here. remove ATHN_INTR_MITIGATION compile option (it is set by default.)
2009-11-17fix a DPRINTF format string.Damien Bergamini
2009-11-17cleanup the printf/DPRINTF mess.Damien Bergamini
use proper debug levels for diagnostic messages such that we don't spam the logs when athn_debug is low.
2009-11-17fix previous.Damien Bergamini
2009-11-17update hardware multicast filter.Damien Bergamini
2009-11-17add short interframe space to duration since the athn_txtimeDamien Bergamini
function does not take it into account. oops.
2009-11-16it is better if it compiles.Damien Bergamini
2009-11-16do not panic when wep is enabled.Damien Bergamini