diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-03-05 12:49:25 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-03-05 12:49:25 +0000 |
commit | fd2ea5846b416322f0ad0d07c0cacc18bcd7bfb8 (patch) | |
tree | 6b538c1a23719f7571103818579ffe47633be116 /package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch | |
parent | 165f60bba9bba1ac75816729845661b2fd08343d (diff) | |
download | upstream-fd2ea5846b416322f0ad0d07c0cacc18bcd7bfb8.tar.gz upstream-fd2ea5846b416322f0ad0d07c0cacc18bcd7bfb8.tar.bz2 upstream-fd2ea5846b416322f0ad0d07c0cacc18bcd7bfb8.zip |
mac80211: update compat-wireless to 2009-03-04, and refresh patches
SVN-Revision: 14749
Diffstat (limited to 'package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch')
-rw-r--r-- | package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch b/package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch new file mode 100644 index 0000000000..1fbef6c434 --- /dev/null +++ b/package/mac80211/patches/306-rt2x00-Fix-HW-crypto-offset-calculation-rt2800pci.patch @@ -0,0 +1,36 @@ +From e63585e28192e854707c549547645c669e6daa2a Mon Sep 17 00:00:00 2001 +From: Ivo van Doorn <IvDoorn@gmail.com> +Date: Wed, 4 Mar 2009 20:25:43 +0100 +Subject: [PATCH] rt2x00: Fix HW crypto offset calculation (rt2800pci) + +Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +--- + drivers/net/wireless/rt2x00/rt2800pci.c | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2800pci.c ++++ b/drivers/net/wireless/rt2x00/rt2800pci.c +@@ -336,7 +336,8 @@ static void rt2800pci_config_wcid_attr(s + rt2x00pci_register_read(rt2x00dev, offset, ®); + rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_KEYTAB, + !!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)); +- rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_CIPHER, crypto->cipher); ++ rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_CIPHER, ++ (crypto->cmd == SET_KEY) * crypto->cipher); + rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_BSS_IDX, + (crypto->cmd == SET_KEY) * crypto->bssidx); + rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_RX_WIUDF, crypto->cipher); +@@ -393,10 +394,11 @@ static int rt2800pci_config_shared_key(s + * Using the correct defines correctly will cause overhead, + * so just calculate the correct offset. + */ +- field.bit_offset = (4 * key->keyidx) + (16 * (crypto->bssidx & 1)); ++ field.bit_offset = 4 * (key->hw_key_idx % 8); + field.bit_mask = 0x7 << field.bit_offset; + +- offset = SHARED_KEY_MODE_ENTRY(key->hw_key_idx / 2); ++ offset = SHARED_KEY_MODE_ENTRY(key->hw_key_idx / 8); ++ + rt2x00pci_register_read(rt2x00dev, offset, ®); + rt2x00_set_field32(®, field, + (crypto->cmd == SET_KEY) * crypto->cipher); |