1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-08-21 04:30:15 +03:00
openwrt-xburst/package/mac80211/patches/309-rt2x00-Fix-compile-errors-for-SoC.patch
hauke 22319bbae1 [mac80211] Update compat-wireless to 2009-03-18
Removing of include/net/ieee80211_radiotap.h is not needed, because it is only used by this compat-wireless.
There are changes in that file and compat-wireless needs the newest version.

Some more symbols are deactivated in the default config file, this will make building faster.
The rt2800pci patches are up to date now.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14946 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-18 22:22:57 +00:00

137 lines
3.8 KiB
Diff

From e6cbd7e05f7c1fe0a737526d20f39b4a52e03ae8 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Tue, 17 Mar 2009 14:01:29 +0100
Subject: [PATCH] rt2x00: Fix compile errors for SoC
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800pci.c | 37 +++++++++++++++----------------
1 files changed, 18 insertions(+), 19 deletions(-)
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -3186,7 +3186,7 @@ MODULE_LICENSE("GPL");
#define WSOC_RT_CHIPSET RT3052
#endif /* CONFIG_RALINK_RT305X */
-static void rt2800soc_free_reg(struct rt2x00_dev *rt2x00dev)
+static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
{
kfree(rt2x00dev->rf);
rt2x00dev->rf = NULL;
@@ -3195,7 +3195,7 @@ static void rt2800soc_free_reg(struct rt
rt2x00dev->eeprom = NULL;
}
-static int rt2800soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
+static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
{
struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
struct resource *res;
@@ -3219,14 +3219,14 @@ static int rt2800soc_alloc_reg(struct rt
exit:
ERROR_PROBE("Failed to allocate registers.\n");
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return -ENOMEM;
}
-static int rt2800soc_probe(struct platform_device *pdev)
+static int rt2x00soc_probe(struct platform_device *pdev)
{
- struct rt2x00_ops *ops = (struct rt2x00_ops *)pdev->driver->p;
+ const struct rt2x00_ops *ops = &rt2800pci_ops;
struct ieee80211_hw *hw;
struct rt2x00_dev *rt2x00dev;
int retval;
@@ -3248,7 +3248,7 @@ static int rt2800soc_probe(struct platfo
rt2x00_set_chip_rt(rt2x00dev, WSOC_RT_CHIPSET);
- retval = rt2800soc_alloc_reg(rt2x00dev);
+ retval = rt2x00soc_alloc_reg(rt2x00dev);
if (retval)
goto exit_free_device;
@@ -3259,7 +3259,7 @@ static int rt2800soc_probe(struct platfo
return 0;
exit_free_reg:
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
exit_free_device:
ieee80211_free_hw(hw);
@@ -3267,7 +3267,7 @@ exit_free_device:
return retval;
}
-static int rt2800soc_remove(struct platform_device *pdev)
+static int rt2x00soc_remove(struct platform_device *pdev)
{
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -3276,16 +3276,16 @@ static int rt2800soc_remove(struct platf
* Free all allocated data.
*/
rt2x00lib_remove_dev(rt2x00dev);
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
ieee80211_free_hw(hw);
return 0;
}
#ifdef CONFIG_PM
-int rt2x00soc_suspend(struct device *dev, pm_message_t state)
+int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct ieee80211_hw *hw = dev_get_drvdata(dev);
+ struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
int retval;
@@ -3293,14 +3293,14 @@ int rt2x00soc_suspend(struct device *dev
if (retval)
return retval;
- rt2800soc_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return 0;
}
-int rt2x00soc_resume(struct device *dev)
+int rt2x00soc_resume(struct platform_device *pdev)
{
- struct ieee80211_hw *hw = dev_get_drvdata(dev);
+ struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct rt2x00_dev *rt2x00dev = hw->priv;
int retval;
@@ -3315,7 +3315,7 @@ int rt2x00soc_resume(struct device *dev)
return 0;
exit_free_reg:
- rt2x00pci_free_reg(rt2x00dev);
+ rt2x00soc_free_reg(rt2x00dev);
return retval;
}
@@ -3326,10 +3326,9 @@ static struct platform_driver rt2800soc_
.name = "rt2800_wmac",
.owner = THIS_MODULE,
.mod_name = KBUILD_MODNAME,
- .p = &rt2800pci_ops;
- }
- .probe = rt2800soc_probe,
- .remove = __devexit_p(rt2800soc_remove),
+ },
+ .probe = rt2x00soc_probe,
+ .remove = __devexit_p(rt2x00soc_remove),
.suspend = rt2x00soc_suspend,
.resume = rt2x00soc_resume,
};