aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-08-17 12:53:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:36:00 -0400
commit1738c9e42a9bb3705a3b03dde854f3db269e7bdd (patch)
tree835a1d9ef953339f6543992d11e3b9f18c1e5a9a /drivers
parent73077c85458739169cdaf893a375b8bb3939d35a (diff)
rt2x00: Fix for rt2800usb for SHARED_KEY_TABLE initializations
Fixed comments about SHARED_KEY_TABLE_BASE and SHARED_KEY_MODE_BASE. Fixed initialization loop for SHARED_KEY_MODE_ENTRY. Based on a patch for rt2800pci from Benoit. Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 3856f06fdca7..c82474ebba31 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1463,6 +1463,10 @@ static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev)
1463 /* 1463 /*
1464 * ASIC will keep garbage value after boot, clear encryption keys. 1464 * ASIC will keep garbage value after boot, clear encryption keys.
1465 */ 1465 */
1466 for (i = 0; i < 4; i++)
1467 rt2x00usb_register_write(rt2x00dev,
1468 SHARED_KEY_MODE_ENTRY(i), 0);
1469
1466 for (i = 0; i < 256; i++) { 1470 for (i = 0; i < 256; i++) {
1467 u32 wcid[2] = { 0xffffffff, 0x00ffffff }; 1471 u32 wcid[2] = { 0xffffffff, 0x00ffffff };
1468 rt2x00usb_register_multiwrite(rt2x00dev, MAC_WCID_ENTRY(i), 1472 rt2x00usb_register_multiwrite(rt2x00dev, MAC_WCID_ENTRY(i),
@@ -1472,10 +1476,6 @@ static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev)
1472 rt2x00usb_register_write(rt2x00dev, MAC_IVEIV_ENTRY(i), 0); 1476 rt2x00usb_register_write(rt2x00dev, MAC_IVEIV_ENTRY(i), 0);
1473 } 1477 }
1474 1478
1475 for (i = 0; i < 16; i++)
1476 rt2x00usb_register_write(rt2x00dev,
1477 SHARED_KEY_MODE_ENTRY(i), 0);
1478
1479 /* 1479 /*
1480 * Clear all beacons 1480 * Clear all beacons
1481 * For the Beacon base registers we only need to clear 1481 * For the Beacon base registers we only need to clear
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.h b/drivers/net/wireless/rt2x00/rt2800usb.h
index 2d9dc3783361..a79a6d90eeac 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.h
+++ b/drivers/net/wireless/rt2x00/rt2800usb.h
@@ -1300,8 +1300,8 @@
1300 * PAIRWISE_KEY_TABLE_BASE: 32-byte * 256 entry 1300 * PAIRWISE_KEY_TABLE_BASE: 32-byte * 256 entry
1301 * MAC_IVEIV_TABLE_BASE: 8-byte * 256-entry 1301 * MAC_IVEIV_TABLE_BASE: 8-byte * 256-entry
1302 * MAC_WCID_ATTRIBUTE_BASE: 4-byte * 256-entry 1302 * MAC_WCID_ATTRIBUTE_BASE: 4-byte * 256-entry
1303 * SHARED_KEY_TABLE_BASE: 32-byte * 16-entry 1303 * SHARED_KEY_TABLE_BASE: 32 bytes * 32-entry
1304 * SHARED_KEY_MODE_BASE: 4-byte * 16-entry 1304 * SHARED_KEY_MODE_BASE: 4 bits * 32-entry
1305 */ 1305 */
1306#define MAC_WCID_BASE 0x1800 1306#define MAC_WCID_BASE 0x1800
1307#define PAIRWISE_KEY_TABLE_BASE 0x4000 1307#define PAIRWISE_KEY_TABLE_BASE 0x4000