[tools] compute rootfs crc32 required for brcm63xx web upgrades
[openwrt.git] / package / mac80211 / patches / 309-rt2x00-Fix-compile-errors-for-SoC.patch
1 From e6cbd7e05f7c1fe0a737526d20f39b4a52e03ae8 Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Tue, 17 Mar 2009 14:01:29 +0100
4 Subject: [PATCH] rt2x00: Fix compile errors for SoC
5
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
7 ---
8  drivers/net/wireless/rt2x00/rt2800pci.c |   37 +++++++++++++++----------------
9  1 files changed, 18 insertions(+), 19 deletions(-)
10
11 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
12 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
13 @@ -3186,7 +3186,7 @@ MODULE_LICENSE("GPL");
14  #define WSOC_RT_CHIPSET                RT3052
15  #endif /* CONFIG_RALINK_RT305X */
16  
17 -static void rt2800soc_free_reg(struct rt2x00_dev *rt2x00dev)
18 +static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
19  {
20         kfree(rt2x00dev->rf);
21         rt2x00dev->rf = NULL;
22 @@ -3195,7 +3195,7 @@ static void rt2800soc_free_reg(struct rt
23         rt2x00dev->eeprom = NULL;
24  }
25  
26 -static int rt2800soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
27 +static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
28  {
29         struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
30         struct resource *res;
31 @@ -3219,14 +3219,14 @@ static int rt2800soc_alloc_reg(struct rt
32  
33  exit:
34         ERROR_PROBE("Failed to allocate registers.\n");
35 -       rt2800soc_free_reg(rt2x00dev);
36 +       rt2x00soc_free_reg(rt2x00dev);
37  
38         return -ENOMEM;
39  }
40  
41 -static int rt2800soc_probe(struct platform_device *pdev)
42 +static int rt2x00soc_probe(struct platform_device *pdev)
43  {
44 -       struct rt2x00_ops *ops = (struct rt2x00_ops *)pdev->driver->p;
45 +       const struct rt2x00_ops *ops = &rt2800pci_ops;
46         struct ieee80211_hw *hw;
47         struct rt2x00_dev *rt2x00dev;
48         int retval;
49 @@ -3248,7 +3248,7 @@ static int rt2800soc_probe(struct platfo
50  
51         rt2x00_set_chip_rt(rt2x00dev, WSOC_RT_CHIPSET);
52  
53 -       retval = rt2800soc_alloc_reg(rt2x00dev);
54 +       retval = rt2x00soc_alloc_reg(rt2x00dev);
55         if (retval)
56                 goto exit_free_device;
57  
58 @@ -3259,7 +3259,7 @@ static int rt2800soc_probe(struct platfo
59         return 0;
60  
61  exit_free_reg:
62 -       rt2800soc_free_reg(rt2x00dev);
63 +       rt2x00soc_free_reg(rt2x00dev);
64  
65  exit_free_device:
66         ieee80211_free_hw(hw);
67 @@ -3267,7 +3267,7 @@ exit_free_device:
68         return retval;
69  }
70  
71 -static int rt2800soc_remove(struct platform_device *pdev)
72 +static int rt2x00soc_remove(struct platform_device *pdev)
73  {
74         struct ieee80211_hw *hw = platform_get_drvdata(pdev);
75         struct rt2x00_dev *rt2x00dev = hw->priv;
76 @@ -3276,16 +3276,16 @@ static int rt2800soc_remove(struct platf
77          * Free all allocated data.
78          */
79         rt2x00lib_remove_dev(rt2x00dev);
80 -       rt2800soc_free_reg(rt2x00dev);
81 +       rt2x00soc_free_reg(rt2x00dev);
82         ieee80211_free_hw(hw);
83  
84         return 0;
85  }
86  
87  #ifdef CONFIG_PM
88 -int rt2x00soc_suspend(struct device *dev, pm_message_t state)
89 +int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
90  {
91 -       struct ieee80211_hw *hw = dev_get_drvdata(dev);
92 +       struct ieee80211_hw *hw = platform_get_drvdata(pdev);
93         struct rt2x00_dev *rt2x00dev = hw->priv;
94         int retval;
95  
96 @@ -3293,14 +3293,14 @@ int rt2x00soc_suspend(struct device *dev
97         if (retval)
98                 return retval;
99  
100 -       rt2800soc_free_reg(rt2x00dev);
101 +       rt2x00soc_free_reg(rt2x00dev);
102  
103         return 0;
104  }
105  
106 -int rt2x00soc_resume(struct device *dev)
107 +int rt2x00soc_resume(struct platform_device *pdev)
108  {
109 -       struct ieee80211_hw *hw = dev_get_drvdata(dev);
110 +       struct ieee80211_hw *hw = platform_get_drvdata(pdev);
111         struct rt2x00_dev *rt2x00dev = hw->priv;
112         int retval;
113  
114 @@ -3315,7 +3315,7 @@ int rt2x00soc_resume(struct device *dev)
115         return 0;
116  
117  exit_free_reg:
118 -       rt2x00pci_free_reg(rt2x00dev);
119 +       rt2x00soc_free_reg(rt2x00dev);
120  
121         return retval;
122  }
123 @@ -3326,10 +3326,9 @@ static struct platform_driver rt2800soc_
124                 .name           = "rt2800_wmac",
125                 .owner          = THIS_MODULE,
126                 .mod_name       = KBUILD_MODNAME,
127 -               .p              = &rt2800pci_ops;
128 -       }
129 -       .probe          = rt2800soc_probe,
130 -       .remove         = __devexit_p(rt2800soc_remove),
131 +       },
132 +       .probe          = rt2x00soc_probe,
133 +       .remove         = __devexit_p(rt2x00soc_remove),
134         .suspend        = rt2x00soc_suspend,
135         .resume         = rt2x00soc_resume,
136  };