summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800.h
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-07-08 11:25:55 +0200
committerJohn W. Linville <linville@tuxdriver.com>2013-07-22 22:54:28 +0200
commit379448fe34e289fdcc473399d4f6cac19e757fb8 (patch)
treec2989b0994d67f1500a7a07f4403f8a19309a9d4 /drivers/net/wireless/rt2x00/rt2800.h
parentrt2x00: rt2800lib: introduce rt2800_eeprom_read_from_array helper (diff)
downloadlinux-379448fe34e289fdcc473399d4f6cac19e757fb8.tar.xz
linux-379448fe34e289fdcc473399d4f6cac19e757fb8.zip
rt2x00: rt2800lib: introduce rt2800_eeprom_word_index helper
Instead of assign the offset value to the enum directly use a new helper function to convert a rt2800_eeprom_word enum into an index of the rt2x00_dev->eeprom array. The patch does not change the existing behaviour, but makes it possible to add support for three-chain devices which are using a different EEPROM layout. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h76
1 files changed, 39 insertions, 37 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 064703933f7c..bc5c69558ea2 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2207,43 +2207,45 @@ struct mac_iveiv_entry {
*/
enum rt2800_eeprom_word {
- EEPROM_CHIP_ID = 0x0000,
- EEPROM_VERSION = 0x0001,
- EEPROM_MAC_ADDR_0 = 0x0002,
- EEPROM_MAC_ADDR_1 = 0x0003,
- EEPROM_MAC_ADDR_2 = 0x0004,
- EEPROM_NIC_CONF0 = 0x001a,
- EEPROM_NIC_CONF1 = 0x001b,
- EEPROM_FREQ = 0x001d,
- EEPROM_LED_AG_CONF = 0x001e,
- EEPROM_LED_ACT_CONF = 0x001f,
- EEPROM_LED_POLARITY = 0x0020,
- EEPROM_NIC_CONF2 = 0x0021,
- EEPROM_LNA = 0x0022,
- EEPROM_RSSI_BG = 0x0023,
- EEPROM_RSSI_BG2 = 0x0024,
- EEPROM_TXMIXER_GAIN_BG = 0x0024, /* overlaps with RSSI_BG2 */
- EEPROM_RSSI_A = 0x0025,
- EEPROM_RSSI_A2 = 0x0026,
- EEPROM_TXMIXER_GAIN_A = 0x0026, /* overlaps with RSSI_A2 */
- EEPROM_EIRP_MAX_TX_POWER = 0x0027,
- EEPROM_TXPOWER_DELTA = 0x0028,
- EEPROM_TXPOWER_BG1 = 0x0029,
- EEPROM_TXPOWER_BG2 = 0x0030,
- EEPROM_TSSI_BOUND_BG1 = 0x0037,
- EEPROM_TSSI_BOUND_BG2 = 0x0038,
- EEPROM_TSSI_BOUND_BG3 = 0x0039,
- EEPROM_TSSI_BOUND_BG4 = 0x003a,
- EEPROM_TSSI_BOUND_BG5 = 0x003b,
- EEPROM_TXPOWER_A1 = 0x003c,
- EEPROM_TXPOWER_A2 = 0x0053,
- EEPROM_TSSI_BOUND_A1 = 0x006a,
- EEPROM_TSSI_BOUND_A2 = 0x006b,
- EEPROM_TSSI_BOUND_A3 = 0x006c,
- EEPROM_TSSI_BOUND_A4 = 0x006d,
- EEPROM_TSSI_BOUND_A5 = 0x006e,
- EEPROM_TXPOWER_BYRATE = 0x006f,
- EEPROM_BBP_START = 0x0078,
+ EEPROM_CHIP_ID = 0,
+ EEPROM_VERSION,
+ EEPROM_MAC_ADDR_0,
+ EEPROM_MAC_ADDR_1,
+ EEPROM_MAC_ADDR_2,
+ EEPROM_NIC_CONF0,
+ EEPROM_NIC_CONF1,
+ EEPROM_FREQ,
+ EEPROM_LED_AG_CONF,
+ EEPROM_LED_ACT_CONF,
+ EEPROM_LED_POLARITY,
+ EEPROM_NIC_CONF2,
+ EEPROM_LNA,
+ EEPROM_RSSI_BG,
+ EEPROM_RSSI_BG2,
+ EEPROM_TXMIXER_GAIN_BG,
+ EEPROM_RSSI_A,
+ EEPROM_RSSI_A2,
+ EEPROM_TXMIXER_GAIN_A,
+ EEPROM_EIRP_MAX_TX_POWER,
+ EEPROM_TXPOWER_DELTA,
+ EEPROM_TXPOWER_BG1,
+ EEPROM_TXPOWER_BG2,
+ EEPROM_TSSI_BOUND_BG1,
+ EEPROM_TSSI_BOUND_BG2,
+ EEPROM_TSSI_BOUND_BG3,
+ EEPROM_TSSI_BOUND_BG4,
+ EEPROM_TSSI_BOUND_BG5,
+ EEPROM_TXPOWER_A1,
+ EEPROM_TXPOWER_A2,
+ EEPROM_TSSI_BOUND_A1,
+ EEPROM_TSSI_BOUND_A2,
+ EEPROM_TSSI_BOUND_A3,
+ EEPROM_TSSI_BOUND_A4,
+ EEPROM_TSSI_BOUND_A5,
+ EEPROM_TXPOWER_BYRATE,
+ EEPROM_BBP_START,
+ /* New values must be added before this */
+ EEPROM_WORD_COUNT
};
/*