Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171743
b: refs/heads/master
c: f273fe5
h: refs/heads/master
i:
  171741: 135b2fe
  171739: 677e45e
  171735: 89f3c08
  171727: b94c291
  171711: 0153afb
v: v3
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Nov 13, 2009
1 parent 393f371 commit 9e484f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 264d9b7d8a629620c8de84c614910c3164e935f8
refs/heads/master: f273fe55e3f3f0b66b7624c0102d3ef44bbdfe6a
28 changes: 15 additions & 13 deletions trunk/drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,35 +1828,35 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);

rt2x00_set_chip_rf(rt2x00dev, value, reg);

if (rt2x00_intf_is_usb(rt2x00dev)) {
struct rt2x00_chip *chip = &rt2x00dev->chip;

rt2x00_set_chip(rt2x00dev, RT2870, value, reg);

/*
* The check for rt2860 is not a typo, some rt2870 hardware
* identifies itself as rt2860 in the CSR register.
*/
if (!rt2x00_check_rev(chip, 0xfff00000, 0x28600000) &&
!rt2x00_check_rev(chip, 0xfff00000, 0x28700000) &&
!rt2x00_check_rev(chip, 0xfff00000, 0x28800000) &&
!rt2x00_check_rev(chip, 0xffff0000, 0x30700000)) {
if (rt2x00_check_rev(chip, 0xfff00000, 0x28600000) ||
rt2x00_check_rev(chip, 0xfff00000, 0x28700000) ||
rt2x00_check_rev(chip, 0xfff00000, 0x28800000)) {
rt2x00_set_chip_rt(rt2x00dev, RT2870);
} else if (rt2x00_check_rev(chip, 0xffff0000, 0x30700000)) {
rt2x00_set_chip_rt(rt2x00dev, RT3070);
} else {
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
return -ENODEV;
}
} else if (rt2x00_intf_is_pci(rt2x00dev))
rt2x00_set_chip_rf(rt2x00dev, value, reg);
}

if (!rt2x00_rf(&rt2x00dev->chip, RF2820) &&
!rt2x00_rf(&rt2x00dev->chip, RF2850) &&
!rt2x00_rf(&rt2x00dev->chip, RF2720) &&
!rt2x00_rf(&rt2x00dev->chip, RF2750) &&
!rt2x00_rf(&rt2x00dev->chip, RF3020) &&
!rt2x00_rf(&rt2x00dev->chip, RF2020) &&
(rt2x00_intf_is_usb(rt2x00dev) ||
(rt2x00_intf_is_pci(rt2x00dev) &&
!rt2x00_rf(&rt2x00dev->chip, RF3021) &&
!rt2x00_rf(&rt2x00dev->chip, RF3022)))) {
!rt2x00_rf(&rt2x00dev->chip, RF3021) &&
!rt2x00_rf(&rt2x00dev->chip, RF3022)) {
ERROR(rt2x00dev, "Invalid RF chipset detected.\n");
return -ENODEV;
}
Expand Down Expand Up @@ -2057,7 +2057,9 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
spec->channels = rf_vals;
} else if (rt2x00_intf_is_usb(rt2x00dev) &&
(rt2x00_rf(chip, RF3020) ||
rt2x00_rf(chip, RF2020))) {
rt2x00_rf(chip, RF2020) ||
rt2x00_rf(chip, RF3021) ||
rt2x00_rf(chip, RF3022))) {
spec->num_channels = ARRAY_SIZE(rf_vals_3070);
spec->channels = rf_vals_3070;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ struct rt2x00_chip {
#define RT3052 0x3052 /* WSOC */
#define RT3090 0x3090 /* 2.4GHz PCIe */
#define RT2870 0x1600
#define RT3070 0x1800

u16 rf;
u32 rev;
Expand Down

0 comments on commit 9e484f8

Please sign in to comment.