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;
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);
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_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 *);
HAL_M_MONITOR = 8 /* Monitor mode */
} HAL_OPMODE;
+typedef enum {
+ HAL_RESET_NORMAL = 0, /* Do normal reset */
+ HAL_RESET_BBPANIC = 1, /* Reset because of BB panic */
+ HAL_RESET_FORCE_COLD = 2, /* Force full reset */
+} HAL_RESET_TYPE;
+
typedef struct {
uint8_t kv_type; /* one of HAL_CIPHER */
uint8_t kv_apsd; /* Mask for APSD enabled ACs */
HAL_GEN_TIMER_TSF_ANY
} HAL_GEN_TIMER_DOMAIN;
-typedef enum {
- HAL_RESET_NONE = 0x0,
- HAL_RESET_BBPANIC = 0x1,
-} HAL_RESET_TYPE;
-
/*
* BT Co-existence definitions
*/
/* Reset functions */
HAL_BOOL __ahdecl(*ah_reset)(struct ath_hal *, HAL_OPMODE,
struct ieee80211_channel *,
- HAL_BOOL bChannelChange, HAL_STATUS *status);
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
+ HAL_STATUS *status);
HAL_BOOL __ahdecl(*ah_phyDisable)(struct ath_hal *);
HAL_BOOL __ahdecl(*ah_disable)(struct ath_hal *);
void __ahdecl(*ah_configPCIE)(struct ath_hal *, HAL_BOOL restore,
extern void ar5210Detach(struct ath_hal *ah);
extern HAL_BOOL ar5210Reset(struct ath_hal *, HAL_OPMODE,
- struct ieee80211_channel *, HAL_BOOL bChannelChange, HAL_STATUS *);
+ struct ieee80211_channel *, HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE, HAL_STATUS *);
extern void ar5210SetPCUConfig(struct ath_hal *);
extern HAL_BOOL ar5210PhyDisable(struct ath_hal *);
extern HAL_BOOL ar5210Disable(struct ath_hal *);
HAL_BOOL
ar5210Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
HAL_STATUS *status)
{
#define N(a) (sizeof (a) /sizeof (a[0]))
extern HAL_BOOL ar5211Reset(struct ath_hal *, HAL_OPMODE,
struct ieee80211_channel *, HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE,
HAL_STATUS *);
extern HAL_BOOL ar5211PhyDisable(struct ath_hal *);
extern HAL_BOOL ar5211Disable(struct ath_hal *);
HAL_BOOL
ar5211Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
HAL_STATUS *status)
{
uint32_t softLedCfg, softLedState;
extern HAL_BOOL ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
- HAL_STATUS *status);
+ HAL_RESET_TYPE, HAL_STATUS *status);
extern HAL_BOOL ar5212SetChannel(struct ath_hal *,
const struct ieee80211_channel *);
extern void ar5212SetOperatingMode(struct ath_hal *ah, int opmode);
HAL_BOOL
ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan,
- HAL_BOOL bChannelChange, HAL_STATUS *status)
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE, resetType,
+ HAL_STATUS *status)
{
#define N(a) (sizeof (a) / sizeof (a[0]))
#define FAIL(_code) do { ecode = _code; goto bad; } while (0)
extern void ar5312RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);
extern void ar5312DumpState(struct ath_hal *ah);
extern HAL_BOOL ar5312Reset(struct ath_hal *ah, HAL_OPMODE opmode,
- struct ieee80211_channel *chan,
- HAL_BOOL bChannelChange, HAL_STATUS *status);
+ struct ieee80211_channel *chan,
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
+ HAL_STATUS *status);
extern HAL_BOOL ar5312ChipReset(struct ath_hal *ah,
struct ieee80211_channel *chan);
extern HAL_BOOL ar5312SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
HAL_BOOL
ar5312Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan,
- HAL_BOOL bChannelChange, HAL_STATUS *status)
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
+ HAL_STATUS *status)
{
#define N(a) (sizeof (a) / sizeof (a[0]))
#define FAIL(_code) do { ecode = _code; goto bad; } while (0)
const struct ieee80211_channel *);
extern void ar5416AniPoll(struct ath_hal *, const struct ieee80211_channel *);
extern void ar5416AniReset(struct ath_hal *, const struct ieee80211_channel *,
- HAL_OPMODE, int);
+ HAL_OPMODE, HAL_RESET_TYPE, int);
extern void ar5416SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *);
extern void ar5416BeaconInit(struct ath_hal *ah,
extern HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan,
- HAL_BOOL bChannelChange, HAL_STATUS *status);
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE,
+ HAL_STATUS *status);
extern HAL_BOOL ar5416PhyDisable(struct ath_hal *ah);
extern HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah);
extern HAL_BOOL ar5416Disable(struct ath_hal *ah);
HAL_BOOL
ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode,
struct ieee80211_channel *chan,
- HAL_BOOL bChannelChange, HAL_STATUS *status)
+ HAL_BOOL bChannelChange,
+ HAL_RESET_TYPE resetType,
+ HAL_STATUS *status)
{
#define N(a) (sizeof (a) / sizeof (a[0]))
#define FAIL(_code) do { ecode = _code; goto bad; } while (0)
ath_hal_reset(ah, sc->sc_opmode,
sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan,
- AH_FALSE, &status);
+ AH_FALSE, HAL_RESET_NORMAL, &status);
ath_reset_keycache(sc);
ATH_RX_LOCK(sc);
sc->sc_cur_rxchainmask);
if (!ath_hal_reset(ah, sc->sc_opmode, ic->ic_curchan, AH_FALSE,
- &status)) {
+ HAL_RESET_NORMAL, &status)) {
device_printf(sc->sc_dev,
"unable to reset hardware; hal status %u\n", status);
return (ENODEV);
ath_update_chainmasks(sc, ic->ic_curchan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
- if (!ath_hal_reset(ah, sc->sc_opmode, ic->ic_curchan, AH_TRUE, &status))
+ if (!ath_hal_reset(ah, sc->sc_opmode, ic->ic_curchan, AH_TRUE,
+ HAL_RESET_NORMAL, &status))
device_printf(sc->sc_dev,
"%s: unable to reset hardware; hal status %u\n",
__func__, status);
ath_update_chainmasks(sc, chan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
- if (!ath_hal_reset(ah, sc->sc_opmode, chan, AH_TRUE, &status)) {
+ if (!ath_hal_reset(ah, sc->sc_opmode, chan, AH_TRUE,
+ HAL_RESET_NORMAL, &status)) {
device_printf(sc->sc_dev, "%s: unable to reset "
"channel %u (%u MHz, flags 0x%x), hal status %u\n",
__func__, ieee80211_chan2ieee(ic, chan),
*/
#define ath_hal_detach(_ah) \
((*(_ah)->ah_detach)((_ah)))
-#define ath_hal_reset(_ah, _opmode, _chan, _fullreset, _pstatus) \
- ((*(_ah)->ah_reset)((_ah), (_opmode), (_chan), (_fullreset), (_pstatus)))
+#define ath_hal_reset(_ah, _opmode, _chan, _fullreset, _resettype, _pstatus) \
+ ((*(_ah)->ah_reset)((_ah), (_opmode), (_chan), (_fullreset), \
+ (_resettype), (_pstatus)))
#define ath_hal_macversion(_ah) \
(((_ah)->ah_macVersion << 4) | ((_ah)->ah_macRev))
#define ath_hal_getratetable(_ah, _mode) \