atheroswifi: GCC2 fixes

This commit is contained in:
Jérôme Duval
2012-02-23 22:59:34 +01:00
parent 74bf05c232
commit 7f837074a6
2 changed files with 10 additions and 0 deletions
@@ -296,11 +296,16 @@ ar5416Attach(uint16_t devid, HAL_SOFTC sc,
HAL_INI_INIT(&AH5416(ah)->ah_ini_addac, ar5416Addac, 2);
if (! IS_5416V2_2(ah)) { /* Owl 2.1/2.0 */
#ifndef __HAIKU__
ath_hal_printf(ah, "[ath] Enabling CLKDRV workaround for AR5416 < v2.2\n");
#endif
struct ini {
uint32_t *data; /* NB: !const */
int rows, cols;
};
#ifdef __HAIKU__
ath_hal_printf(ah, "[ath] Enabling CLKDRV workaround for AR5416 < v2.2\n");
#endif
/* override CLKDRV value */
OS_MEMCPY(&AH5416(ah)[1], ar5416Addac, sizeof(ar5416Addac));
AH5416(ah)->ah_ini_addac.data = (uint32_t *) &AH5416(ah)[1];
@@ -352,8 +352,13 @@ ar9285SetBoardValues(struct ath_hal *ah, const struct ieee80211_channel *chan)
if (AR_SREV_9271(ah) || AR_SREV_KITE(ah)) {
uint8_t bb_desired_scale = (pModal->bb_scale_smrt_antenna & EEP_4K_BB_DESIRED_SCALE_MASK);
if ((eep->baseEepHeader.txGainType == 0) && (bb_desired_scale != 0)) {
#ifndef __HAIKU__
ath_hal_printf(ah, "[ath]: adjusting cck tx gain factor\n");
#endif
uint32_t pwrctrl, mask, clr;
#ifdef __HAIKU__
ath_hal_printf(ah, "[ath]: adjusting cck tx gain factor\n");
#endif
mask = (1<<0) | (1<<5) | (1<<10) | (1<<15) | (1<<20) | (1<<25);
pwrctrl = mask * bb_desired_scale;