diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-18 22:22:57 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-18 22:22:57 +0000 |
commit | 22319bbae1e450b43d55da545c44d05e84b78c6a (patch) | |
tree | 97f691b5f8881e6e751068c4054f22ec943f1cba /package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch | |
parent | 5295e692f68927008eaac7110a4d70fbbc7c1ba1 (diff) |
[mac80211] Update compat-wireless to 2009-03-18
Removing of include/net/ieee80211_radiotap.h is not needed, because it is only used by this compat-wireless.
There are changes in that file and compat-wireless needs the newest version.
Some more symbols are deactivated in the default config file, this will make building faster.
The rt2800pci patches are up to date now.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14946 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch')
-rw-r--r-- | package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch b/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch index 7a25490195..c9152fd366 100644 --- a/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch +++ b/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch @@ -1,6 +1,6 @@ -From b249bc450f982cd2491448c91faf797ed37b69b8 Mon Sep 17 00:00:00 2001 +From 101b65d221593c1bdeacf0c6085d885ea5447c4c Mon Sep 17 00:00:00 2001 From: Ivo van Doorn <IvDoorn@gmail.com> -Date: Tue, 3 Mar 2009 19:25:49 +0100 +Date: Sat, 14 Mar 2009 20:46:40 +0100 Subject: [PATCH] rt2x00: Implement support for rt2800usb Add support for the rt2800usb chipset. @@ -16,9 +16,9 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> drivers/net/wireless/rt2x00/Kconfig | 14 + drivers/net/wireless/rt2x00/Makefile | 1 + drivers/net/wireless/rt2x00/rt2800usb.c | 3032 +++++++++++++++++++++++++++++++ - drivers/net/wireless/rt2x00/rt2800usb.h | 1932 ++++++++++++++++++++ + drivers/net/wireless/rt2x00/rt2800usb.h | 1934 ++++++++++++++++++++ drivers/net/wireless/rt2x00/rt2x00.h | 7 + - 5 files changed, 4986 insertions(+), 0 deletions(-) + 5 files changed, 4988 insertions(+), 0 deletions(-) create mode 100644 drivers/net/wireless/rt2x00/rt2800usb.c create mode 100644 drivers/net/wireless/rt2x00/rt2800usb.h @@ -397,10 +397,11 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + 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, 0); ++ rt2x00_set_field32(®, MAC_WCID_ATTRIBUTE_RX_WIUDF, crypto->cipher); + rt2x00usb_register_write(rt2x00dev, offset, reg); + + offset = MAC_IVEIV_ENTRY(key->hw_key_idx); @@ -459,10 +460,10 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + * 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, @@ -488,9 +489,13 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + if (crypto->cmd == SET_KEY) { + /* + * 1 pairwise key is possible per AID, this means that the AID -+ * equals our hw_key_idx. ++ * equals our hw_key_idx. Make sure the WCID starts _after_ the ++ * last possible shared key entry. + */ -+ key->hw_key_idx = crypto->aid; ++ if (crypto->aid > (256 - 32)) ++ return -ENOSPC; ++ ++ key->hw_key_idx = 32 + crypto->aid; + + memcpy(key_entry.key, crypto->key, + sizeof(key_entry.key)); @@ -2183,12 +2188,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + rxdesc->flags |= RX_FLAG_FAILED_FCS_CRC; + + if (test_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags)) { -+ /* -+ * Unfortunately we don't know the cipher type used during -+ * decryption. This prevents us from correct providing -+ * correct statistics through debugfs. -+ */ -+ rxdesc->cipher = CIPHER_NONE; ++ rxdesc->cipher = rt2x00_get_field32(rxwi0, RXWI_W0_UDF); + rxdesc->cipher_status = + rt2x00_get_field32(rxd0, RXD_W0_CIPHER_ERROR); + } @@ -2227,7 +2227,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + /* + * Mask of 0x8 bit to remove the short preamble flag. + */ -+ if (rxdesc->dev_flags == RATE_MODE_CCK) ++ if (rxdesc->rate_mode == RATE_MODE_CCK) + rxdesc->signal &= ~0x8; + + rxdesc->rssi = @@ -3066,7 +3066,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +module_exit(rt2800usb_exit); --- /dev/null +++ b/drivers/net/wireless/rt2x00/rt2800usb.h -@@ -0,0 +1,1932 @@ +@@ -0,0 +1,1934 @@ +/* + Copyright (C) 2004 - 2009 rt2x00 SourceForge Project + <http://rt2x00.serialmonkey.com> @@ -4783,6 +4783,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> + */ +#define MCU_SLEEP 0x30 +#define MCU_WAKEUP 0x31 ++#define MCU_RADIO_OFF 0x35 +#define MCU_LED 0x50 +#define MCU_LED_STRENGTH 0x51 +#define MCU_LED_1 0x52 @@ -4790,6 +4791,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +#define MCU_LED_3 0x54 +#define MCU_RADAR 0x60 +#define MCU_BOOT_SIGNAL 0x72 ++#define MCU_BBP_SIGNAL 0x80 + +/* + * DMA descriptor defines. @@ -5001,15 +5003,15 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> +#endif /* RT2800USB_H */ --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h -@@ -142,6 +142,7 @@ struct rt2x00_chip { - #define RT2860D 0x0681 /* 2.4GHz, 5GHz PCI/CB */ - #define RT2890 0x0701 /* 2.4GHz PCIe */ +@@ -144,6 +144,7 @@ struct rt2x00_chip { #define RT2890D 0x0781 /* 2.4GHz, 5GHz PCIe */ + #define RT2880 0x2880 /* WSOC */ + #define RT3052 0x3052 /* WSOC */ +#define RT2870 0x1600 u16 rf; u32 rev; -@@ -780,6 +781,12 @@ struct rt2x00_dev { +@@ -788,6 +789,12 @@ struct rt2x00_dev { u8 freq_offset; /* |