introduce a generic PKG_CONFIG_DEPENDS for packages that need to be reconfigured...
[openwrt.git] / package / mac80211 / patches / 302-rt2x00-Don-t-free-register-information-on-suspend.patch
1 From 76b0fa91af8ca33cd68f52f2d02a05c488777f58 Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Sat, 28 Mar 2009 20:32:07 +0100
4 Subject: [PATCH 3/9] rt2x00: Don't free register information on suspend
5
6 After suspend & resume the rt2x00 devices won't wakeup
7 anymore due to a broken register information setup.
8 The most important problem is the release of the EEPROM
9 buffer which is completely cleared and never read again
10 after the suspend.
11
12 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
13 ---
14 drivers/net/wireless/rt2x00/rt2x00pci.c | 18 +-----------------
15 drivers/net/wireless/rt2x00/rt2x00usb.c | 18 +-----------------
16 2 files changed, 2 insertions(+), 34 deletions(-)
17
18 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
19 +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
20 @@ -377,8 +377,6 @@ int rt2x00pci_suspend(struct pci_dev *pc
21 if (retval)
22 return retval;
23
24 - rt2x00pci_free_reg(rt2x00dev);
25 -
26 pci_save_state(pci_dev);
27 pci_disable_device(pci_dev);
28 return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
29 @@ -389,7 +387,6 @@ int rt2x00pci_resume(struct pci_dev *pci
30 {
31 struct ieee80211_hw *hw = pci_get_drvdata(pci_dev);
32 struct rt2x00_dev *rt2x00dev = hw->priv;
33 - int retval;
34
35 if (pci_set_power_state(pci_dev, PCI_D0) ||
36 pci_enable_device(pci_dev) ||
37 @@ -398,20 +395,7 @@ int rt2x00pci_resume(struct pci_dev *pci
38 return -EIO;
39 }
40
41 - retval = rt2x00pci_alloc_reg(rt2x00dev);
42 - if (retval)
43 - return retval;
44 -
45 - retval = rt2x00lib_resume(rt2x00dev);
46 - if (retval)
47 - goto exit_free_reg;
48 -
49 - return 0;
50 -
51 -exit_free_reg:
52 - rt2x00pci_free_reg(rt2x00dev);
53 -
54 - return retval;
55 + return rt2x00lib_resume(rt2x00dev);
56 }
57 EXPORT_SYMBOL_GPL(rt2x00pci_resume);
58 #endif /* CONFIG_PM */
59 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c
60 +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
61 @@ -702,8 +702,6 @@ int rt2x00usb_suspend(struct usb_interfa
62 if (retval)
63 return retval;
64
65 - rt2x00usb_free_reg(rt2x00dev);
66 -
67 /*
68 * Decrease usbdev refcount.
69 */
70 @@ -717,24 +715,10 @@ int rt2x00usb_resume(struct usb_interfac
71 {
72 struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
73 struct rt2x00_dev *rt2x00dev = hw->priv;
74 - int retval;
75
76 usb_get_dev(interface_to_usbdev(usb_intf));
77
78 - retval = rt2x00usb_alloc_reg(rt2x00dev);
79 - if (retval)
80 - return retval;
81 -
82 - retval = rt2x00lib_resume(rt2x00dev);
83 - if (retval)
84 - goto exit_free_reg;
85 -
86 - return 0;
87 -
88 -exit_free_reg:
89 - rt2x00usb_free_reg(rt2x00dev);
90 -
91 - return retval;
92 + return rt2x00lib_resume(rt2x00dev);
93 }
94 EXPORT_SYMBOL_GPL(rt2x00usb_resume);
95 #endif /* CONFIG_PM */
This page took 0.045197 seconds and 5 git commands to generate.