| Fix some type errors in ath(4) code that exposed by gcc(1). |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c freebsd-10.4/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2017-09-29 08:19:57.000000000 +0800 |
| +++ freebsd-10.4/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c 2019-08-17 23:18:44.924401780 +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/archive3/public/freebsd-releng-10.4-src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c freebsd-10.4/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2017-09-29 08:19:53.000000000 +0800 |
| +++ freebsd-10.4/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c 2019-08-17 23:18:44.924401780 +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/archive3/public/freebsd-releng-10.4-src/sys/dev/ath/if_athvar.h freebsd-10.4/sys/dev/ath/if_athvar.h |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/dev/ath/if_athvar.h 2017-09-29 08:19:53.000000000 +0800 |
| +++ freebsd-10.4/sys/dev/ath/if_athvar.h 2019-08-17 23:18:44.925397581 +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))) |