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
|
||
|---|---|---|
| .. | ||
| ath_dfs/null | ||
| ath_hal | ||
| ath_rate | ||
| ah_osdep.c | ||
| ah_osdep.h | ||
| ah_osdep_ar5210.c | ||
| ah_osdep_ar5211.c | ||
| ah_osdep_ar5212.c | ||
| ah_osdep_ar5416.c | ||
| ah_osdep_ar9300.c | ||
| if_ath.c | ||
| if_ath_alq.c | ||
| if_ath_alq.h | ||
| if_ath_beacon.c | ||
| if_ath_beacon.h | ||
| if_ath_btcoex.c | ||
| if_ath_btcoex.h | ||
| if_ath_btcoex_mci.c | ||
| if_ath_btcoex_mci.h | ||
| if_ath_debug.c | ||
| if_ath_debug.h | ||
| if_ath_descdma.c | ||
| if_ath_descdma.h | ||
| if_ath_dfs.c | ||
| if_ath_drv.c | ||
| if_ath_ioctl.c | ||
| if_ath_ioctl.h | ||
| if_ath_keycache.c | ||
| if_ath_keycache.h | ||
| if_ath_led.c | ||
| if_ath_led.h | ||
| if_ath_lna_div.c | ||
| if_ath_lna_div.h | ||
| if_ath_misc.h | ||
| if_ath_pci.c | ||
| if_ath_pci_devlist.h | ||
| if_ath_rate.c | ||
| if_ath_rx.c | ||
| if_ath_rx.h | ||
| if_ath_rx_edma.c | ||
| if_ath_rx_edma.h | ||
| if_ath_spectral.c | ||
| if_ath_spectral.h | ||
| if_ath_sysctl.c | ||
| if_ath_sysctl.h | ||
| if_ath_tdma.c | ||
| if_ath_tdma.h | ||
| if_ath_tsf.h | ||
| if_ath_tx.c | ||
| if_ath_tx.h | ||
| if_ath_tx_edma.c | ||
| if_ath_tx_edma.h | ||
| if_ath_tx_ht.c | ||
| if_ath_tx_ht.h | ||
| if_athdfs.h | ||
| if_athioctl.h | ||
| if_athrate.h | ||
| if_athvar.h | ||