| Fix some type errors in ath(4) code that exposed by gcc(1). |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c freebsd-11.1/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c |
| --- /usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2017-07-21 07:41:57.000000000 +0800 |
| +++ freebsd-11.1/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2019-03-22 15:17:19.308340000 +0800 |
| @@ -706,7 +706,7 @@ |
| * targetpower piers stored on eeprom |
| */ |
| for (i = 0; i < num_piers; i++) { |
| - freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); |
| + freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz ? HAL_FREQ_BAND_2GHZ : HAL_FREQ_BAND_5GHZ); |
| target_power_array[i] = p_eeprom_target_pwr[i].t_pow2x[rate_index]; |
| } |
| |
| @@ -742,7 +742,7 @@ |
| * targetpower piers stored on eeprom |
| */ |
| for (i = 0; i < num_piers; i++) { |
| - freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); |
| + freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz ? HAL_FREQ_BAND_2GHZ : HAL_FREQ_BAND_5GHZ); |
| target_power_array[i] = p_eeprom_target_pwr[i].t_pow2x[rate_index]; |
| } |
| |
| @@ -778,7 +778,7 @@ |
| * targetpower piers stored on eeprom |
| */ |
| for (i = 0; i < num_piers; i++) { |
| - freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz); |
| + freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz ? HAL_FREQ_BAND_2GHZ : HAL_FREQ_BAND_5GHZ); |
| target_power_array[i] = p_eeprom_target_pwr[i].t_pow2x[rate_index]; |
| } |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c freebsd-11.1/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c |
| --- /usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2017-07-21 07:41:52.000000000 +0800 |
| +++ freebsd-11.1/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2019-03-22 15:17:19.316218000 +0800 |
| @@ -54,7 +54,7 @@ |
| !! (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE)); |
| |
| if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || |
| - (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { |
| + (AH5212(ah)->ah_antControl != HAL_ANT_VARIABLE)) { |
| if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && |
| (AH5212(ah)->ah_antControl == HAL_ANT_VARIABLE)) { |
| /* Enable antenna diversity */ |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/dev/ath/if_athvar.h freebsd-11.1/usr/src/sys/dev/ath/if_athvar.h |
| --- /usr/src/sys/dev/ath/if_athvar.h 2017-07-21 07:41:52.000000000 +0800 |
| +++ freebsd-11.1/usr/src/sys/dev/ath/if_athvar.h 2019-03-22 15:17:19.318765000 +0800 |
| @@ -1346,9 +1346,9 @@ |
| #define ath_hal_getrxstatuslen(_ah, _req) \ |
| (ath_hal_getcapability(_ah, HAL_CAP_RXSTATUSLEN, 0, _req) \ |
| == HAL_OK) |
| +/* Return HAL_BOOL */ |
| #define ath_hal_setrxbufsize(_ah, _req) \ |
| - (ath_hal_setcapability(_ah, HAL_CAP_RXBUFSIZE, 0, _req, NULL) \ |
| - == HAL_OK) |
| + ath_hal_setcapability(_ah, HAL_CAP_RXBUFSIZE, 0, _req, NULL) |
| |
| #define ath_hal_getchannoise(_ah, _c) \ |
| ((*(_ah)->ah_getChanNoise)((_ah), (_c))) |