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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
--- Makefile 2005-10-22 03:11:18.000000000 +0100
+++ Makefile 2005-11-04 13:10:41.000000000 +0000
@@ -19,8 +19,6 @@
# Module: Makefile
# Abstract: Makefile for rt2x00 kernel module
-all: default
-
obj-m += rt2x00core.o
obj-m += rt2400pci.o
obj-m += rt2500pci.o
@@ -38,22 +36,49 @@
KERNEL_OUTPUT :=
endif
+ifdef KBUILD_EXTMOD
+ IEEE80211_DIR := $(KBUILD_EXTMOD)/ieee80211
+else
+ IEEE80211_DIR := ieee80211
+endif
+
+MAKEFLAGS += --no-print-directory
+CFLAGS := -I$(IEEE80211_DIR) -include $(IEEE80211_DIR)/net/ieee80211_compat.h $(CFLAGS)
+CPPFLAGS := -I$(IEEE80211_DIR) -include $(IEEE80211_DIR)/net/ieee80211_compat.h $(CPPFLAGS)
+
+all: debug
default: debug
+nodebug: ieee80211-nodebug update-symbols rt2x00-nodebug
+debug: ieee80211-debug update-symbols rt2x00-debug
+install: ieee80211-install rt2x00-install
+clean: ieee80211-clean rt2x00-clean
+
+update-symbols:
+ @mkdir -p .tmp_versions
+ @cp $(IEEE80211_DIR)/.tmp_versions/*.mod .tmp_versions
+
+ieee80211-nodebug:
+ @$(MAKE) -C $(IEEE80211_DIR) nodebug
+
+ieee80211-debug:
+ @$(MAKE) -C $(IEEE80211_DIR) debug
+
+ieee80211-install:
+ @$(MAKE) -C $(IEEE80211_DIR) install
+
+ieee80211-clean:
+ @$(MAKE) -C $(IEEE80211_DIR) clean
+
+rt2x00-nodebug:
+ @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) modules
-nodebug:
- @$(MAKE) -C $(KERNEL_SOURCES) \
- EXTRA_CFLAGS="-DEXPORT_SYMTAB" SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) \
- modules
-
-debug:
- @$(MAKE) -C $(KERNEL_SOURCES) \
- EXTRA_CFLAGS="-DEXPORT_SYMTAB -DCONFIG_RT2X00_DEBUG" SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) \
- modules
+rt2x00-debug:
+ @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) EXTRA_CFLAGS="-DCONFIG_RT2X00_DEBUG" $(KERNEL_OUTPUT) modules
-install:
- @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) $(KERNEL_OUTPUT) modules_install
+rt2x00-install:
+ @$(MAKE) -C $(KERNEL_SOURCES) SUBDIRS=$(shell pwd) INSTALL_MOD_DIR=rt2x00 $(KERNEL_OUTPUT) modules_install
/sbin/depmod -a
-clean:
+rt2x00-clean:
@rm -f *.o *.ko .*.cmd .*.flags *.mod.c .*.o.d *~
- @rm -fr .tmp_versions
+ @rm -fr .tmp_versions
\ No newline at end of file
+++ ieee80211_compat.h 2005-11-03 11:45:28.000000000 +0000
@@ -0,0 +1,30 @@
+/*
+ * RT2X00 Compatability fixes for specific kernels.
+ */
+#ifndef IEEE_COMPAT_H
+#define IEEE_COMPAT_H
+
+#include <linux/kernel.h>
+#include <linux/version.h>
+#include <linux/etherdevice.h>
+
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 13)
+typedef unsigned __nocast gfp_t;
+
+static inline int is_broadcast_ether_addr(const u8 *addr)
+{
+ return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
+}
+#endif /* LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 13) */
+
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 14)
+static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b)
+{
+ const u16 *a = (const u16 *) _a;
+ const u16 *b = (const u16 *) _b;
+
+ BUILD_BUG_ON(ETH_ALEN != 6);
+ return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
+}
+#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 14) */
+#endif /* IEEE_COMPAT_H */
|