~ubuntu-branches/ubuntu/vivid/bcmwl/vivid-proposed

« back to all changes in this revision

Viewing changes to src/src/include/linuxver.h

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2012-12-11 17:06:22 UTC
  • mfrom: (2.1.6)
  • Revision ID: package-import@ubuntu.com-20121211170622-7bd9yp2wm1plhhu1
Tags: 6.20.155.1+bdcom-0ubuntu1
* New upstream release (LP: #923809):
  - Added 43142 support.
  - Added 4331 support.
* debian/control:
  - depend on the different flavours of the linux-headers.
* Refresh 0002-Makefile.patch and 0001-MODULE_LICENSE.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
4
4
 *
5
 
 * Copyright (C) 2010, Broadcom Corporation
6
 
 * All Rights Reserved.
7
 
 * 
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.
 
6
 * 
 
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.
 
10
 * 
 
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.
12
18
 *
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 $
14
20
 */
15
21
 
16
22
#ifndef _linuxver_h_
105
111
#endif 
106
112
 
107
113
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
108
 
#ifdef  CONFIG_NET_RADIO
109
 
#define CONFIG_WIRELESS_EXT
110
 
#endif
111
114
#endif  
112
115
 
113
116
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 67)
183
186
#endif
184
187
 
185
188
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18))
186
 
#ifdef MODULE
187
 
#define module_init(x) int init_module(void) { return x(); }
188
 
#define module_exit(x) void cleanup_module(void) { x(); }
189
 
#else
190
189
#define module_init(x)  __initcall(x);
191
190
#define module_exit(x)  __exitcall(x);
192
 
#endif
193
191
#endif  
194
192
 
195
193
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
469
467
 
470
468
#endif 
471
469
 
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) \
 
472
{ \
 
473
struct task_struct *tsk; \
 
474
struct pid *pid;    \
 
475
pid = find_get_pid((pid_t)nr);    \
 
476
tsk = pid_task(pid, PIDTYPE_PID);    \
 
477
if (tsk) send_sig(sig, tsk, 1); \
 
478
}
 
479
#else
 
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) \
474
483
{ \
475
484
        struct task_struct *tsk; \
482
491
        kill_proc(pid, sig, 1); \
483
492
}
484
493
#endif
 
494
#endif 
 
495
 
 
496
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
 
497
#define netdev_priv(dev) dev->priv
 
498
#endif 
485
499
 
486
500
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
487
501
#define WL_DEV_IF(dev)          ((wl_if_t*)netdev_priv(dev))