opnsense-src/sys/dev/ath/ath_hal
Dimitry Andric 7905f6f1c7 Fix enum warning in ath_hal's ar9002
This fixes a clang 19 warning:

    sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c:57:32: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_ANT_SETTING') [-Werror,-Wenum-compare]
       57 |             (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {
          |              ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~

The `ah_diversity` field of `struct ath_hal_5212` is of type `HAL_BOOL`,
not the enum type `HAL_ANT_SETTING`. In other code, `ah_diversity` is
set to `AH_TRUE` whenever the related field `ah_antControl` is set to
`HAL_ANT_VARIABLE`.

It is not entirely clear to me what the intended statement is here: the
test as it is written now compares the enum value 0 to `ah_diversity`,
so in effect it enables the following block whenever `ah_diversity` is
`AH_TRUE`. Write it like that, to avoid the compiler warning.

MFC after:	3 days

(cherry picked from commit 36d486cc2ecdb9c290dba65bd5668b7e50d0d822)
2024-10-27 11:53:01 +01:00
..
ah_regdomain sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ar5210 ath_hal: Fix a couple of type mismatches in function prototypes 2024-01-03 09:43:48 -08:00
ar5211 ath_hal: Fix a couple of type mismatches in function prototypes 2024-01-03 09:43:48 -08:00
ar5212 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ar5312 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ar5416 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ar9001 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ar9002 Fix enum warning in ath_hal's ar9002 2024-10-27 11:53:01 +01:00
ar9003 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_btcoex.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_debug.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_decode.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_desc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_devid.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_diagcodes.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_9287.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_9287.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v1.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v1.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v3.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v3.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v4k.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v4k.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v14.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_eeprom_v14.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_regdomain.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_regdomain.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ah_soc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00