opnsense-src/sys/dev/ath/ath_hal/ar9002
Dimitry Andric 36d486cc2e 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
2024-10-23 20:26:35 +02:00
..
ar9002phy.h
ar9280.c
ar9280.h
ar9280_attach.c ath: Fix typo (triple M) 2024-02-02 18:35:00 -07:00
ar9280_olc.c
ar9280_olc.h
ar9280v1.ini
ar9280v2.ini
ar9285.c
ar9285.h
ar9285.ini
ar9285_attach.c ath: Fix typo (triple M) 2024-02-02 18:35:00 -07:00
ar9285_btcoex.c Fix enum warning in ath_hal's ar9002 2024-10-23 20:26:35 +02:00
ar9285_cal.c
ar9285_cal.h
ar9285_diversity.c
ar9285_diversity.h
ar9285_phy.c
ar9285_phy.h
ar9285_reset.c
ar9285an.h
ar9285phy.h
ar9285v2.ini
ar9287.c
ar9287.h
ar9287.ini
ar9287_attach.c ath: Fix typo (triple M) 2024-02-02 18:35:00 -07:00
ar9287_cal.c
ar9287_cal.h
ar9287_olc.c
ar9287_olc.h
ar9287_reset.c
ar9287_reset.h
ar9287an.h
ar9287phy.h