summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_athvar.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-05-25 02:07:59 +0000
committeradrian <adrian@FreeBSD.org>2012-05-25 02:07:59 +0000
commitbe5ba4a1c6b29919d741be32fb51b3137e7b545c (patch)
tree7feb46b6a04f7501d7da33c80208994f4ab2045e /sys/dev/ath/if_athvar.h
parenteda9e50c52e3c3311e30b433606b4c3cf6d6126a (diff)
downloadFreeBSD-src-be5ba4a1c6b29919d741be32fb51b3137e7b545c.zip
FreeBSD-src-be5ba4a1c6b29919d741be32fb51b3137e7b545c.tar.gz
Prepare for improved (read: pcie) suspend/resume support.
* Flesh out the pcie disable method for 11n chips, as they were defaulting to the AR5212 (empty) PCIe disable method. * Add accessor macros for the HAL PCIe enable/disable calls. * Call disable on ath_suspend() * Call enable on ath_resume() NOTE: * This has nothing to do with the NIC sleep/run state - the NIC still will stay in network-run state rather than supporting network-sleep state. This is preparation work for supporting correct suspend/resume WARs for the 11n PCIe NICs. TODO: * It may be feasible at this point to keep the chip powered down during initial probe/attach and only power it up upon the first configure/reset pass. This however would require correct (for values of "correct") tracking of the NIC power configuration state from the driver and that just isn't attempted at the moment. Tested: * AR9280 on my Lenovo T60, but with no suspend/resume pass (yet).
Diffstat (limited to 'sys/dev/ath/if_athvar.h')
-rw-r--r--sys/dev/ath/if_athvar.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index aafb338..3a97669 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -996,6 +996,14 @@ void ath_intr(void *);
((*(_ah)->ah_gpioSetIntr)((_ah), (_gpio), (_b)))
/*
+ * PCIe suspend/resume/poweron/poweroff related macros
+ */
+#define ath_hal_enablepcie(_ah, _restore) \
+ ((*(_ah)->ah_configPCIE)((_ah), (_restore)))
+#define ath_hal_disablepcie(_ah) \
+ ((*(_ah)->ah_disablePCIE)((_ah)))
+
+/*
* This is badly-named; you need to set the correct parameters
* to begin to receive useful radar events; and even then
* it doesn't "enable" DFS. See the ath_dfs/null/ module for
OpenPOWER on IntegriCloud