aboutsummaryrefslogtreecommitdiffstats
path: root/package/rt2x00/src/rt2x00_compat.h
blob: ca51224717b4ef5adbde8f72c5a3331dca670b84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * RT2X00 Compatability fixes for specific kernels.
 */
#ifndef RT2X00_COMPAT_H
#define RT2X00_COMPAT_H

/*
 * First include the 2 config headers.
 * The rt2x00_config.h should overrule
 * the kernel configuration.
 */
#include <linux/autoconf.h>
#include "rt2x00_config.h"

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/version.h>

/*
 * Check minimal requirements.
 */
#if (!defined(CONFIG_MAC80211) && !defined(CONFIG_MAC80211_MODULE))
#error mac80211 support not enabled in kernel!
#endif

#if !defined(CONFIG_WLAN_80211)
#error 802.11 wlan card support not enabled in kernel!
#endif

#if (defined(CONFIG_RT2400PCI) || defined(CONFIG_RT2500PCI) || defined(CONFIG_RT61PCI))
#if (!defined(CONFIG_PCI) && !defined(CONFIG_PCI_MODULE))
#error PCI has been disabled in your kernel!
#endif
#if (!defined(CONFIG_EEPROM_93CX6) && !defined(CONFIG_EEPROM_93CX6_MODULE))
#error EEPROM_93CX6 has been disabled in your kernel!
#endif
#endif

#if (defined(CONFIG_RT2500USB) || defined(CONFIG_RT73USB))
#if (!defined(CONFIG_USB) && !defined(CONFIG_USB_MODULE))
#warning USB has been disabled in your kernel!
#endif
#endif

#if (defined(CONFIG_RT61PCI) || defined(CONFIG_RT73USB))
#if (!defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE))
#error Firmware loading has been disabled in your kernel!
#endif
#if (!defined(CONFIG_CRC_ITU_T) && !defined(CONFIG_CRC_ITU_T_MODULE))
#error CRC_ITU_T loading has been disabled in your kernel!
#endif
#endif

#if (defined(CONFIG_RT2X00_DEBUGFS))
#if (!defined(CONFIG_MAC80211_DEBUGFS) && !defined(CONFIG_MAC80211_DEBUGFS_MODULE))
#error mac80211 debugfs support has been disabled in your kernel!
#endif
#endif

#if (defined(CONFIG_RT2400PCI_BUTTON) || defined(CONFIG_RT2500PCI_BUTTON) || defined(CONFIG_RT61PCI_BUTTON))
#if (!defined(CONFIG_RFKILL) && !defined (CONFIG_RFKILL_MODULE))
#error RFKILL has been disabled in your kernel!
#endif
#endif

#endif /* RT2X00_COMPAT_H */