bcm63xx: add initial support for bcm6368 boards
[openwrt.git] / package / mac80211 / patches / 605-rt2x00-pci-eeprom.patch
1 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
2 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
3 @@ -84,7 +84,7 @@ static void rt2800pci_mcu_status(struct
4 rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
5 }
6
7 -static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
8 +static void rt2800pci_read_eeprom_file(struct rt2x00_dev *rt2x00dev)
9 {
10 memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
11 }
12 @@ -938,8 +938,9 @@ static int rt2800pci_validate_eeprom(str
13 /*
14 * Read EEPROM into buffer
15 */
16 - if (rt2x00_is_soc(rt2x00dev))
17 - rt2800pci_read_eeprom_soc(rt2x00dev);
18 + if (rt2x00_is_soc(rt2x00dev) ||
19 + test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags))
20 + rt2800pci_read_eeprom_file(rt2x00dev);
21 else if (rt2800pci_efuse_detect(rt2x00dev))
22 rt2800pci_read_eeprom_efuse(rt2x00dev);
23 else
24 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
25 +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
26 @@ -255,6 +255,7 @@ exit:
27 int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
28 {
29 struct ieee80211_hw *hw;
30 + struct rt2x00_platform_data *pdata;
31 struct rt2x00_dev *rt2x00dev;
32 int retval;
33
34 @@ -299,6 +300,12 @@ int rt2x00pci_probe(struct pci_dev *pci_
35 rt2x00dev->irq = pci_dev->irq;
36 rt2x00dev->name = pci_name(pci_dev);
37
38 + /* if we get passed the name of a eeprom_file_name, then use this in
39 + favour of the eeprom */
40 + pdata = rt2x00dev->dev->platform_data;
41 + if (pdata && pdata->eeprom_file_name)
42 + set_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags);
43 +
44 if (pci_is_pcie(pci_dev))
45 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
46 else
This page took 0.04687 seconds and 5 git commands to generate.