~henrix/ubuntu/precise/open-vm-dkms/lp-1416003

« back to all changes in this revision

Viewing changes to modules/linux/vmxnet3/compat_version.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********************************************************
 
2
 * Copyright (C) 1998 VMware, Inc. All rights reserved.
 
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 as published by the
 
6
 * Free Software Foundation version 2 and no later version.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
10
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
11
 * for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License along
 
14
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
15
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
16
 *
 
17
 *********************************************************/
 
18
 
 
19
#ifndef __COMPAT_VERSION_H__
 
20
#   define __COMPAT_VERSION_H__
 
21
 
 
22
#define INCLUDE_ALLOW_VMMON
 
23
#define INCLUDE_ALLOW_MODULE
 
24
#define INCLUDE_ALLOW_VMCORE
 
25
#define INCLUDE_ALLOW_VMNIXMOD
 
26
#define INCLUDE_ALLOW_DISTRIBUTE
 
27
#include "includeCheck.h"
 
28
 
 
29
 
 
30
#ifndef __linux__
 
31
#   error "linux-version.h"
 
32
#endif
 
33
 
 
34
 
 
35
#include <linux/version.h>
 
36
 
 
37
/* Appeared in 2.1.90 --hpreg */
 
38
#ifndef KERNEL_VERSION
 
39
#   define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
 
40
#endif
 
41
 
 
42
 
 
43
/*
 
44
 * Distinguish relevant classes of Linux kernels.
 
45
 *
 
46
 * The convention is that version X defines all
 
47
 * the KERNEL_Y symbols where Y <= X.
 
48
 *
 
49
 * XXX Do not add more definitions here. This way of doing things does not
 
50
 *     scale, and we are going to phase it out soon --hpreg
 
51
 */
 
52
 
 
53
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 0)
 
54
#   define KERNEL_2_1
 
55
#endif
 
56
 
 
57
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 0)
 
58
#   define KERNEL_2_2
 
59
#endif
 
60
 
 
61
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 1)
 
62
#   define KERNEL_2_3_1
 
63
#endif
 
64
 
 
65
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 15)
 
66
/*   new networking */
 
67
#   define KERNEL_2_3_15
 
68
#endif
 
69
 
 
70
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 25)
 
71
/*  new procfs */
 
72
#   define KERNEL_2_3_25
 
73
#endif
 
74
 
 
75
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 29)
 
76
/*  even newer procfs */
 
77
#   define KERNEL_2_3_29
 
78
#endif
 
79
 
 
80
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 43)
 
81
/*  softnet changes */
 
82
#   define KERNEL_2_3_43
 
83
#endif
 
84
 
 
85
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 47)
 
86
/*  more softnet changes */
 
87
#   define KERNEL_2_3_47
 
88
#endif
 
89
 
 
90
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 99)
 
91
/*  name in netdevice struct is array and not pointer */
 
92
#   define KERNEL_2_3_99
 
93
#endif
 
94
 
 
95
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
 
96
/*  New 'owner' member at the beginning of struct file_operations */
 
97
#      define KERNEL_2_4_0
 
98
#endif
 
99
 
 
100
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8)
 
101
/*  New netif_rx_ni() --hpreg */
 
102
#   define KERNEL_2_4_8
 
103
#endif
 
104
 
 
105
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
 
106
/*  New vmap() */
 
107
#   define KERNEL_2_4_22
 
108
#endif
 
109
 
 
110
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 2)
 
111
/*  New kdev_t, major()/minor() API --hpreg */
 
112
#   define KERNEL_2_5_2
 
113
#endif
 
114
 
 
115
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 5)
 
116
/*  New sk_alloc(), pte_offset_map()/pte_unmap() --hpreg */
 
117
#   define KERNEL_2_5_5
 
118
#endif
 
119
 
 
120
 
 
121
#endif /* __COMPAT_VERSION_H__ */