diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-02-16 19:55:09 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-02-16 19:55:09 +0000 |
commit | 8d97fd7b4c55ddac04cf13ff94df121c8048ea7a (patch) | |
tree | d56d4f14823da9e9d4fb1c0ec6ebecb53899cbfe /package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch | |
parent | da5f935061f5f0d6613801617ad798162a396aca (diff) | |
download | upstream-8d97fd7b4c55ddac04cf13ff94df121c8048ea7a.tar.gz upstream-8d97fd7b4c55ddac04cf13ff94df121c8048ea7a.tar.bz2 upstream-8d97fd7b4c55ddac04cf13ff94df121c8048ea7a.zip |
[package] mac80211: add more patches from the rt2x00 git repository
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14534 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch')
-rw-r--r-- | package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch b/package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch new file mode 100644 index 0000000000..636fb795aa --- /dev/null +++ b/package/mac80211/patches/322-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch @@ -0,0 +1,79 @@ +From 524c4b25e496c7af6cbe5b16ea5c258880669509 Mon Sep 17 00:00:00 2001 +From: Ivo van Doorn <IvDoorn@gmail.com> +Date: Sat, 14 Feb 2009 19:55:36 +0100 +Subject: [PATCH] rt2x00: support get_tkip_seq, fix TX streams (rt2800pci) + +Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +--- + drivers/net/wireless/rt2x00/rt2800pci.c | 23 ++++++++++++++++++++++- + drivers/net/wireless/rt2x00/rt2800pci.h | 6 ------ + 2 files changed, 22 insertions(+), 7 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2800pci.c ++++ b/drivers/net/wireless/rt2x00/rt2800pci.c +@@ -1374,6 +1374,8 @@ static int rt2800pci_init_registers(stru + + rt2x00pci_register_read(rt2x00dev, TX_RTS_CFG, ®); + rt2x00_set_field32(®, TX_RTS_CFG_AUTO_RTS_RETRY_LIMIT, 32); ++ rt2x00_set_field32(®, TX_RTS_CFG_RTS_THRES, ++ IEEE80211_MAX_RTS_THRESHOLD); + rt2x00_set_field32(®, TX_RTS_CFG_RTS_FBK_EN, 0); + rt2x00pci_register_write(rt2x00dev, TX_RTS_CFG, reg); + +@@ -2470,7 +2472,10 @@ static int rt2800pci_probe_hw_mode(struc + spec->ht.ampdu_factor = 3; + spec->ht.ampdu_density = 4; + spec->ht.mcs.tx_params = +- IEEE80211_HT_MCS_TX_DEFINED; ++ IEEE80211_HT_MCS_TX_DEFINED | ++ IEEE80211_HT_MCS_TX_RX_DIFF | ++ ((rt2x00_get_field16(eeprom, EEPROM_ANTENNA_TXPATH) - 1) << ++ IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT); + + switch (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RXPATH)) { + case 3: +@@ -2552,6 +2557,21 @@ static int rt2800pci_probe_hw(struct rt2 + /* + * IEEE80211 stack callback functions. + */ ++static void rt2800pci_get_tkip_seq(struct ieee80211_hw *hw, u8 hw_key_idx, ++ u32 *iv32, u16 *iv16) ++{ ++ struct rt2x00_dev *rt2x00dev = hw->priv; ++ struct mac_iveiv_entry iveiv_entry; ++ u32 offset; ++ ++ offset = MAC_IVEIV_ENTRY(hw_key_idx); ++ rt2x00pci_register_multiread(rt2x00dev, offset, ++ &iveiv_entry, sizeof(iveiv_entry)); ++ ++ memcpy(&iveiv_entry.iv[0], iv16, sizeof(iv16)); ++ memcpy(&iveiv_entry.iv[4], iv32, sizeof(iv32)); ++} ++ + static int rt2800pci_set_rts_threshold(struct ieee80211_hw *hw, u32 value) + { + struct rt2x00_dev *rt2x00dev = hw->priv; +@@ -2681,6 +2701,7 @@ static const struct ieee80211_ops rt2800 + .configure_filter = rt2x00mac_configure_filter, + .set_key = rt2x00mac_set_key, + .get_stats = rt2x00mac_get_stats, ++ .get_tkip_seq = rt2800pci_get_tkip_seq, + .set_rts_threshold = rt2800pci_set_rts_threshold, + .bss_info_changed = rt2x00mac_bss_info_changed, + .conf_tx = rt2800pci_conf_tx, +--- a/drivers/net/wireless/rt2x00/rt2800pci.h ++++ b/drivers/net/wireless/rt2x00/rt2800pci.h +@@ -1327,12 +1327,6 @@ struct mac_iveiv_entry { + } __attribute__ ((packed)); + + /* +- * MAC_IVEIV: +- */ +-#define MAC_IVEIV_EIV FIELD32(0x20000000) +-#define MAC_IVEIV_KEYIDX FIELD32(0xc0000000) +- +-/* + * MAC_WCID_ATTRIBUTE: + */ + #define MAC_WCID_ATTRIBUTE_KEYTAB FIELD32(0x00000001) |