opnsense-src/sys/contrib/dev
Dimitry Andric ae3598b7a1 Fix enum warnings in ath_hal's ar9300
This fixes a number of clang 19 warnings:

    sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:709:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
      709 |         freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
      148 |     (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
          |       ~~~ ^  ~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:745:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
      745 |         freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
      148 |     (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
          |       ~~~ ^  ~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:781:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
      781 |         freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
      148 |     (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
          |       ~~~ ^  ~~~~~~~~~~~~~~~~~~

The `FBIN2FREQ()` and `FREQ2FBIN()` macros in `ar9300eep.h` are invoked
in most places around the `ath_hal` code with a (effectively) boolean
second argument, corresponding to "is this 2GHz?". But in the code that
is warned about, the value `HAL_FREQ_BAND_2GHZ` is of a different
non-boolean type, `HAL_FREQ_BAND`.

Update the `FBIN2FREQ()` and `FREQ2FBIN()` macros to interpret the
second argument as boolean value, and rename the macro parameter names
to better describe their meaning.

Reviewed by:	adrian, bz
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46201

(cherry picked from commit 82246ac5d890e031c9978052e5a431e0960182d5)
2024-08-13 11:24:12 +02:00
..
acpica acpica: Fix the botched merge 2022-10-27 22:36:35 -04:00
ath/ath_hal/ar9300 Fix enum warnings in ath_hal's ar9300 2024-08-13 11:24:12 +02:00
athk ath10k/rtw89: make compile again after LinuxKPI changes 2024-02-18 16:41:46 +00:00
ice ice_ddp: Update package to 1.3.36.0 2024-04-24 15:14:48 -07:00
imx Add the firmware blob required to use the sdma hardware in the imx6 2020-11-26 01:40:04 +00:00
ipw
iwi
iwlwifi iwlwifi: improve error message 2024-02-18 18:31:17 +00:00
iwlwififw iwlwififw: add firmware for the Bz/B200 chipset 2024-02-18 16:41:52 +00:00
iwm Downgrade the firmware images imported in r354201. 2019-11-03 03:23:27 +00:00
iwn
liquidio The diff is the initial submission of Cavium Liquidio 2350/2360 10/25G 2017-09-12 23:36:58 +00:00
mediatek/mt76 mt76: update driver from upstream 2023-08-21 01:34:03 +00:00
mwl
nvidia ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC. 2020-12-26 19:13:10 +01:00
otus Add an initial driver for the AR9170 series draft-11n hardware from 2015-09-26 07:08:35 +00:00
qat qat: Update firmware for 4xxx devices to version 1.1.20 2023-12-26 19:24:12 -05:00
qat_c2xxx qat: Move qat_c2xxx firmware files and build glue into separate dirs 2022-08-04 09:37:55 -04:00
ral
rsu
rtw88 LinuxKPI: Remove sys/rman.h include from LKPI headers. 2024-02-17 23:58:36 +03:00
rtw88fw rtw88: downgrade rtw8822c firmware to 9.9.10 2022-04-08 11:14:54 +00:00
rtw89 ath10k/rtw89: make compile again after LinuxKPI changes 2024-02-18 16:41:46 +00:00
rtw89fw rtw89: import firmware for Realtek's rtw89 supported chipsets. 2022-09-09 16:32:17 +00:00
rtwn rtwn_pci(4): add support for RTL8188EE chipset. 2019-01-02 06:48:53 +00:00
run
uath Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
wpi