Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys use correct enum types for various functions.
details: https://anonhg.NetBSD.org/src/rev/5d3e0653b93e
branches: trunk
changeset: 378434:5d3e0653b93e
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Apr 13 03:27:13 2021 +0000
description:
use correct enum types for various functions.
diffstat:
sys/dev/ic/ath.c | 6 ++--
sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c | 4 +-
sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c | 8 ++--
sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c | 22 ++++++++--------
sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c | 4 +-
sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c | 4 +-
sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c | 4 ++-
7 files changed, 27 insertions(+), 25 deletions(-)
diffs (202 lines):
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/dev/ic/ath.c
--- a/sys/dev/ic/ath.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/dev/ic/ath.c Tue Apr 13 03:27:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ath.c,v 1.133 2020/11/16 00:12:13 msaitoh Exp $ */
+/* $NetBSD: ath.c,v 1.134 2021/04/13 03:27:13 mrg Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.133 2020/11/16 00:12:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.134 2021/04/13 03:27:13 mrg Exp $");
#endif
/*
@@ -728,7 +728,7 @@ ath_resume(struct ath_softc *sc)
#if notyet
ath_hal_setpower(ah, HAL_PM_AWAKE);
#else
- ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, AH_FALSE, &status);
+ ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, HAL_M_IBSS, &status);
#endif
/*
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c
--- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c Tue Apr 13 03:27:13 2021 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ah_eeprom_v1.c,v 1.4 2008/12/12 21:31:49 alc Exp $
+ * $Id: ah_eeprom_v1.c,v 1.5 2021/04/13 03:27:13 mrg Exp $
*/
#include "opt_ah.h"
@@ -71,7 +71,7 @@ v1EepromGet(struct ath_hal *ah, int para
static HAL_BOOL
v1EepromSet(struct ath_hal *ah, int param, int v)
{
- return HAL_EINVAL;
+ return AH_FALSE;
}
static HAL_BOOL
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c
--- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c Tue Apr 13 03:27:13 2021 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ah_eeprom_v14.c,v 1.6 2012/12/11 09:22:16 msaitoh Exp $
+ * $Id: ah_eeprom_v14.c,v 1.7 2021/04/13 03:27:13 mrg Exp $
*/
#include "opt_ah.h"
@@ -137,12 +137,12 @@ v14EepromSet(struct ath_hal *ah, int par
switch (param) {
case AR_EEP_ANTGAINMAX_2:
ee->ee_antennaGainMax[1] = (int8_t) v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_ANTGAINMAX_5:
ee->ee_antennaGainMax[0] = (int8_t) v;
- return HAL_OK;
+ return AH_TRUE;
}
- return HAL_EINVAL;
+ return AH_FALSE;
}
static HAL_BOOL
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c
--- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c Tue Apr 13 03:27:13 2021 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ah_eeprom_v3.c,v 1.4 2013/09/12 11:26:53 martin Exp $
+ * $Id: ah_eeprom_v3.c,v 1.5 2021/04/13 03:27:13 mrg Exp $
*/
#include "opt_ah.h"
@@ -1671,45 +1671,45 @@ legacyEepromSet(struct ath_hal *ah, int
switch (param) {
case AR_EEP_AMODE:
ee->ee_Amode = v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_BMODE:
ee->ee_Bmode = v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_GMODE:
ee->ee_Gmode = v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_TURBO5DISABLE:
ee->ee_turbo5Disable = v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_TURBO2DISABLE:
ee->ee_turbo2Disable = v;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_COMPRESS:
if (v)
ee->ee_opCap &= ~AR_EEPROM_EEPCAP_COMPRESS_DIS;
else
ee->ee_opCap |= AR_EEPROM_EEPCAP_COMPRESS_DIS;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_FASTFRAME:
if (v)
ee->ee_opCap &= ~AR_EEPROM_EEPCAP_FASTFRAME_DIS;
else
ee->ee_opCap |= AR_EEPROM_EEPCAP_FASTFRAME_DIS;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_AES:
if (v)
ee->ee_opCap &= ~AR_EEPROM_EEPCAP_AES_DIS;
else
ee->ee_opCap |= AR_EEPROM_EEPCAP_AES_DIS;
- return HAL_OK;
+ return AH_TRUE;
case AR_EEP_BURST:
if (v)
ee->ee_opCap &= ~AR_EEPROM_EEPCAP_BURST_DIS;
else
ee->ee_opCap |= AR_EEPROM_EEPCAP_BURST_DIS;
- return HAL_OK;
+ return AH_TRUE;
}
- return HAL_EINVAL;
+ return AH_FALSE;
}
static HAL_BOOL
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
--- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c Tue Apr 13 03:27:13 2021 +0000
@@ -124,9 +124,9 @@ v4kEepromSet(struct ath_hal *ah, int par
switch (param) {
case AR_EEP_ANTGAINMAX_2:
ee->ee_antennaGainMax = (int8_t) v;
- return HAL_OK;
+ return AH_TRUE;
}
- return HAL_EINVAL;
+ return AH_FALSE;
}
static HAL_BOOL
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c
--- a/sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c Tue Apr 13 03:27:13 2021 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5212_attach.c,v 1.4 2011/03/07 11:25:43 cegger Exp $
+ * $Id: ar5212_attach.c,v 1.5 2021/04/13 03:27:13 mrg Exp $
*/
#include "opt_ah.h"
@@ -238,7 +238,7 @@ ar5212InitState(struct ath_hal_5212 *ahp
ahp->ah_antControl = HAL_ANT_VARIABLE;
ahp->ah_diversity = AH_TRUE;
- ahp->ah_bIQCalibration = AH_FALSE;
+ ahp->ah_bIQCalibration = IQ_CAL_INACTIVE;
/*
* Enable MIC handling.
*/
diff -r 628e8fd41f27 -r 5d3e0653b93e sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c
--- a/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c Tue Apr 13 03:09:42 2021 +0000
+++ b/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c Tue Apr 13 03:27:13 2021 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5212_xmit.c,v 1.3 2011/03/07 11:25:43 cegger Exp $
+ * $Id: ar5212_xmit.c,v 1.4 2021/04/13 03:27:13 mrg Exp $
*/
#include "opt_ah.h"
@@ -902,7 +902,9 @@ ar5212ProcTxDesc(struct ath_hal *ah,
*/
switch (ts->ts_finaltsi) {
case 3: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries2);
+ /* FALLTHRU */
case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
+ /* FALLTHRU */
case 1: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries0);
}
ts->ts_virtcol = MS(ads->ds_txstatus0, AR_VirtCollCnt);
Home |
Main Index |
Thread Index |
Old Index