aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-04-12 09:29:23 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-04-12 09:29:23 +0000
commit5ffdddc75e4ac2f3d767be404f9950daa9475d92 (patch)
tree4196b862614d70495f8f3f485b84a04542cdbfc9 /package/mac80211
parente19354773372c9dc81f6987b777ca9d5c25cb9f8 (diff)
downloadupstream-5ffdddc75e4ac2f3d767be404f9950daa9475d92.tar.gz
upstream-5ffdddc75e4ac2f3d767be404f9950daa9475d92.tar.bz2
upstream-5ffdddc75e4ac2f3d767be404f9950daa9475d92.zip
mac80211: ath9k: register id table for platform device
Currently the device id in the platform driver is hardcoded to an id which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac) of these SOCs. But this needs to be dynamic when we want to support different wmac of SOCs. So add id_table to driver to make it extendable to more SOCs. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> SVN-Revision: 26604
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/Makefile2
-rw-r--r--package/mac80211/patches/560-ath9k-register-id-table-for-platform-device.patch46
2 files changed, 47 insertions, 1 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index a7a21666d2..1eca016669 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2011-04-06
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_MD5SUM:=7ef8c2d9ee25af7ed33cf339f2484249
diff --git a/package/mac80211/patches/560-ath9k-register-id-table-for-platform-device.patch b/package/mac80211/patches/560-ath9k-register-id-table-for-platform-device.patch
new file mode 100644
index 0000000000..3a8da5b77a
--- /dev/null
+++ b/package/mac80211/patches/560-ath9k-register-id-table-for-platform-device.patch
@@ -0,0 +1,46 @@
+--- a/drivers/net/wireless/ath/ath9k/ahb.c
++++ b/drivers/net/wireless/ath/ath9k/ahb.c
+@@ -21,6 +21,14 @@
+ #include <linux/ath9k_platform.h>
+ #include "ath9k.h"
+
++const struct platform_device_id ath9k_platform_id_table[] = {
++ {
++ .name = "ath9k",
++ .driver_data = AR5416_AR9100_DEVID,
++ },
++ {},
++};
++
+ /* return bus cachesize in 4B word units */
+ static void ath_ahb_read_cachesize(struct ath_common *common, int *csz)
+ {
+@@ -57,6 +65,7 @@ static int ath_ahb_probe(struct platform
+ struct ath_softc *sc;
+ struct ieee80211_hw *hw;
+ struct resource *res;
++ const struct platform_device_id *id = platform_get_device_id(pdev);
+ int irq;
+ int ret = 0;
+ struct ath_hw *ah;
+@@ -116,7 +125,7 @@ static int ath_ahb_probe(struct platform
+ goto err_free_hw;
+ }
+
+- ret = ath9k_init_device(AR5416_AR9100_DEVID, sc, 0x0, &ath_ahb_bus_ops);
++ ret = ath9k_init_device(id->driver_data, sc, 0x0, &ath_ahb_bus_ops);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to initialize device\n");
+ goto err_irq;
+@@ -165,8 +174,11 @@ static struct platform_driver ath_ahb_dr
+ .name = "ath9k",
+ .owner = THIS_MODULE,
+ },
++ .id_table = ath9k_platform_id_table,
+ };
+
++MODULE_DEVICE_TABLE(platform, ath9k_platform_id_table);
++
+ int ath_ahb_init(void)
+ {
+ return platform_driver_register(&ath_ahb_driver);