summaryrefslogtreecommitdiffstats
path: root/package/acx-mac80211/patches/004-wireless-compat.patch
blob: 33ecc4cf93ea8fc962fee59a2b6a421bccfbcb32 (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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
Index: acx-mac80211-20100422/acx_func.h
===================================================================
--- acx-mac80211-20100422.orig/acx_func.h	2010-05-02 03:07:09.000000000 +0200
+++ acx-mac80211-20100422/acx_func.h	2010-05-02 22:03:28.309677381 +0200
@@ -214,10 +214,6 @@
 			printk(args); \
 	} while (0)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
-#define printk_ratelimited(args...) printk(args)
-#endif
-
 // Log with prefix "acx: __func__ 
 #define logf0(chan, msg) \
 		log(chan, "acx: %s: " msg, __func__);
@@ -341,17 +337,10 @@
 // BOM Mac80211 Ops (Common)
 // -----
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-int acx_e_op_add_interface(struct ieee80211_hw* ieee,
-		struct ieee80211_if_init_conf *conf);
-void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
-		struct ieee80211_if_init_conf *conf);
-#else
 int acx_e_op_add_interface(struct ieee80211_hw* ieee,
 		struct ieee80211_vif *vif);
 void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
 		struct ieee80211_vif *vif);
-#endif
 
 int acx_e_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		struct ieee80211_vif *vif, struct ieee80211_sta *sta,
@@ -366,10 +355,6 @@
 		const struct ieee80211_tx_queue_params *params);
 int acx_e_op_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-int acx_e_op_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
-#endif
-
 // BOM Helpers (Common)
 // -----
 void acx_s_mwait(int ms);
Index: acx-mac80211-20100422/common.c
===================================================================
--- acx-mac80211-20100422.orig/common.c	2010-05-02 03:07:09.000000000 +0200
+++ acx-mac80211-20100422/common.c	2010-05-02 22:04:49.597801719 +0200
@@ -4900,13 +4900,8 @@
  * ==================================================
  */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-int acx_e_op_add_interface(struct ieee80211_hw *ieee,
-		      struct ieee80211_if_init_conf *conf)
-#else
 int acx_e_op_add_interface(struct ieee80211_hw *ieee,
 		      struct ieee80211_vif *vif)
-#endif
 {
 	acx_device_t *adev = ieee2adev(ieee);
 	unsigned long flags;
@@ -4918,23 +4913,14 @@
 	acx_sem_lock(adev);
 	acx_lock(adev, flags);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	if (conf->type == NL80211_IFTYPE_MONITOR) {
-#else
 	if (vif->type == NL80211_IFTYPE_MONITOR) {
-#endif
 		adev->interface.monitor++;
 	} else {
 		if (adev->interface.operating)
 			goto out_unlock;
 		adev->interface.operating = 1;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-		adev->interface.mac_addr = conf->mac_addr;
-		adev->interface.type = conf->type;
-#else
 		adev->interface.mac_addr = vif->addr;
 		adev->interface.type = vif->type;
-#endif
 	}
 //	adev->mode = conf->type;
 
@@ -4949,13 +4935,8 @@
 
 	printk(KERN_INFO "acx: Virtual interface added "
 	       "(type: 0x%08X, MAC: %s)\n",
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	       conf->type,
-	       acx_print_mac(mac, conf->mac_addr)
-#else
 	       vif->type,
 	       acx_print_mac(mac, vif->addr)
-#endif
 	);
 
     out_unlock:
@@ -4966,13 +4947,8 @@
 	return err;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-void acx_e_op_remove_interface(struct ieee80211_hw *hw,
-			  struct ieee80211_if_init_conf *conf)
-#else
 void acx_e_op_remove_interface(struct ieee80211_hw *hw,
 			  struct ieee80211_vif *vif)
-#endif
 {
 	acx_device_t *adev = ieee2adev(hw);
 
@@ -4981,37 +4957,23 @@
 	FN_ENTER;
 	acx_sem_lock(adev);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	if (conf->type == NL80211_IFTYPE_MONITOR) {
-#else
 	if (vif->type == NL80211_IFTYPE_MONITOR) {
-#endif
 		adev->interface.monitor--;
 //      assert(bcm->interface.monitor >= 0);
 	} else {
 		adev->interface.operating = 0;
 	}
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	log(L_DEBUG, "acx: %s: interface.operating=%d, conf->type=%d\n",
-			__func__,
-			adev->interface.operating, conf->type);
-#else
 	log(L_DEBUG, "acx: %s: interface.operating=%d, vif->type=%d\n",
 			__func__,
 			adev->interface.operating, vif->type);
-#endif
 
 	if (adev->initialized)
 		acx_s_select_opmode(adev);
 
 	log(L_ANY, "acx: Virtual interface removed: "
 	       "type=%d, MAC=%s\n",
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	       conf->type, acx_print_mac(mac, conf->mac_addr)
-#else
 	       vif->type, acx_print_mac(mac, vif->addr)
-#endif
 	       );
 
 	acx_sem_unlock(adev);
@@ -5351,26 +5313,6 @@
 	return 0;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-int acx_e_op_get_tx_stats(struct ieee80211_hw *hw,
-			 struct ieee80211_tx_queue_stats *stats)
-{
-	acx_device_t *adev = ieee2adev(hw);
-	int err = -ENODEV;
-
-	FN_ENTER;
-	acx_sem_lock(adev);
-
-	stats->len = 0;
-	stats->limit = TX_CNT;
-	stats->count = 0;
-
-	acx_sem_unlock(adev);
-	FN_EXIT0;
-	return err;
-}
-#endif
-
 /*
  * BOM Helpers
  * ==================================================
Index: acx-mac80211-20100422/mem.c
===================================================================
--- acx-mac80211-20100422.orig/mem.c	2010-05-02 03:07:09.000000000 +0200
+++ acx-mac80211-20100422/mem.c	2010-05-02 22:05:26.007552341 +0200
@@ -4654,9 +4654,6 @@
 		.bss_info_changed = acx_e_op_bss_info_changed,
 		.set_key = acx_e_op_set_key,
 		.get_stats = acx_e_op_get_stats,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-		.get_tx_stats = acx_e_op_get_tx_stats,
-#endif
 		};
 
 /*
Index: acx-mac80211-20100422/pci.c
===================================================================
--- acx-mac80211-20100422.orig/pci.c	2010-05-02 03:07:09.000000000 +0200
+++ acx-mac80211-20100422/pci.c	2010-05-02 22:06:03.758564021 +0200
@@ -3149,9 +3149,6 @@
 	.bss_info_changed = acx_e_op_bss_info_changed,
 	.set_key = acx_e_op_set_key,
 	.get_stats = acx_e_op_get_stats,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	.get_tx_stats = acx_e_op_get_tx_stats,
-#endif
 };
 
 
Index: acx-mac80211-20100422/usb.c
===================================================================
--- acx-mac80211-20100422.orig/usb.c	2010-05-02 03:07:09.000000000 +0200
+++ acx-mac80211-20100422/usb.c	2010-05-02 22:06:22.874733862 +0200
@@ -1444,9 +1444,6 @@
 	.bss_info_changed = acx_e_op_bss_info_changed,
 	.set_key = acx_e_op_set_key,
 	.get_stats = acx_e_op_get_stats,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
-	.get_tx_stats = acx_e_op_get_tx_stats,
-#endif
 };
 
 /*