aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800lib.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2009-11-10 16:42:40 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-16 14:17:11 -0500
commitcce5fc45f9e9570f320009431d033d5a8f6144cc (patch)
tree23e7e02d5667303252612906831169675bbf9ef4 /drivers/net/wireless/rt2x00/rt2800lib.c
parentfa6f632fba300f92d21962ef6e58411345465241 (diff)
rt2x00: Initialize rf302x RF values properly for rt2800pci.
Ensure RF302x and RF2020 chipsets are handled properly in rt2800lib for the rt3090 chipset. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800lib.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 53baa09082d3..d88857ccdf85 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1,5 +1,6 @@
1/* 1/*
2 Copyright (C) 2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> 2 Copyright (C) 2009 Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
3 Copyright (C) 2009 Gertjan van Wingerde <gwingerde@gmail.com>
3 4
4 Based on the original rt2800pci.c and rt2800usb.c. 5 Based on the original rt2800pci.c and rt2800usb.c.
5 Copyright (C) 2009 Ivo van Doorn <IvDoorn@gmail.com> 6 Copyright (C) 2009 Ivo van Doorn <IvDoorn@gmail.com>
@@ -806,7 +807,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
806 unsigned int tx_pin; 807 unsigned int tx_pin;
807 u8 bbp; 808 u8 bbp;
808 809
809 if (rt2x00_rt(&rt2x00dev->chip, RT3070) && 810 if ((rt2x00_rt(&rt2x00dev->chip, RT3070) ||
811 rt2x00_rt(&rt2x00dev->chip, RT3090)) &&
810 (rt2x00_rf(&rt2x00dev->chip, RF2020) || 812 (rt2x00_rf(&rt2x00dev->chip, RF2020) ||
811 rt2x00_rf(&rt2x00dev->chip, RF3020) || 813 rt2x00_rf(&rt2x00dev->chip, RF3020) ||
812 rt2x00_rf(&rt2x00dev->chip, RF3021) || 814 rt2x00_rf(&rt2x00dev->chip, RF3021) ||
@@ -1989,7 +1991,7 @@ static const struct rf_channel rf_vals[] = {
1989 * RF value list for rt3070 1991 * RF value list for rt3070
1990 * Supports: 2.4 GHz 1992 * Supports: 2.4 GHz
1991 */ 1993 */
1992static const struct rf_channel rf_vals_3070[] = { 1994static const struct rf_channel rf_vals_302x[] = {
1993 {1, 241, 2, 2 }, 1995 {1, 241, 2, 2 },
1994 {2, 241, 2, 7 }, 1996 {2, 241, 2, 7 },
1995 {3, 242, 2, 2 }, 1997 {3, 242, 2, 2 },
@@ -2046,26 +2048,19 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
2046 2048
2047 if (rt2x00_rf(chip, RF2820) || 2049 if (rt2x00_rf(chip, RF2820) ||
2048 rt2x00_rf(chip, RF2720) || 2050 rt2x00_rf(chip, RF2720) ||
2049 (rt2x00_intf_is_pci(rt2x00dev) && 2051 (rt2x00_intf_is_pci(rt2x00dev) && rt2x00_rf(chip, RF3052))) {
2050 (rt2x00_rf(chip, RF3020) ||
2051 rt2x00_rf(chip, RF3021) ||
2052 rt2x00_rf(chip, RF3022) ||
2053 rt2x00_rf(chip, RF2020) ||
2054 rt2x00_rf(chip, RF3052)))) {
2055 spec->num_channels = 14; 2052 spec->num_channels = 14;
2056 spec->channels = rf_vals; 2053 spec->channels = rf_vals;
2057 } else if (rt2x00_rf(chip, RF2850) || 2054 } else if (rt2x00_rf(chip, RF2850) || rt2x00_rf(chip, RF2750)) {
2058 rt2x00_rf(chip, RF2750)) {
2059 spec->supported_bands |= SUPPORT_BAND_5GHZ; 2055 spec->supported_bands |= SUPPORT_BAND_5GHZ;
2060 spec->num_channels = ARRAY_SIZE(rf_vals); 2056 spec->num_channels = ARRAY_SIZE(rf_vals);
2061 spec->channels = rf_vals; 2057 spec->channels = rf_vals;
2062 } else if (rt2x00_intf_is_usb(rt2x00dev) && 2058 } else if (rt2x00_rf(chip, RF3020) ||
2063 (rt2x00_rf(chip, RF3020) || 2059 rt2x00_rf(chip, RF2020) ||
2064 rt2x00_rf(chip, RF2020) || 2060 rt2x00_rf(chip, RF3021) ||
2065 rt2x00_rf(chip, RF3021) || 2061 rt2x00_rf(chip, RF3022)) {
2066 rt2x00_rf(chip, RF3022))) { 2062 spec->num_channels = ARRAY_SIZE(rf_vals_302x);
2067 spec->num_channels = ARRAY_SIZE(rf_vals_3070); 2063 spec->channels = rf_vals_302x;
2068 spec->channels = rf_vals_3070;
2069 } 2064 }
2070 2065
2071 /* 2066 /*