diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-05 12:49:25 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-05 12:49:25 +0000 |
commit | 15870b5ffe42faccdb23732756bfc1e33ebc052b (patch) | |
tree | e1cdbea1f9888296f3e92f2391dbaff232bb16e1 /package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch | |
parent | 8c3be08d37358330041745f231f57d6964ab7fb8 (diff) |
[package] mac80211: update compat-wireless to 2009-03-04, and refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14749 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch')
-rw-r--r-- | package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch b/package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch new file mode 100644 index 000000000..11a915e6b --- /dev/null +++ b/package/mac80211/patches/307-rt2x00-Fix-HW-crypto-offset-calculation-rt2800usb.patch @@ -0,0 +1,35 @@ +From d6368d8b77bb8568aa0c92adf1e507fb4198ff41 Mon Sep 17 00:00:00 2001 +From: Ivo van Doorn <IvDoorn@gmail.com> +Date: Wed, 4 Mar 2009 20:26:27 +0100 +Subject: [PATCH] rt2x00: Fix HW crypto offset calculation (rt2800usb) + +Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +--- + drivers/net/wireless/rt2x00/rt2800usb.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -363,7 +363,8 @@ static void rt2800usb_config_wcid_attr(s + rt2x00usb_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); +@@ -425,10 +426,10 @@ static int rt2800usb_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); + + rt2x00usb_register_read(rt2x00dev, offset, ®); + rt2x00_set_field32(®, field, |