1 From 4009f1317cb51ac89f37241de48970f2ee6a8ec5 Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Sat, 7 Feb 2009 17:18:03 +0100
4 Subject: [PATCH] rt2x00: Fix MCS rx_mask (rt2800pci)
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
8 drivers/net/wireless/rt2x00/rt2800pci.c | 22 ++++++++++++++++++++--
9 1 files changed, 20 insertions(+), 2 deletions(-)
11 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
12 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
13 @@ -2193,6 +2193,13 @@ static int rt2800pci_validate_eeprom(str
14 rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2820);
15 rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word);
16 EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word);
17 + } else if (rt2x00_rev(&rt2x00dev->chip) < RT2883_VERSION) {
19 + * There is a max of 2 RX streams for RT2860 series
21 + if (rt2x00_get_field16(word, EEPROM_ANTENNA_RXPATH) > 2)
22 + rt2x00_set_field16(&word, EEPROM_ANTENNA_RXPATH, 2);
23 + rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word);
26 rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word);
27 @@ -2416,6 +2423,7 @@ static int rt2800pci_probe_hw_mode(struc
34 * Initialize all hw fields.
35 @@ -2432,6 +2440,8 @@ static int rt2800pci_probe_hw_mode(struc
36 rt2x00_eeprom_addr(rt2x00dev,
39 + rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom);
42 * Initialize hw_mode information.
44 @@ -2463,11 +2473,19 @@ static int rt2800pci_probe_hw_mode(struc
45 IEEE80211_HT_CAP_PSMP_SUPPORT;
46 spec->ht.ampdu_factor = 3;
47 spec->ht.ampdu_density = 4;
48 - spec->ht.mcs.rx_mask[0] = 0xff;
49 - spec->ht.mcs.rx_mask[1] = 0xff;
50 spec->ht.mcs.tx_params =
51 IEEE80211_HT_MCS_TX_DEFINED;
53 + switch (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RXPATH)) {
55 + spec->ht.mcs.rx_mask[2] = 0xff;
57 + spec->ht.mcs.rx_mask[1] = 0xff;
59 + spec->ht.mcs.rx_mask[0] = 0xff;
64 * Create channel information array