aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800lib.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-10-02 05:26:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-05 13:35:25 -0400
commit2a0cfeb826df6751933fd95a797ac18371992c3b (patch)
tree5deb2818a402090138ff3d30e975dec2abee6e0e /drivers/net/wireless/rt2x00/rt2800lib.c
parent1a92795dac419128eb511dce30a6aad672064b88 (diff)
rt2x00: Don't overwrite beacon buffers in pairwise key setup
rt2800 devices use parts of the pariwise key table to store the beacon frames for beacon 6 and 7. To not overwrite the beacon frame buffers limit the number of entries we store in the pairwise key table to 222. Also add some descriptive comments about this shared memory usage. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800lib.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c6
1 files changed, 5 insertions, 1 deletions
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;