diff options
author | adrian <adrian@FreeBSD.org> | 2015-11-09 15:59:42 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-11-09 15:59:42 +0000 |
commit | 3b4605608b04b3a91b69ea133f19fab2f8b38879 (patch) | |
tree | 27f89645c5020187ba7110c77132998f00d7ee1a /sys/contrib/dev | |
parent | 50d6b5faf455d78f6829aa57523ff8fe0d7cb83e (diff) | |
download | FreeBSD-src-3b4605608b04b3a91b69ea133f19fab2f8b38879.zip FreeBSD-src-3b4605608b04b3a91b69ea133f19fab2f8b38879.tar.gz |
ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.
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.
Diffstat (limited to 'sys/contrib/dev')
4 files changed, 4 insertions, 1 deletions
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c index 6118b82..0f817f6 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c @@ -313,6 +313,7 @@ ar9300_attach_freebsd_ops(struct ath_hal *ah) HAL_BOOL ar9300_reset_freebsd(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, + HAL_RESET_TYPE resetType, HAL_STATUS *status) { HAL_BOOL r; diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h index 524c3f3..3c77e72 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h @@ -4,7 +4,7 @@ extern void ar9300_attach_freebsd_ops(struct ath_hal *ah); extern HAL_BOOL ar9300_reset_freebsd(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, - HAL_STATUS *status); + HAL_RESET_TYPE resetType, HAL_STATUS *status); extern void ar9300_config_pcie_freebsd(struct ath_hal *, HAL_BOOL, HAL_BOOL); extern HAL_STATUS ar9300_eeprom_get_freebsd(struct ath_hal *, int param, void *val); diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c index 8cc6e76..7fe4374 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c @@ -765,6 +765,7 @@ ar9300_Stub_ProcRxDesc(struct ath_hal *ah, struct ath_desc *desc0, HAL_BOOL ar9300_Stub_Reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, + HAL_RESET_TYPE resetType, HAL_STATUS *status) { diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.h index e8d7225..82397f9 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.h +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.h @@ -128,6 +128,7 @@ extern HAL_STATUS ar9300_Stub_ProcRxDesc(struct ath_hal *ah, struct ath_desc *, extern HAL_BOOL ar9300_Stub_Reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, + HAL_RESET_TYPE resetType, HAL_STATUS *status); extern HAL_BOOL ar9300_Stub_SetChannel(struct ath_hal *, const struct ieee80211_channel *); |