2
2
* Linux-specific abstractions to gain some independence from linux kernel versions.
3
3
* Pave over some 2.2 versus 2.4 versus 2.6 kernel differences.
5
* Copyright (C) 2010, Broadcom Corporation
8
* THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9
* KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10
* SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11
* FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
5
* Copyright (C) 2011, Broadcom Corporation. All Rights Reserved.
7
* Permission to use, copy, modify, and/or distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13
* $Id: linuxver.h,v 13.53.12.3.2.2 2011-01-26 01:17:15 Exp $
19
* $Id: linuxver.h 260648 2011-05-19 22:16:03Z $
16
22
#ifndef _linuxver_h_
107
113
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
108
#ifdef CONFIG_NET_RADIO
109
#define CONFIG_WIRELESS_EXT
113
116
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 67)
185
188
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18))
187
#define module_init(x) int init_module(void) { return x(); }
188
#define module_exit(x) void cleanup_module(void) { x(); }
190
189
#define module_init(x) __initcall(x);
191
190
#define module_exit(x) __exitcall(x);
195
193
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
472
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27))
470
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31))
471
#define KILL_PROC(nr, sig) \
473
struct task_struct *tsk; \
475
pid = find_get_pid((pid_t)nr); \
476
tsk = pid_task(pid, PIDTYPE_PID); \
477
if (tsk) send_sig(sig, tsk, 1); \
480
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \
481
KERNEL_VERSION(2, 6, 30))
473
482
#define KILL_PROC(pid, sig) \
475
484
struct task_struct *tsk; \
482
491
kill_proc(pid, sig, 1); \
496
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
497
#define netdev_priv(dev) dev->priv
486
500
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
487
501
#define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev))