diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 21 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index 2edc7742a7e..e1583cf5894 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -1435,6 +1435,24 @@ | |||
1435 | 1435 | ||
1436 | /* | 1436 | /* |
1437 | * Security key table memory. | 1437 | * Security key table memory. |
1438 | * | ||
1439 | * The pairwise key table shares some memory with the beacon frame | ||
1440 | * buffers 6 and 7. That basically means that when beacon 6 & 7 | ||
1441 | * are used we should only use the reduced pairwise key table which | ||
1442 | * has a maximum of 222 entries. | ||
1443 | * | ||
1444 | * --------------------------------------------- | ||
1445 | * |0x4000 | Pairwise Key | Reduced Pairwise | | ||
1446 | * | | Table | Key Table | | ||
1447 | * | | Size: 256 * 32 | Size: 222 * 32 | | ||
1448 | * |0x5BC0 | |------------------- | ||
1449 | * | | | Beacon 6 | | ||
1450 | * |0x5DC0 | |------------------- | ||
1451 | * | | | Beacon 7 | | ||
1452 | * |0x5FC0 | |------------------- | ||
1453 | * |0x5FFF | | | ||
1454 | * -------------------------- | ||
1455 | * | ||
1438 | * MAC_WCID_BASE: 8-bytes (use only 6 bytes) * 256 entry | 1456 | * MAC_WCID_BASE: 8-bytes (use only 6 bytes) * 256 entry |
1439 | * PAIRWISE_KEY_TABLE_BASE: 32-byte * 256 entry | 1457 | * PAIRWISE_KEY_TABLE_BASE: 32-byte * 256 entry |
1440 | * MAC_IVEIV_TABLE_BASE: 8-byte * 256-entry | 1458 | * MAC_IVEIV_TABLE_BASE: 8-byte * 256-entry |
@@ -1584,7 +1602,8 @@ struct mac_iveiv_entry { | |||
1584 | * 2. Extract memory from FCE table for BCN 4~5 | 1602 | * 2. Extract memory from FCE table for BCN 4~5 |
1585 | * 3. Extract memory from Pair-wise key table for BCN 6~7 | 1603 | * 3. Extract memory from Pair-wise key table for BCN 6~7 |
1586 | * It occupied those memory of wcid 238~253 for BCN 6 | 1604 | * It occupied those memory of wcid 238~253 for BCN 6 |
1587 | * and wcid 222~237 for BCN 7 | 1605 | * and wcid 222~237 for BCN 7 (see Security key table memory |
1606 | * for more info). | ||
1588 | * | 1607 | * |
1589 | * IMPORTANT NOTE: Not sure why legacy driver does this, | 1608 | * IMPORTANT NOTE: Not sure why legacy driver does this, |
1590 | * but HW_BEACON_BASE7 is 0x0200 bytes below HW_BEACON_BASE6. | 1609 | * but HW_BEACON_BASE7 is 0x0200 bytes below HW_BEACON_BASE6. |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index c7076deaece..daa32ae4286 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -1031,8 +1031,12 @@ int rt2800_config_pairwise_key(struct rt2x00_dev *rt2x00dev, | |||
1031 | * 1 pairwise key is possible per AID, this means that the AID | 1031 | * 1 pairwise key is possible per AID, this means that the AID |
1032 | * equals our hw_key_idx. Make sure the WCID starts _after_ the | 1032 | * equals our hw_key_idx. Make sure the WCID starts _after_ the |
1033 | * last possible shared key entry. | 1033 | * last possible shared key entry. |
1034 | * | ||
1035 | * Since parts of the pairwise key table might be shared with | ||
1036 | * the beacon frame buffers 6 & 7 we should only write into the | ||
1037 | * first 222 entries. | ||
1034 | */ | 1038 | */ |
1035 | if (crypto->aid > (256 - 32)) | 1039 | if (crypto->aid > (222 - 32)) |
1036 | return -ENOSPC; | 1040 | return -ENOSPC; |
1037 | 1041 | ||
1038 | key->hw_key_idx = 32 + crypto->aid; | 1042 | key->hw_key_idx = 32 + crypto->aid; |