diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-10-13 10:26:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:50 -0500 |
commit | 362f3b6bfbb18b4b8bd8a8ef391fb95efb43c632 (patch) | |
tree | 91f02554ab04887778477538e42eff2b71e123e3 /drivers/net | |
parent | ebcf26dae9f10e247ea41ef66f89b336ba456097 (diff) |
[PATCH] rt2x00: Use enum defines
When setting the default EEPROM values use
the values from the enums instead of "magic" values.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 6 |
4 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index e66a9429fd48..4386823f49d1 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1421,9 +1421,12 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1421 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1421 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
1422 | if (word == 0xffff) { | 1422 | if (word == 0xffff) { |
1423 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); | 1423 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); |
1424 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, 0); | 1424 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, |
1425 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, 0); | 1425 | ANTENNA_SW_DIVERSITY); |
1426 | rt2x00_set_field16(&word, EEPROM_ANTENNA_LED_MODE, 0); | 1426 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, |
1427 | ANTENNA_SW_DIVERSITY); | ||
1428 | rt2x00_set_field16(&word, EEPROM_ANTENNA_LED_MODE, | ||
1429 | LED_MODE_DEFAULT); | ||
1427 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); | 1430 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); |
1428 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1431 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
1429 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); | 1432 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 7d3e2828747a..98edd621c13b 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1163,9 +1163,12 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1163 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1163 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
1164 | if (word == 0xffff) { | 1164 | if (word == 0xffff) { |
1165 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); | 1165 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); |
1166 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, 0); | 1166 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, |
1167 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, 0); | 1167 | ANTENNA_SW_DIVERSITY); |
1168 | rt2x00_set_field16(&word, EEPROM_ANTENNA_LED_MODE, 0); | 1168 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, |
1169 | ANTENNA_SW_DIVERSITY); | ||
1170 | rt2x00_set_field16(&word, EEPROM_ANTENNA_LED_MODE, | ||
1171 | LED_MODE_DEFAULT); | ||
1169 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); | 1172 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); |
1170 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1173 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
1171 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); | 1174 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index f893825ce6dd..83b95a675f08 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1920,8 +1920,10 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1920 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1920 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
1921 | if (word == 0xffff) { | 1921 | if (word == 0xffff) { |
1922 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); | 1922 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); |
1923 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, 2); | 1923 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, |
1924 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, 2); | 1924 | ANTENNA_B); |
1925 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, | ||
1926 | ANTENNA_B); | ||
1925 | rt2x00_set_field16(&word, EEPROM_ANTENNA_FRAME_TYPE, 0); | 1927 | rt2x00_set_field16(&word, EEPROM_ANTENNA_FRAME_TYPE, 0); |
1926 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); | 1928 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); |
1927 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1929 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index e4ff106f588e..96d85aaf4250 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1391,8 +1391,10 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1391 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1391 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
1392 | if (word == 0xffff) { | 1392 | if (word == 0xffff) { |
1393 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); | 1393 | rt2x00_set_field16(&word, EEPROM_ANTENNA_NUM, 2); |
1394 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, 2); | 1394 | rt2x00_set_field16(&word, EEPROM_ANTENNA_TX_DEFAULT, |
1395 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, 2); | 1395 | ANTENNA_B); |
1396 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RX_DEFAULT, | ||
1397 | ANTENNA_B); | ||
1396 | rt2x00_set_field16(&word, EEPROM_ANTENNA_FRAME_TYPE, 0); | 1398 | rt2x00_set_field16(&word, EEPROM_ANTENNA_FRAME_TYPE, 0); |
1397 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); | 1399 | rt2x00_set_field16(&word, EEPROM_ANTENNA_DYN_TXAGC, 0); |
1398 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1400 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |