[package] mac80211: update compat-wireless to 2009-02-19
[openwrt.git] / package / mac80211 / patches / 323-rt2x00-support-get_tkip_seq-fix-TX-streams-rt2800.patch
1 From 0479f29b2d4d8e95eece75e9bfda9a6a5e7bc77e Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Sat, 14 Feb 2009 19:56:24 +0100
4 Subject: [PATCH] rt2x00: support get_tkip_seq, fix TX streams (rt2800usb)
5
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
7 ---
8 drivers/net/wireless/rt2x00/rt2800usb.c | 23 ++++++++++++++++++++++-
9 drivers/net/wireless/rt2x00/rt2800usb.h | 6 ------
10 2 files changed, 22 insertions(+), 7 deletions(-)
11
12 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
13 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
14 @@ -1465,6 +1465,8 @@ static int rt2800usb_init_registers(stru
15
16 rt2x00usb_register_read(rt2x00dev, TX_RTS_CFG, &reg);
17 rt2x00_set_field32(&reg, TX_RTS_CFG_AUTO_RTS_RETRY_LIMIT, 32);
18 + rt2x00_set_field32(&reg, TX_RTS_CFG_RTS_THRES,
19 + IEEE80211_MAX_RTS_THRESHOLD);
20 rt2x00_set_field32(&reg, TX_RTS_CFG_RTS_FBK_EN, 0);
21 rt2x00usb_register_write(rt2x00dev, TX_RTS_CFG, reg);
22
23 @@ -2521,7 +2523,10 @@ static int rt2800usb_probe_hw_mode(struc
24 spec->ht.ampdu_factor = 3;
25 spec->ht.ampdu_density = 4;
26 spec->ht.mcs.tx_params =
27 - IEEE80211_HT_MCS_TX_DEFINED;
28 + IEEE80211_HT_MCS_TX_DEFINED |
29 + IEEE80211_HT_MCS_TX_RX_DIFF |
30 + ((rt2x00_get_field16(eeprom, EEPROM_ANTENNA_TXPATH) - 1) <<
31 + IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT);
32
33 switch (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RXPATH)) {
34 case 3:
35 @@ -2625,6 +2630,21 @@ static int rt2800usb_probe_hw(struct rt2
36 /*
37 * IEEE80211 stack callback functions.
38 */
39 +static void rt2800usb_get_tkip_seq(struct ieee80211_hw *hw, u8 hw_key_idx,
40 + u32 *iv32, u16 *iv16)
41 +{
42 + struct rt2x00_dev *rt2x00dev = hw->priv;
43 + struct mac_iveiv_entry iveiv_entry;
44 + u32 offset;
45 +
46 + offset = MAC_IVEIV_ENTRY(hw_key_idx);
47 + rt2x00usb_register_multiread(rt2x00dev, offset,
48 + &iveiv_entry, sizeof(iveiv_entry));
49 +
50 + memcpy(&iveiv_entry.iv[0], iv16, sizeof(iv16));
51 + memcpy(&iveiv_entry.iv[4], iv32, sizeof(iv32));
52 +}
53 +
54 static int rt2800usb_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
55 {
56 struct rt2x00_dev *rt2x00dev = hw->priv;
57 @@ -2754,6 +2774,7 @@ static const struct ieee80211_ops rt2800
58 .configure_filter = rt2x00mac_configure_filter,
59 .set_key = rt2x00mac_set_key,
60 .get_stats = rt2x00mac_get_stats,
61 + .get_tkip_seq = rt2800usb_get_tkip_seq,
62 .set_rts_threshold = rt2800usb_set_rts_threshold,
63 .bss_info_changed = rt2x00mac_bss_info_changed,
64 .conf_tx = rt2800usb_conf_tx,
65 --- a/drivers/net/wireless/rt2x00/rt2800usb.h
66 +++ b/drivers/net/wireless/rt2x00/rt2800usb.h
67 @@ -1339,12 +1339,6 @@ struct mac_iveiv_entry {
68 } __attribute__ ((packed));
69
70 /*
71 - * MAC_IVEIV:
72 - */
73 -#define MAC_IVEIV_EIV FIELD32(0x20000000)
74 -#define MAC_IVEIV_KEYIDX FIELD32(0xc0000000)
75 -
76 -/*
77 * MAC_WCID_ATTRIBUTE:
78 */
79 #define MAC_WCID_ATTRIBUTE_KEYTAB FIELD32(0x00000001)
This page took 0.05636 seconds and 5 git commands to generate.