summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c')
-rw-r--r--target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c
new file mode 100644
index 000000000..14fd5113d
--- /dev/null
+++ b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ * Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/ath5k_platform.h>
+#include <linux/pci.h>
+
+#include "dev-wifi-ath5k.h"
+
+extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
+struct ath5k_platform_data ath5k_pdata;
+
+static int
+ath5k_pci_plat_dev_init(struct pci_dev *dev)
+{
+ dev->dev.platform_data = &ath5k_pdata;
+ return 0;
+}
+
+void __init
+ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr)
+{
+ ath5k_pdata.eeprom_data = eeprom_data;
+ ath5k_pdata.macaddr = macaddr;
+ ltqpci_plat_dev_init = ath5k_pci_plat_dev_init;
+}