Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/athvar.h
RevisionDateAuthorComments
 1.36  27-Jan-2013  jmcneill don't transmit while in a key change is in progress
 1.35  07-Oct-2011  dyoung branches: 1.35.2; 1.35.12;
Get rid of the "I don't know what I was thinking / somebody should have
stopped me / does anybody read source-changes?" ATH_LOCK()/ATH_UNLOCK()
and bracket with splnet()/splx() instead. This is still not *good*,
since ifnet ioctls are not (yet) synchronized, but could be no worse
than what we have, now. Survives light testing with my (forthcoming)
ifnet ioctl synchronization patch.
 1.34  07-Mar-2011  cegger Get improvements from FreeBSD-current (January 2011).
Successfully tested with WEP, WPA and WPA2 on AR9285.
Reviewed by jmcneill@
 1.33  19-Mar-2010  dyoung branches: 1.33.2;
Don't pick up the network-interface, ethernet, and 802.11-related
definitions by chance (or by the bus-specific front-end #including them!).
#include them here, instead.
 1.32  14-Mar-2010  dyoung branches: 1.32.2;
Use device_suspensor_t instead of struct device_suspensor.
 1.31  24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.30  17-Jan-2010  pooka branches: 1.30.2;
Forward declare struct bpf_if and use that as the type for bpf_if
instead of "void *". Buys us oo times the type-safety for 0 times
the price.
(no functional change)
 1.29  16-Sep-2009  dyoung In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together. Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
#include it from <sys/pmf.h> instead of <sys/device.h> to break the
circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
suspend/resume call. Start to replace instances of PMF_FN_PROTO,
PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
device in suspension. More than one suspensor may hold a device
at once. A device stays suspended as long as at least one
suspensor holds it. A device resumes when the last suspensor
releases it.

Currently, the kernel defines three suspensors,

3a the system-suspensor: for system suspension, initiated
by 'sysctl -w machdep.sleep_state=3', by lid closure, by
power-button press, et cetera,

3b the drvctl-suspensor: for device suspension by /dev/drvctl
ioctl, e.g., drvctl -S sip0.

3c the system self-suspensor: for device drivers that suspend
themselves and their children. Several drivers for network
interfaces put the network device to sleep while it is not
administratively up, that is, after the kernel calls if_stop(,
1). The self-suspensor should not be used directly. See
the description of suspensor delegates, below.

A suspensor can have one or more "delegates". A suspensor can
release devices that its delegates hold suspended. Right now,
only the system self-suspensor has delegates. For each device
that a self-suspending driver attaches, it creates the device's
self-suspensor, a delegate of the system self-suspensor.

Suspensors stop a system-wide suspend/resume cycle from waking
devices that the operator put to sleep with drvctl before the cycle.
They also help self-suspension to work more simply, safely, and in
accord with expectations.

4. Add the notion of device activation level, devact_level_t,
and a routine for checking the current activation level,
device_activation(). Current activation levels are DEVACT_LEVEL_BUS,
DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
indicate that the device's bus is active, that the bus and device are
active, and that the bus, device, and the functions of the device's
class (network, audio) are active.

Suspend/resume calls can be qualified with a devact_level_t.
The power-management framework treats a devact_level_t that
qualifies a device suspension as the device's current activation
level; it only runs hooks to reduce the activation level from
the presumed current level to the fully suspended state. The
framework treats a devact_level_t qualifying device resumption
as the target activation level; it only runs hooks to raise the
activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
drivers.

6. Temporarily add an unused power-management workqueue that I will
remove or replace, soon.
 1.28  02-Aug-2009  jmcneill - fix TKIP, changes adapted from FreeBSD
- reduce diffs between FreeBSD and NetBSD athvar.h
 1.27  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.26  11-Dec-2008  alc branches: 1.26.2;
Sync ath(4) with the new HAL, mostly based on <jmcneill>'s patches.

Everything should be fine again !
 1.25  09-Jul-2008  joerg branches: 1.25.2; 1.25.4; 1.25.10;
- device/softc split for ath(4)
 1.24  12-Mar-2008  dyoung branches: 1.24.4; 1.24.6; 1.24.8; 1.24.10;
Use device_t and its accessors throughout. Use aprint_*_dev().

Improve PMF-ability.

Add a 'flags' argument to suspend/resume handlers and
callers such as pmf_system_suspend().

Define a flag, PMF_F_SELF, which indicates to PMF that a
device is suspending/resuming itself. Add helper routines,
pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
that call pmf_device_suspend(dev, PMF_F_SELF) and
pmf_device_resume(dev, PMF_F_SELF), respectively. Use
PMF_F_SELF to suspend/resume self in ath(4), audio(4),
rtw(4), and sip(4).

In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
callbacks, provided by the bus front-end, with
self-suspension/resumption. Also, clean up the bus
front-ends. Make sure that the interrupt handler is
disestablished during suspension. Get rid of driver-private
flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
device_is_active()/device_has_power() calls, instead.

In the network-class suspend handler, call if_stop(, 0)
instead of if_stop(, 1), because the latter is superfluous
(bus- and driver-suspension hooks will 'disable' the NIC),
and it may cause recursion.

In the network-class resume handler, prevent infinite
recursion through if_init() by getting out early if we are
self-suspending (PMF_F_SELF).

rtw(4) improvements:

Destroy rtw(4) callouts when we detach it. Make rtw at
pci detachable. Print some more information with the "rx
frame too long" warning.

Remove activate() methods:

Get rid of rtw_activate() and ath_activate(). The device
activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

Introduce a boolean device property, "pmf-powerdown". If
pmf-powerdown is present and false, it indicates that a
bus back-end should not remove power from a device.

Honor this property in cardbus_child_suspend().

Set this property to 'false' in ath_attach(), since removing
power from an ath at cardbus seems to lobotomize the WPA
crypto engine. XXX Should the pmf-powerdown property
propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

Warn if ath(4) tries to write crypto keys to suspended
hardware.

Reduce differences between FreeBSD and NetBSD in ath(4)
multicast filter setup.

Make ath_printrxbuf() print an rx descriptor's status &
key index, to help debug crypto errors.

Shorten a staircase in ath_ioctl(). Don't check for
ieee80211_ioctl() return code ERESTART, it never happens.
 1.23  22-Dec-2007  dyoung branches: 1.23.2; 1.23.6;
Remove the remnants of the powerhooks.
 1.22  09-Dec-2007  jmcneill branches: 1.22.2;
Merge jmcneill-pm branch.
 1.21  17-Jul-2007  dyoung branches: 1.21.6; 1.21.8; 1.21.16; 1.21.18;
Suppress spurious timeouts and avoid wedging in OACTIVE state:

1 Set or clear OACTIVE as transmit buffers are depleted or
replenished, respectively. Do not use 802.11 acknowledgements
as a criteria for clearing OACTIVE.

2 Let each transmit queue count down to timeout independently,
and get rid of the shared countdown (sc_tx_timer). When
we add a packet to a transmit queue, restart the queue's
countdown. Stop a transmit queue's countdown when the
queue empties.
 1.20  04-Mar-2007  christos branches: 1.20.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19  14-Jul-2006  seanb branches: 1.19.10;
Consistently establish / disestablish shutdown hook
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
 1.18  05-Jun-2006  gdamore Import new HAL 0.9.17.2. Approved by sam@

New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices. MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
 1.17  26-May-2006  blymn Clean up bogus whitespace
 1.16  02-Apr-2006  gdamore branches: 1.16.2;
Reorganize ath layout as requested by sam@ and suggested by dyoung@ in
http://mail-index.netbsd.org/tech-net/2006/03/15/0000.html.

The new layout almost precisely matches FreeBSD, and should make
future imports much easier.

At the same time, import the current 0.9.16.16 HAL from FreeBSD. According
to sam@, this is the proper version we should be using.
 1.15  02-Mar-2006  dyoung branches: 1.15.2; 1.15.4; 1.15.6;
Miscellaneous ath(4) and net80211 updates and bug-fixes coming from
sam@ and various open source repositories:

ath(4):

Ignore "phantom" beacon misses: should stabilize connections
to access points (no more ceaseless link-UP/DOWN indications).
Also, re-synchronize beacon timer using the TSF in the
first beacon received after joining a BSS---this should
also help suppress spurious beacon misses. I am hopeful
that this will help ath(4) lossage reported by perry@ and
smb@.

Add new configuration through sysctl.

Use a shorter calibration interval until IQ calibration
finishes.

Report antenna noise through radiotap.

Rudiments of Radar Detection / Dynamic Frequency Selection.

Update to HAL version 0.9.16.13.

Update open sources for changes to the HAL API.

Add HALs for additional architectures: add big-endian ELF
HALs for sparc64 and for PowerPC. Also add a Alpha HAL.
These new HALs are untested under NetBSD.

ath(4) + net80211:

Make the multicast transmit rate configurable by ioctl.

Miscellaneous bug fixes.
 1.14  18-Nov-2005  skrll branches: 1.14.4; 1.14.6;
Resolve conflicts.
 1.13  26-Jul-2005  dyoung branches: 1.13.6;
Resolve conflicts.
 1.12  30-Jun-2005  dyoung branches: 1.12.2;
Fix $FreeBSD$ RCS IDs, which gave me a real shock when their revision
numbers moved backwards.
 1.11  22-Jun-2005  dyoung Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
 1.10  10-Aug-2004  dyoung IBSS fixes: get IBSS beacon generation right. Merge with a same-SSID,
same-channel IBSS.
 1.9  28-Jul-2004  dyoung branches: 1.9.2;
Finalize import of the Atheros HAL 0.9.9.13, bringing ath(4)
up-to-date where the HAL API changed.
 1.8  30-Apr-2004  dyoung Sync with FreeBSD. Here are the changes FreeBSD has made:
 1.7  29-Feb-2004  dyoung Update ath(4)'s Hardware Abstraction Layer (HAL) to version 0.9.6.11.

Both the API and ABI changed, hence the changes to so many .c and
.h files.
 1.6  16-Dec-2003  dyoung Synchronize with FreeBSD:

* add constants to enums

* HAL update: stops panics, fixes ad hoc-mode beacons, some API
changes

* get and use mac/phy/rf front-end revision codes

* add a custom ath(4) ic_node_getrssi callback which does RSSI
averaging

* do not immediately scan, but re-associate after missing beacons.

* bug fix: don't if_init after detach.

* HAL diagnostics ioctl, SIOCGATHDIAG

* send DS parameters element in beacons

* const-ify some pointers

* consolidate rx-filter settings into ath_calcrxfilter

* abstract FreeBSD `ticks', NetBSD `hardclock_ticks' with ATH_TICKS()

* misc. other changes
 1.5  16-Oct-2003  ichiro add {shutdownhook,powerhook}disestablish()
 1.4  15-Oct-2003  itojun add $NetBSD$
 1.3  14-Oct-2003  ichiro add support ath on cardbus
- implement power management
 1.2  13-Oct-2003  dyoung Miscellaneous changes for NetBSD compatibility.
 1.1  07-Oct-2003  dyoung branches: 1.1.1;
Initial revision
 1.1.1.6  18-Nov-2005  skrll Import FreeBSD's ath(4) of 1-nov-2005
 1.1.1.5  26-Jul-2005  dyoung Import FreeBSD's ath(4) of 2005-07-11
 1.1.1.4  21-Jun-2005  dyoung Import FreeBSD's ath(4) of 2005-05-18
 1.1.1.3  29-Apr-2004  dyoung Import FreeBSD's ath of 28-apr-2004
 1.1.1.2  15-Dec-2003  dyoung Import FreeBSD's ath of 12-dec-2003
 1.1.1.1  07-Oct-2003  dyoung Initial import of ath(4) from FreeBSD.
 1.9.2.7  11-Dec-2005  christos Sync with head.
 1.9.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.9.2.3  12-Aug-2004  skrll Sync with HEAD.
 1.9.2.2  03-Aug-2004  skrll Sync with HEAD
 1.9.2.1  28-Jul-2004  skrll file athvar.h was added on branch ktrace-lwp on 2004-08-03 10:46:10 +0000
 1.12.2.5  17-Mar-2008  yamt sync with head.
 1.12.2.4  21-Jan-2008  yamt sync with head
 1.12.2.3  03-Sep-2007  yamt sync with head.
 1.12.2.2  30-Dec-2006  yamt sync with head.
 1.12.2.1  21-Jun-2006  yamt sync with head.
 1.13.6.1  22-Nov-2005  yamt sync with head.
 1.14.6.3  07-Jun-2006  kardel Sync with head.
 1.14.6.2  01-Jun-2006  kardel Sync with head.
 1.14.6.1  22-Apr-2006  simonb Sync with head.
 1.14.4.1  09-Sep-2006  rpaulo sync with head
 1.15.6.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.15.4.1  19-Apr-2006  elad sync with head.
 1.15.2.3  11-Aug-2006  yamt sync with head
 1.15.2.2  26-Jun-2006  yamt sync with head.
 1.15.2.1  11-Apr-2006  yamt sync with head
 1.16.2.1  19-Jun-2006  chap Sync with head.
 1.19.10.1  12-Mar-2007  rmind Sync with HEAD.
 1.20.2.1  20-Aug-2007  ad Sync with HEAD.
 1.21.18.1  11-Dec-2007  yamt sync with head.
 1.21.16.1  26-Dec-2007  ad Sync with head.
 1.21.8.2  23-Mar-2008  matt sync with HEAD
 1.21.8.1  09-Jan-2008  matt sync with HEAD
 1.21.6.2  01-Oct-2007  joerg Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.
 1.21.6.1  23-Aug-2007  joerg Convert ath(4) to new style power management.
Remove the resetting of the PCI retry register on resume,
the restored configuration should have it already.
 1.22.2.1  02-Jan-2008  bouyer Sync with HEAD
 1.23.6.3  17-Jan-2009  mjf Sync with HEAD.
 1.23.6.2  28-Sep-2008  mjf Sync with HEAD.
 1.23.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.23.2.1  24-Mar-2008  keiichi sync with head.
 1.24.10.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.24.10.1  19-Oct-2008  haad Sync with HEAD.
 1.24.8.1  18-Jul-2008  simonb Sync with head.
 1.24.6.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.4.5  11-Aug-2010  yamt sync with head.
 1.24.4.4  11-Mar-2010  yamt sync with head
 1.24.4.3  19-Aug-2009  yamt sync with head.
 1.24.4.2  16-May-2009  yamt sync with head
 1.24.4.1  04-May-2009  yamt sync with head.
 1.25.10.1  21-Apr-2010  matt sync to netbsd-5
 1.25.4.2  07-Aug-2009  snj Pull up following revision(s) (requested by jmcneill in ticket #775):
sys/dev/ic/ath.c: revision 1.106
sys/dev/ic/athvar.h: revision 1.28
- fix TKIP, changes adapted from FreeBSD
- reduce diffs between FreeBSD and NetBSD athvar.h
 1.25.4.1  07-Aug-2009  snj Apply patch (requested by jmcneill in ticket 775):
Update to the open source atheros HAL.
 1.25.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.26.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.32.2.2  21-Apr-2011  rmind sync with head
 1.32.2.1  30-May-2010  rmind sync with head
 1.33.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.35.12.1  25-Feb-2013  tls resync with head
 1.35.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed