2 * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
3 * Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@gmail.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published
7 * by the Free Software Foundation.
10 #include <linux/init.h>
11 #include <linux/platform_device.h>
12 #include <linux/ath5k_platform.h>
13 #include <linux/ath9k_platform.h>
14 #include <linux/pci.h>
16 #include "dev-wifi-athxk.h"
18 extern int (*ltqpci_plat_dev_init
)(struct pci_dev
*dev
);
19 struct ath5k_platform_data ath5k_pdata
;
20 struct ath9k_platform_data ath9k_pdata
= {
26 ath5k_pci_plat_dev_init(struct pci_dev
*dev
)
28 dev
->dev
.platform_data
= &ath5k_pdata
;
33 ath9k_pci_plat_dev_init(struct pci_dev
*dev
)
35 dev
->dev
.platform_data
= &ath9k_pdata
;
40 ltq_register_ath5k(u16
*eeprom_data
, u8
*macaddr
)
42 ath5k_pdata
.eeprom_data
= eeprom_data
;
43 ath5k_pdata
.macaddr
= macaddr
;
44 ltqpci_plat_dev_init
= ath5k_pci_plat_dev_init
;
48 ltq_register_ath9k(u16
*eeprom_data
, u8
*macaddr
)
50 memcpy(ath9k_pdata
.eeprom_data
, eeprom_data
, sizeof(ath9k_pdata
.eeprom_data
));
51 ath9k_pdata
.macaddr
= macaddr
;
52 ltqpci_plat_dev_init
= ath9k_pci_plat_dev_init
;