diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2015-03-22 14:29:48 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-03-30 04:31:23 -0400 |
commit | 0202a553f59b7d0df4db56d0ce64c702afea64d0 (patch) | |
tree | 5cb54907ab24c1e6840e45e53d05d19e0b839e26 /drivers/net/wireless/ath/ath9k | |
parent | 8d1cbdef8a640536d0af1ee57930f671127329d5 (diff) |
ath9k: ar9271_hw_pa_cal: use proper makroses.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_calib.c | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index 4576b99dd0cc..8d24a73ca9f2 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
@@ -443,33 +443,30 @@ static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset) | |||
443 | for (i = 0; i < ARRAY_SIZE(regList); i++) | 443 | for (i = 0; i < ARRAY_SIZE(regList); i++) |
444 | regList[i][1] = REG_READ(ah, regList[i][0]); | 444 | regList[i][1] = REG_READ(ah, regList[i][0]); |
445 | 445 | ||
446 | regVal = REG_READ(ah, AR9285_AN_RF2G6); | 446 | /* 7834, b1=0 */ |
447 | regVal &= (~(0x1)); | 447 | REG_CLR_BIT(ah, AR9285_AN_RF2G6, 1 << 0); |
448 | REG_WRITE(ah, AR9285_AN_RF2G6, regVal); | 448 | /* 9808, b27=1 */ |
449 | regVal = REG_READ(ah, 0x9808); | 449 | REG_SET_BIT(ah, 0x9808, 1 << 27); |
450 | regVal |= (0x1 << 27); | ||
451 | REG_WRITE(ah, 0x9808, regVal); | ||
452 | |||
453 | /* 786c,b23,1, pwddac=1 */ | 450 | /* 786c,b23,1, pwddac=1 */ |
454 | REG_RMW_FIELD(ah, AR9285_AN_TOP3, AR9285_AN_TOP3_PWDDAC, 1); | 451 | REG_SET_BIT(ah, AR9285_AN_TOP3, AR9285_AN_TOP3_PWDDAC); |
455 | /* 7854, b5,1, pdrxtxbb=1 */ | 452 | /* 7854, b5,1, pdrxtxbb=1 */ |
456 | REG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDRXTXBB1, 1); | 453 | REG_SET_BIT(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDRXTXBB1); |
457 | /* 7854, b7,1, pdv2i=1 */ | 454 | /* 7854, b7,1, pdv2i=1 */ |
458 | REG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDV2I, 1); | 455 | REG_SET_BIT(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDV2I); |
459 | /* 7854, b8,1, pddacinterface=1 */ | 456 | /* 7854, b8,1, pddacinterface=1 */ |
460 | REG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDDACIF, 1); | 457 | REG_SET_BIT(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDDACIF); |
461 | /* 7824,b12,0, offcal=0 */ | 458 | /* 7824,b12,0, offcal=0 */ |
462 | REG_RMW_FIELD(ah, AR9285_AN_RF2G2, AR9285_AN_RF2G2_OFFCAL, 0); | 459 | REG_CLR_BIT(ah, AR9285_AN_RF2G2, AR9285_AN_RF2G2_OFFCAL); |
463 | /* 7838, b1,0, pwddb=0 */ | 460 | /* 7838, b1,0, pwddb=0 */ |
464 | REG_RMW_FIELD(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PWDDB, 0); | 461 | REG_CLR_BIT(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PWDDB); |
465 | /* 7820,b11,0, enpacal=0 */ | 462 | /* 7820,b11,0, enpacal=0 */ |
466 | REG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_ENPACAL, 0); | 463 | REG_CLR_BIT(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_ENPACAL); |
467 | /* 7820,b25,1, pdpadrv1=0 */ | 464 | /* 7820,b25,1, pdpadrv1=0 */ |
468 | REG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV1, 0); | 465 | REG_CLR_BIT(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV1); |
469 | /* 7820,b24,0, pdpadrv2=0 */ | 466 | /* 7820,b24,0, pdpadrv2=0 */ |
470 | REG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV2, 0); | 467 | REG_CLR_BIT(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV2); |
471 | /* 7820,b23,0, pdpaout=0 */ | 468 | /* 7820,b23,0, pdpaout=0 */ |
472 | REG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPAOUT, 0); | 469 | REG_CLR_BIT(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPAOUT); |
473 | /* 783c,b14-16,7, padrvgn2tab_0=7 */ | 470 | /* 783c,b14-16,7, padrvgn2tab_0=7 */ |
474 | REG_RMW_FIELD(ah, AR9285_AN_RF2G8, AR9285_AN_RF2G8_PADRVGN2TAB0, 7); | 471 | REG_RMW_FIELD(ah, AR9285_AN_RF2G8, AR9285_AN_RF2G8_PADRVGN2TAB0, 7); |
475 | /* | 472 | /* |
@@ -516,15 +513,13 @@ static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset) | |||
516 | ah->pacal_info.prev_offset = regVal; | 513 | ah->pacal_info.prev_offset = regVal; |
517 | } | 514 | } |
518 | 515 | ||
519 | ENABLE_REGWRITE_BUFFER(ah); | ||
520 | 516 | ||
521 | regVal = REG_READ(ah, AR_AN_RF2G1_CH1); | 517 | /* 7834, b1=1 */ |
522 | regVal |= 0x1; | 518 | REG_SET_BIT(ah, AR9285_AN_RF2G6, 1 << 0); |
523 | REG_WRITE(ah, AR_AN_RF2G1_CH1, regVal); | 519 | /* 9808, b27=0 */ |
524 | regVal = REG_READ(ah, 0x9808); | 520 | REG_CLR_BIT(ah, 0x9808, 1 << 27); |
525 | regVal &= (~(0x1 << 27)); | ||
526 | REG_WRITE(ah, 0x9808, regVal); | ||
527 | 521 | ||
522 | ENABLE_REGWRITE_BUFFER(ah); | ||
528 | for (i = 0; i < ARRAY_SIZE(regList); i++) | 523 | for (i = 0; i < ARRAY_SIZE(regList); i++) |
529 | REG_WRITE(ah, regList[i][0], regList[i][1]); | 524 | REG_WRITE(ah, regList[i][0], regList[i][1]); |
530 | 525 | ||