2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <linux/version.h>
21 #include <linux/module.h>
23 #include <linux/slab.h>
25 #include <linux/types.h>
26 #include <linux/init.h>
28 #include <linux/string.h>
29 #include <linux/pci.h>
30 #include <linux/interrupt.h>
31 #include <linux/netdevice.h>
35 #include <linux/workqueue.h>
37 #define MY_INIT_WORK(_work, _func) INIT_WORK(_work, _func)
39 typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs * ptregs);
41 #include <linux/sched.h>
42 #include <linux/ieee80211.h>
51 #define __devinit __init
57 #define __devexit_p(x) x
60 #define pci_module_init pci_register_driver
62 #define netif_down(dev)
64 /* Power management related macro & routines */
65 #define PCI_SAVE_STATE(a, b) pci_save_state(a)
66 #define PCI_RESTORE_STATE(a, b) pci_restore_state(a)
68 /* Module refcount handled internally in 2.6.x */
69 #ifndef SET_MODULE_OWNER
70 #define SET_MODULE_OWNER(dev) do {} while (0)
72 #ifndef MOD_INC_USE_COUNT
73 #define MOD_INC_USE_COUNT do {} while (0)
75 #ifndef MOD_DEC_USE_COUNT
76 #define MOD_DEC_USE_COUNT do {} while (0)
78 #define OLD_MOD_INC_USE_COUNT MOD_INC_USE_COUNT
79 #define OLD_MOD_DEC_USE_COUNT MOD_DEC_USE_COUNT
81 #ifndef SET_NETDEV_DEV
82 #define SET_NETDEV_DEV(net, pdev) do {} while (0)
85 #ifndef HAVE_FREE_NETDEV
86 #define free_netdev(dev) kfree(dev)
90 #define DRV_SUSPEND_STATE_TYPE pm_message_t
92 #define CHECKSUM_HW CHECKSUM_PARTIAL
94 #include <linux/time.h>
95 #include <linux/wait.h>
97 #define KILL_PROC(nr, sig) \
99 struct task_struct *tsk; \
101 pid = find_get_pid((pid_t)nr); \
102 tsk = pid_task(pid, PIDTYPE_PID); \
104 send_sig(sig, tsk, 1); \
107 #define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev))
109 #endif /* _linuxver_h_ */