[brcm63xx] package the bcm63xx-spi driver
[openwrt.git] / package / mac80211 / patches / 305-rt2x00-Detect-cypher-type-during-RX-rt2800usb.patch
1 From 35c7358f5f7ba03daeecdf1fdceabd48ebcd029a Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Tue, 3 Mar 2009 20:15:17 +0100
4 Subject: [PATCH] rt2x00: Detect cypher type during RX (rt2800usb)
5
6 Use UDF field in WCID entry to pass the cipher type
7 to the RXWI fields. This will allow keeping track of
8 the number of frames received with a particular cipher type
9 which is exported through debugfs.
10
11 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
12 ---
13 drivers/net/wireless/rt2x00/rt2800usb.c | 9 ++-------
14 1 files changed, 2 insertions(+), 7 deletions(-)
15
16 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
17 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
18 @@ -366,7 +366,7 @@ static void rt2800usb_config_wcid_attr(s
19 rt2x00_set_field32(&reg, MAC_WCID_ATTRIBUTE_CIPHER, crypto->cipher);
20 rt2x00_set_field32(&reg, MAC_WCID_ATTRIBUTE_BSS_IDX,
21 (crypto->cmd == SET_KEY) * crypto->bssidx);
22 - rt2x00_set_field32(&reg, MAC_WCID_ATTRIBUTE_RX_WIUDF, 0);
23 + rt2x00_set_field32(&reg, MAC_WCID_ATTRIBUTE_RX_WIUDF, crypto->cipher);
24 rt2x00usb_register_write(rt2x00dev, offset, reg);
25
26 offset = MAC_IVEIV_ENTRY(key->hw_key_idx);
27 @@ -2149,12 +2149,7 @@ static void rt2800usb_fill_rxdone(struct
28 rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC;
29
30 if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) {
31 - /*
32 - * Unfortunately we don't know the cipher type used during
33 - * decryption. This prevents us from correct providing
34 - * correct statistics through debugfs.
35 - */
36 - rxdesc->cipher = CIPHER_NONE;
37 + rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF);
38 rxdesc->cipher_status =
39 rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR);
40 }
This page took 0.041504 seconds and 5 git commands to generate.