diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-22 14:52:27 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-01-22 14:52:27 +0000 |
commit | a0c3da6d61efd0c39c4728f710e2037b2f60faff (patch) | |
tree | ef7465220fe9d7f4a3b9c48182cd104fb12241e3 /package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch | |
parent | cfd684128b77f48e33030a8bd40a6073149f24ba (diff) | |
download | upstream-a0c3da6d61efd0c39c4728f710e2037b2f60faff.tar.gz upstream-a0c3da6d61efd0c39c4728f710e2037b2f60faff.tar.bz2 upstream-a0c3da6d61efd0c39c4728f710e2037b2f60faff.zip |
mac80211: update compat-wireless to 2009-01-19
SVN-Revision: 14145
Diffstat (limited to 'package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch')
-rw-r--r-- | package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch b/package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch new file mode 100644 index 0000000000..de54242f38 --- /dev/null +++ b/package/mac80211/patches/317-rt2x00-Fix-register-initialization-rt2800usb.patch @@ -0,0 +1,63 @@ +From d97bb9291c59852989a86667ba317613fa2b77c5 Mon Sep 17 00:00:00 2001 +From: Ivo van Doorn <IvDoorn@gmail.com> +Date: Sat, 17 Jan 2009 19:19:16 +0100 +Subject: [PATCH] rt2x00: Fix register initialization (rt2800usb) + +Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +--- + drivers/net/wireless/rt2x00/rt2800usb.c | 20 ++++++++++++++++---- + 1 files changed, 16 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -582,9 +582,12 @@ static void rt2800usb_config_ant(struct + */ + switch (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_TXPATH)) { + case 1: ++ rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 0); + rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 0); + break; + case 2: ++ rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 16); ++ break; + case 3: + /* Do nothing */ + break; +@@ -1279,7 +1282,7 @@ static int rt2800usb_init_registers(stru + * ASIC will keep garbage value after boot, clear encryption keys. + */ + for (i = 0; i < 254; i++) { +- u32 wcid[2] = { 0xffffffff, 0x0000ffff }; ++ u32 wcid[2] = { 0xffffffff, 0x00ffffff }; + rt2x00usb_register_multiwrite(rt2x00dev, MAC_WCID_ENTRY(i), + wcid, sizeof(wcid)); + } +@@ -1421,6 +1424,7 @@ static int rt2800usb_init_bbp(struct rt2 + rt2800usb_bbp_write(rt2x00dev, 86, 0x00); + rt2800usb_bbp_write(rt2x00dev, 91, 0x04); + rt2800usb_bbp_write(rt2x00dev, 92, 0x00); ++ rt2800usb_bbp_write(rt2x00dev, 103, 0x00); + rt2800usb_bbp_write(rt2x00dev, 105, 0x05); + + if (rt2x00_rev(&rt2x00dev->chip) == RT2870_VERSION_C) { +@@ -1904,9 +1908,17 @@ static int rt2800usb_validate_eeprom(str + } + + rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); +- if (word != 0) { +- /* NIC configuration must always be 0. */ +- word = 0; ++ if (word == 0xffff) { ++ rt2x00_set_field16(&word, EEPROM_NIC_HW_RADIO, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_DYNAMIC_TX_AGC, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA_BG, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA_A, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_CARDBUS_ACCEL, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_BW40M_SB_BG, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_BW40M_SB_A, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_WPS_PBC, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_BW40M_BG, 0); ++ rt2x00_set_field16(&word, EEPROM_NIC_BW40M_A, 0); + rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); + EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); + } |