Root/target/linux/lantiq/files/arch/mips/lantiq/xway/dev-wifi-rt2x00.c

1/*
2 * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published
6 * by the Free Software Foundation.
7 */
8
9#include <linux/init.h>
10#include <linux/platform_device.h>
11#include <linux/rt2x00_platform.h>
12#include <linux/pci.h>
13
14#include "dev-wifi-rt2x00.h"
15
16extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
17struct rt2x00_platform_data rt2x00_pdata;
18
19static int
20rt2x00_pci_plat_dev_init(struct pci_dev *dev)
21{
22    dev->dev.platform_data = &rt2x00_pdata;
23    return 0;
24}
25
26void __init
27ltq_register_rt2x00(const char *firmware, const u8 *mac)
28{
29    rt2x00_pdata.eeprom_file_name = kstrdup(firmware, GFP_KERNEL);
30    rt2x00_pdata.mac_address = mac;
31    ltqpci_plat_dev_init = rt2x00_pci_plat_dev_init;
32}
33

Archive Download this file



interactive