diff options
author | 2017-10-15 13:06:12 +0000 | |
---|---|---|
committer | 2017-10-15 13:06:12 +0000 | |
commit | 1dc85d112e441f7474df68cdb5e399a38a9fdee0 (patch) | |
tree | 99d6ae4d008a9e9ae3d30884c8e5057679c788c9 | |
parent | Add a regression test for ldexp(3). (diff) | |
download | wireguard-openbsd-1dc85d112e441f7474df68cdb5e399a38a9fdee0.tar.xz wireguard-openbsd-1dc85d112e441f7474df68cdb5e399a38a9fdee0.zip |
Initialize status return code in ar5k_ar5211_reset() and ar5k_ar5212_reset(),
in the same way as ar5k_ar5210_reset() does it.
Error messages were displaying uninitialized values:
"ath_reset: unable to reset hardware; hal status 3497439432"
ok mpi@
-rw-r--r-- | sys/dev/ic/ar5211.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/ar5212.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c index 4e669030a2e..956256e7bb9 100644 --- a/sys/dev/ic/ar5211.c +++ b/sys/dev/ic/ar5211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5211.c,v 1.48 2016/01/12 09:28:09 stsp Exp $ */ +/* $OpenBSD: ar5211.c,v 1.49 2017/10/15 13:06:12 stsp Exp $ */ /* * Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -416,6 +416,9 @@ ar5k_ar5211_reset(struct ath_hal *hal, HAL_OPMODE op_mode, HAL_CHANNEL *channel, u_int32_t data, s_seq, s_ant, s_led[3]; u_int i, mode, freq, ee_mode, ant[2]; + /* Not used, keep for HAL compatibility */ + *status = HAL_OK; + /* * Save some registers before a reset */ diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c index 6ec6d0df681..50a9b294119 100644 --- a/sys/dev/ic/ar5212.c +++ b/sys/dev/ic/ar5212.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5212.c,v 1.56 2016/01/12 09:28:09 stsp Exp $ */ +/* $OpenBSD: ar5212.c,v 1.57 2017/10/15 13:06:12 stsp Exp $ */ /* * Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -475,6 +475,9 @@ ar5k_ar5212_reset(struct ath_hal *hal, HAL_OPMODE op_mode, HAL_CHANNEL *channel, u_int i, mode, freq, ee_mode, ant[2]; const HAL_RATE_TABLE *rt; + /* Not used, keep for HAL compatibility */ + *status = HAL_OK; + /* * Save some registers before a reset */ |