aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-11 18:51:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:31 -0500
commit4ddfcd7daf57247ff718b849a152d97a80b7ae4d (patch)
treea1d3bcf22e6e1ddc4bf79fee3101a4f8cdee8063 /drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
parent040b74f741b20dbf07359716d5c540356a036ade (diff)
ath9k_hw: clean up duplicate and unnused eeprom related defines
AR*_MAX_RATE_POWER => MAX_RATE_POWER AR*_EEPROM_MODAL_SPURS => AR_EEPROM_MODAL_SPURS AR*_OPFLAGS_* => AR5416_OPFLAGS_* ... Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_eeprom.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 1f5aa51b9ce..2fc3260579a 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -72,7 +72,7 @@ static const struct ar9300_eeprom ar9300_default = {
72 .regDmn = { LE16(0), LE16(0x1f) }, 72 .regDmn = { LE16(0), LE16(0x1f) },
73 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ 73 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
74 .opCapFlags = { 74 .opCapFlags = {
75 .opFlags = AR9300_OPFLAGS_11G | AR9300_OPFLAGS_11A, 75 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
76 .eepMisc = 0, 76 .eepMisc = 0,
77 }, 77 },
78 .rfSilent = 0, 78 .rfSilent = 0,
@@ -649,7 +649,7 @@ static const struct ar9300_eeprom ar9300_x113 = {
649 .regDmn = { LE16(0), LE16(0x1f) }, 649 .regDmn = { LE16(0), LE16(0x1f) },
650 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ 650 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
651 .opCapFlags = { 651 .opCapFlags = {
652 .opFlags = AR9300_OPFLAGS_11G | AR9300_OPFLAGS_11A, 652 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
653 .eepMisc = 0, 653 .eepMisc = 0,
654 }, 654 },
655 .rfSilent = 0, 655 .rfSilent = 0,
@@ -1227,7 +1227,7 @@ static const struct ar9300_eeprom ar9300_h112 = {
1227 .regDmn = { LE16(0), LE16(0x1f) }, 1227 .regDmn = { LE16(0), LE16(0x1f) },
1228 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ 1228 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
1229 .opCapFlags = { 1229 .opCapFlags = {
1230 .opFlags = AR9300_OPFLAGS_11G | AR9300_OPFLAGS_11A, 1230 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
1231 .eepMisc = 0, 1231 .eepMisc = 0,
1232 }, 1232 },
1233 .rfSilent = 0, 1233 .rfSilent = 0,
@@ -1805,7 +1805,7 @@ static const struct ar9300_eeprom ar9300_x112 = {
1805 .regDmn = { LE16(0), LE16(0x1f) }, 1805 .regDmn = { LE16(0), LE16(0x1f) },
1806 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */ 1806 .txrxMask = 0x77, /* 4 bits tx and 4 bits rx */
1807 .opCapFlags = { 1807 .opCapFlags = {
1808 .opFlags = AR9300_OPFLAGS_11G | AR9300_OPFLAGS_11A, 1808 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
1809 .eepMisc = 0, 1809 .eepMisc = 0,
1810 }, 1810 },
1811 .rfSilent = 0, 1811 .rfSilent = 0,
@@ -2382,7 +2382,7 @@ static const struct ar9300_eeprom ar9300_h116 = {
2382 .regDmn = { LE16(0), LE16(0x1f) }, 2382 .regDmn = { LE16(0), LE16(0x1f) },
2383 .txrxMask = 0x33, /* 4 bits tx and 4 bits rx */ 2383 .txrxMask = 0x33, /* 4 bits tx and 4 bits rx */
2384 .opCapFlags = { 2384 .opCapFlags = {
2385 .opFlags = AR9300_OPFLAGS_11G | AR9300_OPFLAGS_11A, 2385 .opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
2386 .eepMisc = 0, 2386 .eepMisc = 0,
2387 }, 2387 },
2388 .rfSilent = 0, 2388 .rfSilent = 0,
@@ -2974,7 +2974,7 @@ static const struct ar9300_eeprom *ar9003_eeprom_struct_find_by_id(int id)
2974 2974
2975static u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz) 2975static u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz)
2976{ 2976{
2977 if (fbin == AR9300_BCHAN_UNUSED) 2977 if (fbin == AR5416_BCHAN_UNUSED)
2978 return fbin; 2978 return fbin;
2979 2979
2980 return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin)); 2980 return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
@@ -4485,7 +4485,7 @@ static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep,
4485 return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge - 1]); 4485 return CTL_EDGE_TPOWER(ctl_5g[idx].ctlEdges[edge - 1]);
4486 } 4486 }
4487 4487
4488 return AR9300_MAX_RATE_POWER; 4488 return MAX_RATE_POWER;
4489} 4489}
4490 4490
4491/* 4491/*
@@ -4494,7 +4494,7 @@ static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep,
4494static u16 ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep, 4494static u16 ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep,
4495 u16 freq, int idx, bool is2GHz) 4495 u16 freq, int idx, bool is2GHz)
4496{ 4496{
4497 u16 twiceMaxEdgePower = AR9300_MAX_RATE_POWER; 4497 u16 twiceMaxEdgePower = MAX_RATE_POWER;
4498 u8 *ctl_freqbin = is2GHz ? 4498 u8 *ctl_freqbin = is2GHz ?
4499 &eep->ctl_freqbin_2G[idx][0] : 4499 &eep->ctl_freqbin_2G[idx][0] :
4500 &eep->ctl_freqbin_5G[idx][0]; 4500 &eep->ctl_freqbin_5G[idx][0];
@@ -4504,7 +4504,7 @@ static u16 ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep,
4504 4504
4505 /* Get the edge power */ 4505 /* Get the edge power */
4506 for (edge = 0; 4506 for (edge = 0;
4507 (edge < num_edges) && (ctl_freqbin[edge] != AR9300_BCHAN_UNUSED); 4507 (edge < num_edges) && (ctl_freqbin[edge] != AR5416_BCHAN_UNUSED);
4508 edge++) { 4508 edge++) {
4509 /* 4509 /*
4510 * If there's an exact channel match or an inband flag set 4510 * If there's an exact channel match or an inband flag set
@@ -4542,9 +4542,9 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
4542 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 4542 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
4543 struct ath_common *common = ath9k_hw_common(ah); 4543 struct ath_common *common = ath9k_hw_common(ah);
4544 struct ar9300_eeprom *pEepData = &ah->eeprom.ar9300_eep; 4544 struct ar9300_eeprom *pEepData = &ah->eeprom.ar9300_eep;
4545 u16 twiceMaxEdgePower = AR9300_MAX_RATE_POWER; 4545 u16 twiceMaxEdgePower = MAX_RATE_POWER;
4546 static const u16 tpScaleReductionTable[5] = { 4546 static const u16 tpScaleReductionTable[5] = {
4547 0, 3, 6, 9, AR9300_MAX_RATE_POWER 4547 0, 3, 6, 9, MAX_RATE_POWER
4548 }; 4548 };
4549 int i; 4549 int i;
4550 int16_t twiceLargestAntenna; 4550 int16_t twiceLargestAntenna;