summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-02-21 20:38:07 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-02-21 20:38:07 +0000
commit2b3c255cdd34c3f16ae39420012c21841bb0b835 (patch)
tree9f6a08064a4640192bf5843c83f3ae8613b7e3ca /package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch
parent1c6bd93a6482c32b8784bef61b07cbd4da2977d2 (diff)
upgrade to latest compat-wireless and rt2800 version
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14605 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch')
-rw-r--r--package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch b/package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch
new file mode 100644
index 0000000000..6d37ff986b
--- /dev/null
+++ b/package/mac80211/patches/309-rt2x00-Fix-MCS-rx_mask-rt2800pci.patch
@@ -0,0 +1,70 @@
+From e53f1806ad975dce4888ec16398735e4c6ad6cde Mon Sep 17 00:00:00 2001
+From: Ivo van Doorn <IvDoorn@gmail.com>
+Date: Sat, 7 Feb 2009 17:18:03 +0100
+Subject: [PATCH] rt2x00: Fix MCS rx_mask (rt2800pci)
+
+Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+---
+ drivers/net/wireless/rt2x00/rt2800pci.c | 22 ++++++++++++++++++++--
+ 1 files changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
+index 679f69a..95eb053 100644
+--- a/drivers/net/wireless/rt2x00/rt2800pci.c
++++ b/drivers/net/wireless/rt2x00/rt2800pci.c
+@@ -2193,6 +2193,13 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
+ rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2820);
+ rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word);
+ EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word);
++ } else if (rt2x00_rev(&rt2x00dev->chip) < RT2883_VERSION) {
++ /*
++ * There is a max of 2 RX streams for RT2860 series
++ */
++ if (rt2x00_get_field16(word, EEPROM_ANTENNA_RXPATH) > 2)
++ rt2x00_set_field16(&word, EEPROM_ANTENNA_RXPATH, 2);
++ rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word);
+ }
+
+ rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word);
+@@ -2416,6 +2423,7 @@ static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
+ char *tx_power1;
+ char *tx_power2;
+ unsigned int i;
++ u16 eeprom;
+
+ /*
+ * Initialize all hw fields.
+@@ -2432,6 +2440,8 @@ static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
+ rt2x00_eeprom_addr(rt2x00dev,
+ EEPROM_MAC_ADDR_0));
+
++ rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom);
++
+ /*
+ * Initialize hw_mode information.
+ */
+@@ -2463,11 +2473,19 @@ static int rt2800pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
+ IEEE80211_HT_CAP_PSMP_SUPPORT;
+ spec->ht.ampdu_factor = 3;
+ spec->ht.ampdu_density = 4;
+- spec->ht.mcs.rx_mask[0] = 0xff;
+- spec->ht.mcs.rx_mask[1] = 0xff;
+ spec->ht.mcs.tx_params =
+ IEEE80211_HT_MCS_TX_DEFINED;
+
++ switch (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RXPATH)) {
++ case 3:
++ spec->ht.mcs.rx_mask[2] = 0xff;
++ case 2:
++ spec->ht.mcs.rx_mask[1] = 0xff;
++ case 1:
++ spec->ht.mcs.rx_mask[0] = 0xff;
++ break;
++ }
++
+ /*
+ * Create channel information array
+ */
+--
+1.6.0
+