| Fix some type errors in ath(4) code that exposed by gcc(1). |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c freebsd-10.3/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2016-03-25 09:09:48.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2019-03-11 17:50:44.891347556 +0800 |
| @@ -698,7 +698,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]; |
| } |
| |
| @@ -734,7 +734,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]; |
| } |
| |
| @@ -770,7 +770,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 /var/tmp/freebsd-10.3-src/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c freebsd-10.3/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2016-03-25 09:09:37.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2019-03-11 17:41:43.912375489 +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 /var/tmp/freebsd-10.3-src/usr/src/sys/dev/ath/if_athvar.h freebsd-10.3/usr/src/sys/dev/ath/if_athvar.h |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/dev/ath/if_athvar.h 2016-03-25 09:09:38.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/dev/ath/if_athvar.h 2019-03-11 17:34:38.028399424 +0800 |
| @@ -1299,9 +1299,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))) |