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