Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/wimax/files/updates: 0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch 0013-Fix-typo-in-logrotate-script.patch 0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch 0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch 0001-wimax-network-service-64-bit-fixes.patch 0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch 0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch 0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch 0018-L5Common-Big-endian-support.patch 0014-KDapi-Big-endian-support.patch 0016-Wrappers-wmx_SystemStateUpdate-alignment.patch 0002-cleanup-fix-struct-packing-and-type-casting-issues.patch 0011-configure-remove-O2-by-default.patch 0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch 0006-wimaxcu-fix-array-size.patch 0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch 0015-Wrappers-wmx_Preambles_t-alignment.patch 0019-Supplicant-Big-e ndian-support.pat ch 0005-remove-duplicate-typedef-for-u8.patch 0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch
Date: Wed, 23 Feb 2011 11:12:27
Message-Id: 20110223111208.8184420054@flycatcher.gentoo.org
1 alexxy 11/02/23 11:12:08
2
3 Added:
4 0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch
5 0013-Fix-typo-in-logrotate-script.patch
6 0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch
7 0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch
8 0001-wimax-network-service-64-bit-fixes.patch
9 0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch
10 0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch
11 0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch
12 0018-L5Common-Big-endian-support.patch
13 0014-KDapi-Big-endian-support.patch
14 0016-Wrappers-wmx_SystemStateUpdate-alignment.patch
15 0002-cleanup-fix-struct-packing-and-type-casting-issues.patch
16 0011-configure-remove-O2-by-default.patch
17 0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch
18 0006-wimaxcu-fix-array-size.patch
19 0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch
20 0015-Wrappers-wmx_Preambles_t-alignment.patch
21 0019-Supplicant-Big-endian-support.patch
22 0005-remove-duplicate-typedef-for-u8.patch
23 0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch
24 Log:
25 [net-wireless/wimax] Add updates from git. Also fix bug #356121
26
27 (Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
28
29 Revision Changes Path
30 1.1 net-wireless/wimax/files/updates/0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch
31
32 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch?rev=1.1&view=markup
33 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch?rev=1.1&content-type=text/plain
34
35 Index: 0008-supplicant-Fix-eap_methods-array-setup-and-declarati.patch
36 ===================================================================
37 From 339c280e7dea7f0a590b9637bdacaae791c25b06 Mon Sep 17 00:00:00 2001
38 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
39 Date: Tue, 23 Nov 2010 15:56:37 -0800
40 Subject: [PATCH 08/20] supplicant: Fix eap_methods array setup and declaration
41
42 The eap_methods array has to be EAP_VENDOR_IETF:EAP_TYPE_NONE
43 terminated, thus it has to be one slot bigger than 2. As well, the
44 proper pointer wasn't set to eap_ctx.eap_config.eap_methods. All
45 fixed.
46
47 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
48 ---
49 .../Agents/Supplicant/Source/SupplicantAgent.c | 6 ++++--
50 1 files changed, 4 insertions(+), 2 deletions(-)
51
52 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
53 index 742c57b..7cb5196 100644
54 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
55 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
56 @@ -174,7 +174,7 @@ SupplicantData g_SuppData1; //[findme][amirs] buffer for 64bit
57
58 SupplicantConfig g_SuppConfig1; //[findme][amirs] buffer for 64bit
59 #endif
60 -static struct eap_method_type eap_methods[2];
61 +static struct eap_method_type eap_methods[3];
62 SupplicantConfig g_SuppConfig;
63
64 OSAL_dynlib_t g_DSlib = NULL;
65 @@ -480,6 +480,8 @@ wmx_Status_t InitSupplicantLibrary(VOID)
66
67 #if defined(WPA_OPEN_SOURCE)
68 memset(&eap_methods, 0, sizeof(eap_methods));
69 + eap_methods[2].vendor = EAP_VENDOR_IETF;
70 + eap_methods[2].method = EAP_TYPE_NONE;
71 memset(&eap_ctx, 0, sizeof(eap_ctx));
72
73 eap_ctx.eap_config.identity = (u8 *) os_strdup("user");
74 @@ -488,7 +490,7 @@ wmx_Status_t InitSupplicantLibrary(VOID)
75 eap_ctx.eap_config.password_len = 8;
76 eap_ctx.eap_config.ca_cert = (u8 *) os_strdup("ca.pem");
77 eap_ctx.eap_config.fragment_size = TLS_MAX_SIZE;
78 - eap_ctx.eap_config.eap_methods = &eap_methods;
79 + eap_ctx.eap_config.eap_methods = eap_methods;
80
81 memset(&eap_cb, 0, sizeof(eap_cb));
82 eap_cb.get_config = peer_get_config;
83 --
84 1.7.4.1
85
86
87
88
89 1.1 net-wireless/wimax/files/updates/0013-Fix-typo-in-logrotate-script.patch
90
91 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0013-Fix-typo-in-logrotate-script.patch?rev=1.1&view=markup
92 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0013-Fix-typo-in-logrotate-script.patch?rev=1.1&content-type=text/plain
93
94 Index: 0013-Fix-typo-in-logrotate-script.patch
95 ===================================================================
96 From 79a60814470c37c832210626cfea7dcd02bc7c26 Mon Sep 17 00:00:00 2001
97 From: Alexey I. Froloff <raorn@××××××××.org>
98 Date: Mon, 10 Jan 2011 06:10:00 -0800
99 Subject: [PATCH 13/20] Fix typo in logrotate script
100
101 Signed-off-by: Alexey I. Froloff <raorn@××××××××.org>
102 ---
103 InfraStack/OSDependent/Linux/OSAL/logrotate.in | 2 +-
104 1 files changed, 1 insertions(+), 1 deletions(-)
105
106 diff --git a/InfraStack/OSDependent/Linux/OSAL/logrotate.in b/InfraStack/OSDependent/Linux/OSAL/logrotate.in
107 index 6407044..b6d2cb4 100644
108 --- a/InfraStack/OSDependent/Linux/OSAL/logrotate.in
109 +++ b/InfraStack/OSDependent/Linux/OSAL/logrotate.in
110 @@ -2,7 +2,7 @@
111 daily
112 delaycompress
113 copytruncate
114 - externsion log
115 + extension log
116 missingok
117 rotate 9
118 }
119 --
120 1.7.4.1
121
122
123
124
125 1.1 net-wireless/wimax/files/updates/0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch
126
127 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch?rev=1.1&view=markup
128 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch?rev=1.1&content-type=text/plain
129
130 Index: 0020-endianess-use-endian.h-to-determine-endianess-vs-sta.patch
131 ===================================================================
132 From befcae11af55ab8987548a01344ee994a83964e6 Mon Sep 17 00:00:00 2001
133 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
134 Date: Fri, 4 Feb 2011 14:27:34 -0800
135 Subject: [PATCH 20/20] endianess: use <endian.h> to determine endianess vs static Makefile definitions
136
137 Reported-by: Doug Kehn <rdkehn@×××××.com>
138
139 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
140 ---
141 .../Common/L4Common/SourceControl/BitmanCommon.h | 6 ++++--
142 .../Instrumantation/MocMsgProxy/Makefile.am | 2 +-
143 .../Instrumantation/MocMsgProxy/Makefile.in | 2 +-
144 .../OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.am | 2 +-
145 .../OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.in | 2 +-
146 5 files changed, 8 insertions(+), 6 deletions(-)
147
148 diff --git a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
149 index 874df35..11ff75f 100644
150 --- a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
151 +++ b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
152 @@ -12,6 +12,8 @@
153 #ifndef _BITMAN_COMMON_H_
154 #define _BITMAN_COMMON_H_
155
156 +#include <endian.h>
157 +
158 #if defined __ARMCC_VERSION
159 #ifndef __arm
160 #define __arm
161 @@ -29,9 +31,9 @@
162 #define BMI_MACHINE_INTEL_LITTLE (3)
163
164 // New definitions for machine endianness
165 -#if defined BMI_MACHINE_ENDIANNESS_LITTLE
166 +#if BYTE_ORDER == LITTLE_ENDIAN
167 #define BMI_ENDIANNESS_LITTLE
168 -#elif defined BMI_MACHINE_ENDIANNESS_BIG
169 +#elif BYTE_ORDER == BIG_ENDIAN
170 #define BMI_ENDIANNESS_BIG
171 #endif
172
173 diff --git a/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.am b/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.am
174 index ff557d1..02bbf28 100644
175 --- a/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.am
176 +++ b/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.am
177 @@ -24,6 +24,6 @@ libMocMsgProxy_la_CFLAGS = \
178 -I "$(top_srcdir)/InfraStack/OSAgnostic/Common/L4Common/SourceControl" \
179 -I "$(top_srcdir)/InfraStack/OSDependent/Linux/L4Generated" \
180 -I "$(top_srcdir)/InfraStack/OSAgnostic/OSInterface/InfraStackModules" \
181 - -D "_USE_TRACE" -D "BMI_ENDIANNESS_LITTLE" -D "_LINUX" -D "_OS_WIN32SIM"
182 + -D "_USE_TRACE" -D "_LINUX" -D "_OS_WIN32SIM"
183
184
185 diff --git a/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.in b/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.in
186 index 287ebc6..0704a3d 100644
187 --- a/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.in
188 +++ b/InfraStack/OSAgnostic/Product/Instrumantation/MocMsgProxy/Makefile.in
189 @@ -218,7 +218,7 @@ libMocMsgProxy_la_CFLAGS = \
190 -I "$(top_srcdir)/InfraStack/OSAgnostic/Common/L4Common/SourceControl" \
191 -I "$(top_srcdir)/InfraStack/OSDependent/Linux/L4Generated" \
192 -I "$(top_srcdir)/InfraStack/OSAgnostic/OSInterface/InfraStackModules" \
193 - -D "_USE_TRACE" -D "BMI_ENDIANNESS_LITTLE" -D "_LINUX" -D "_OS_WIN32SIM"
194 + -D "_USE_TRACE" -D "_LINUX" -D "_OS_WIN32SIM"
195
196 all: all-am
197
198 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.am b/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.am
199 index 57c08c6..e66d576 100644
200 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.am
201 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.am
202 @@ -98,7 +98,7 @@ libiWmxSdk_la_CFLAGS = \
203 -I "$(srcdir)/../../Agents/NDnS/Source" \
204 -I "$(srcdir)/../../Agents/NDnS/APDO/" \
205 -I "$(srcdir)/../../Agents/Supplicant/Source/ds" \
206 - -D "_USE_TRACE" -D "BMI_ENDIANNESS_LITTLE" \
207 + -D "_USE_TRACE" \
208 -D "_OS_WIN32SIM" -D "OMADM_CLIENT_SIMULATOR" \
209 -D _GNU_SOURCE \
210 -D "_LINUX" -D "_WIMAX_SDK_" \
211 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.in b/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.in
212 index 893ec4c..743d355 100644
213 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.in
214 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/iWmxSDK/Makefile.in
215 @@ -333,7 +333,7 @@ libiWmxSdk_la_CFLAGS = \
216 -I "$(srcdir)/../../Agents/NDnS/Source" \
217 -I "$(srcdir)/../../Agents/NDnS/APDO/" \
218 -I "$(srcdir)/../../Agents/Supplicant/Source/ds" \
219 - -D "_USE_TRACE" -D "BMI_ENDIANNESS_LITTLE" \
220 + -D "_USE_TRACE" \
221 -D "_OS_WIN32SIM" -D "OMADM_CLIENT_SIMULATOR" \
222 -D _GNU_SOURCE \
223 -D "_LINUX" -D "_WIMAX_SDK_" \
224 --
225 1.7.4.1
226
227
228
229
230 1.1 net-wireless/wimax/files/updates/0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch
231
232 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch?rev=1.1&view=markup
233 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch?rev=1.1&content-type=text/plain
234
235 Index: 0012-Allow-IP-handling-script-to-be-configurable-at-runti.patch
236 ===================================================================
237 From 616a37c88c7a70008d8fc24d763e6b40bbd2d2d1 Mon Sep 17 00:00:00 2001
238 From: Dan Williams <dcbw@××××××.com>
239 Date: Mon, 20 Dec 2010 17:51:16 -0600
240 Subject: [PATCH 12/20] Allow IP handling script to be configurable at runtime
241
242 Instead of hard-coding a script that unconditionally runs something,
243 allow an alternate script to be given. This can allow connection
244 managers that handle the IP details themselves to better integrate
245 with the wimax daemon.
246 ---
247 .../Skeletons/AppSrv/GenericMain.c | 35 +++++++++++++++++---
248 .../Linux/OSAL/Services/wimax_osal_services.c | 25 +++++++++-----
249 2 files changed, 46 insertions(+), 14 deletions(-)
250
251 diff --git a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericMain.c b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericMain.c
252 index bdd2bc7..9c2a161 100644
253 --- a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericMain.c
254 +++ b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericMain.c
255 @@ -34,6 +34,8 @@ POSSIBILITY OF SUCH DAMAGE.
256 #include <libgen.h>
257 #include <unistd.h>
258 #include <sys/types.h>
259 +#include <sys/stat.h>
260 +#include <unistd.h>
261
262 #include "wimax_osal_primitives.h"
263 #include "wimax_osal_config_controler.h"
264 @@ -45,6 +47,7 @@ extern char *g_ifacename;
265 static char *progname;
266 int g_kill = 0;
267 int g_daemon = -1;
268 +extern char *g_script;
269
270 static
271 void do_help(FILE *f)
272 @@ -58,6 +61,7 @@ void do_help(FILE *f)
273 "-k Kill existing instance (requires -i)\n"
274 "-d Debug mode, work in console and don't become a daemon\n"
275 "-b Force working in background and become a daemon\n"
276 + "-s SCRIPT Script to run on network interface IP change events\n"
277 "-h This help\n", progname);
278 }
279
280 @@ -65,18 +69,15 @@ int main(int argc, char *argv[])
281 {
282 BOOL res;
283 char target[MAX_TARGET_NAME] = {0};
284 - if (geteuid() != (uid_t) 0) {
285 - fprintf(stderr, "ERROR: You do not possess sufficient privileges to perform this action.\n");
286 - return 1;
287 - }
288 int c;
289 int ret;
290 int pid;
291 + struct stat st;
292
293 opterr = 0;
294 progname = basename(argv[0]);
295
296 - while ((c = getopt(argc, argv, "i:kdbk")) != -1)
297 + while ((c = getopt(argc, argv, "i:s:kdbk")) != -1)
298 switch (c)
299 {
300 case 'i':
301 @@ -91,6 +92,9 @@ int main(int argc, char *argv[])
302 case 'b':
303 g_daemon = 1;
304 break;
305 + case 's':
306 + g_script = optarg;
307 + break;
308 case 'h':
309 do_help(stdout);
310 return 1;
311 @@ -112,6 +116,27 @@ int main(int argc, char *argv[])
312 "ERROR: You do not possess sufficient privileges to perform this action.\n");
313 return 1;
314 }
315 +
316 + // check the script file
317 + if (g_script) {
318 + if (stat (g_script, &st) != 0) {
319 + fprintf(stderr,
320 + "ERROR: Script '%s' is not accessible.\n", g_script);
321 + return 1;
322 + }
323 +
324 + if (st.st_uid != 0) {
325 + fprintf(stderr,
326 + "ERROR: Script '%s' not owned by root.\n", g_script);
327 + return 1;
328 + }
329 +
330 + if ((st.st_mode & S_IXUSR) == 0) {
331 + fprintf(stderr,
332 + "ERROR: Script '%s' is not executable.\n", g_script);
333 + return 1;
334 + }
335 + }
336
337 pid = IsDaemonRunning();
338 if (g_kill) {
339 diff --git a/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_services.c b/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_services.c
340 index 4f15620..27d35e4 100644
341 --- a/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_services.c
342 +++ b/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_services.c
343 @@ -56,6 +56,7 @@
344
345 int linkup_redundant = 0;
346 char * g_ifacename = NULL;
347 +char * g_script = NULL;
348
349 #define TRACE(x, y, z, ...)
350
351 @@ -284,7 +285,7 @@ UINT32 OSAL_RenewIP( UINT32 mediaStatus )
352
353 void *ManageIPThread(void *param)
354 {
355 -#define DHCP_RENEW_FILE_NAME "dhcp_renew.sh"
356 +#define DEFAULT_DHCP_RENEW_FILE_NAME "dhcp_renew.sh"
357
358 char file_name[MAX_FILENAME_LEN + 10]; // 10 more chacters to add interface name
359 int len = 0;
360 @@ -294,14 +295,20 @@ void *ManageIPThread(void *param)
361
362 OSALTRACE(OSAL_ERROR, ("Enter"));
363
364 - strcpy(file_name, PKG_DATA_DIR);
365 - len = strlen(file_name);
366 -
367 - if(file_name[len-1] != '/') {
368 - strcat(file_name,"/");
369 - }
370 -
371 - strcat(file_name, DHCP_RENEW_FILE_NAME);
372 + if (g_script == NULL)
373 + {
374 + strcpy(file_name, PKG_DATA_DIR);
375 + len = strlen(file_name);
376 +
377 + if(file_name[len-1] != '/')
378 + strcat(file_name,"/");
379 +
380 + strcat(file_name, DEFAULT_DHCP_RENEW_FILE_NAME);
381 + }
382 + else
383 + {
384 + strcpy(file_name, g_script);
385 + }
386
387 interface_name[0] = '\0';
388
389 --
390 1.7.4.1
391
392
393
394
395 1.1 net-wireless/wimax/files/updates/0001-wimax-network-service-64-bit-fixes.patch
396
397 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0001-wimax-network-service-64-bit-fixes.patch?rev=1.1&view=markup
398 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0001-wimax-network-service-64-bit-fixes.patch?rev=1.1&content-type=text/plain
399
400 Index: 0001-wimax-network-service-64-bit-fixes.patch
401 ===================================================================
402 From 6435becb440cd66098adf9424f99a5099935bbea Mon Sep 17 00:00:00 2001
403 From: Paul Donohue <wimax@××××××.com>
404 Date: Tue, 5 Oct 2010 11:38:52 -0700
405 Subject: [PATCH 01/20] wimax-network-service: 64-bit fixes
406
407 Correct assorted 64-bit issues.
408
409 Signed-off-by: Paul Donohue <wimax@××××××.com>
410 ---
411 .../Common/L4Common/SourceControl/BitmanCommon.h | 4 ++++
412 .../Common/L4Common/SourceControl/CommonTypes.h | 2 ++
413 .../OSAgnostic/Common/L5Common/L5CommonUtils.c | 2 +-
414 .../Product/AppSrvInfra/L5SocketsDispatcher.c | 7 ++++---
415 .../Linux/OSAL/Primitives/wimax_osal_basictypes.h | 3 ++-
416 5 files changed, 13 insertions(+), 5 deletions(-)
417
418 diff --git a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
419 index bdb48dc..874df35 100644
420 --- a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
421 +++ b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/BitmanCommon.h
422 @@ -67,6 +67,10 @@
423 #define MASK_1 (0xFFFFFFFFFFFFFFFF)
424 #define MASK_2 (0xFFFFFFFFFFFFFFFE)
425 #define MASK_4 (0xFFFFFFFFFFFFFFFC)
426 +#elif __x86_64__
427 +#define MASK_1 (0xFFFFFFFFFFFFFFFF)
428 +#define MASK_2 (0xFFFFFFFFFFFFFFFE)
429 +#define MASK_4 (0xFFFFFFFFFFFFFFFC)
430 #else
431 #define MASK_1 (0xFFFFFFFF)
432 #define MASK_2 (0xFFFFFFFE)
433 diff --git a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/CommonTypes.h b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/CommonTypes.h
434 index b410c38..f8aba19 100644
435 --- a/InfraStack/OSAgnostic/Common/L4Common/SourceControl/CommonTypes.h
436 +++ b/InfraStack/OSAgnostic/Common/L4Common/SourceControl/CommonTypes.h
437 @@ -91,6 +91,8 @@ typedef const char* PCSTR;
438 /// when you need to hold both a pointer and a number
439 #ifdef WIN64
440 typedef UINT64 POINTER_AND_UINT;
441 +#elif __x86_64__
442 +typedef UINT64 POINTER_AND_UINT;
443 #else
444 typedef UINT POINTER_AND_UINT;
445 #endif
446 diff --git a/InfraStack/OSAgnostic/Common/L5Common/L5CommonUtils.c b/InfraStack/OSAgnostic/Common/L5Common/L5CommonUtils.c
447 index 840a89c..229a2e1 100644
448 --- a/InfraStack/OSAgnostic/Common/L5Common/L5CommonUtils.c
449 +++ b/InfraStack/OSAgnostic/Common/L5Common/L5CommonUtils.c
450 @@ -182,7 +182,7 @@ L5_RESULT L5_COMMON_UTILS_SendControlMessage(
451
452 result = l5_common_utils_ActuallySendMessage( Socket, pMessage );
453
454 - TRACE(TR_MOD_SERVICE, TR_SEV_NOTICE, "Result of ActuallySendMessage is %d %d", result);
455 + TRACE(TR_MOD_SERVICE, TR_SEV_NOTICE, "Result of ActuallySendMessage is %d", result);
456
457 return result;
458 }
459 diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
460 index aa3a58c..33618cc 100644
461 --- a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
462 +++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
463 @@ -61,7 +61,8 @@ typedef struct
464 L5_CONNECTION L5Conn; // Can be NULL before handshake
465
466 // Is this an active slot?
467 - BOOL bActive;
468 + // Updated using OSAL_atomic_exchange, so this must be a LONG not a BOOL
469 + LONG bActive;
470
471 // Connections from both sides
472 SOCKETS_CLIENT_ID Socket;
473 @@ -702,7 +703,7 @@ void l5_sockets_dispatcher_HandleNewConnection( SOCKETS_CLIENT_ID Socket, void**
474 // XXX SEH error handling
475 OSAL_init_critical_section( &(pConn->csSendReceive) );
476 OSAL_init_critical_section( &(pConn->csHandlingRequest) );
477 - OSAL_atomic_exchange( (LPLONG)&(pConn->bActive), TRUE );
478 + OSAL_atomic_exchange( &(pConn->bActive), TRUE );
479
480 *context = pConn;
481
482 @@ -1034,7 +1035,7 @@ void l5_sockets_dispatcher_DisconnectClient( tL5SocketsDispatcherConnection *pCo
483 L5_DISPATCHER_Disconnect( pConn->L5Conn );
484 }
485
486 - OSAL_atomic_exchange( (LPLONG)&(pConn->bActive), FALSE );
487 + OSAL_atomic_exchange( &(pConn->bActive), FALSE );
488
489 OSAL_exit_critical_section( &(pConn->csHandlingRequest) );
490 OSAL_delete_critical_section(&pConn->csSendReceive);
491 diff --git a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_basictypes.h b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_basictypes.h
492 index 1085c4b..f13fade 100644
493 --- a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_basictypes.h
494 +++ b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_basictypes.h
495 @@ -39,6 +39,7 @@
496 #include <string.h>
497 #include <ctype.h>
498 #include <sys/stat.h>
499 +#include <pthread.h>
500
501 #if 0
502 #include <sys/socket.h>
503 @@ -90,7 +91,7 @@ typedef void* OSAL_critical_section;
504
505 typedef int pid_t;
506
507 -typedef int OSAL_thread_t;
508 +typedef pthread_t OSAL_thread_t;
509
510 typedef void * OSAL_event_t;
511
512 --
513 1.7.4.1
514
515
516
517
518 1.1 net-wireless/wimax/files/updates/0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch
519
520 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch?rev=1.1&view=markup
521 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch?rev=1.1&content-type=text/plain
522
523 Index: 0003-Fix-pthread_mutex_unlock-duplicate-call-in-OSALTrace.patch
524 ===================================================================
525 From 3bf826a20047b1d5071369ec0b8bdbc4efe30a22 Mon Sep 17 00:00:00 2001
526 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
527 Date: Tue, 5 Oct 2010 15:55:33 -0700
528 Subject: [PATCH 03/20] Fix pthread_mutex_unlock duplicate call in OSALTrace()
529
530 Fix pthread_mutex_unlock duplicate call in OSALTrace(), i.e. second
531 pthread_mutex_unlock() called against already unlocked mutex. glibc
532 tolerant to this inconsistency, but uClibc not.
533
534 Signed-off-by: Leonid Lisovskiy <lly.dev@×××××.com>
535 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
536 ---
537 .../Linux/OSAL/Primitives/wimax_osal_trace.c | 24 ++++++++-----------
538 1 files changed, 10 insertions(+), 14 deletions(-)
539
540 diff --git a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
541 index 6ced165..cbdd24f 100644
542 --- a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
543 +++ b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
544 @@ -53,7 +53,7 @@ int g_iloglevel = 2;
545 int g_iloglevelreadflag = 0;
546
547 // to avoid multi tread environment to log the thread
548 -pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
549 +static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
550
551 /*
552 *
553 @@ -97,23 +97,19 @@ pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
554
555 void OSALTrace(char *szformat, ...)
556 {
557 - time_t currTime;
558 - struct tm timeinfo;
559 -
560 // log type should be 0 to 4 default value will assign info
561 if (g_OsalTraceInfo.loglevel > g_iloglevel
562 || g_OsalTraceInfo.loglevel < 0) {
563 - // release the lock if get any errors
564 - pthread_mutex_unlock(&g_mutex);
565 - return;
566 + goto out;
567 }
568 // if argument path null....
569 if (szformat == NULL) {
570 - // release the lock if get any errors
571 - pthread_mutex_unlock(&g_mutex);
572 - return;
573 + goto out;
574 }
575
576 + time_t currTime;
577 + struct tm timeinfo;
578 +
579 va_list args;
580 static char Buffer[EGIHT_X_BUFFER] = { 0 };
581 static char outBuffer[EGIHT_X_BUFFER] = { 0 };
582 @@ -137,6 +133,10 @@ void OSALTrace(char *szformat, ...)
583 sprintf(outBuffer, "%s\n", Buffer);
584
585 osallog(outBuffer, 1);
586 +
587 +out:
588 + // release the lock once done
589 + pthread_mutex_unlock(&g_mutex);
590 }
591
592 /*
593 @@ -167,8 +167,6 @@ void osallog(char *ch, int flush)
594 log = fopen(OSALTRACE_FILE, "wt");
595 if (!log) {
596 syslog(LOG_ERR, "wimaxd[osal] - can not open logfile (%s) for writing.\n", OSALTRACE_FILE);
597 - // release the lock if get any errors
598 - pthread_mutex_unlock(&g_mutex);
599 return; // bail out if we can't log
600 }
601 }
602 @@ -182,8 +180,6 @@ void osallog(char *ch, int flush)
603 #ifdef OSAL_CONSOLE
604 printf(ch);
605 #endif
606 - // release the lock once done with log
607 - pthread_mutex_unlock(&g_mutex);
608
609 // fclose(log);
610 }
611 --
612 1.7.4.1
613
614
615
616
617 1.1 net-wireless/wimax/files/updates/0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch
618
619 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch?rev=1.1&view=markup
620 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch?rev=1.1&content-type=text/plain
621
622 Index: 0017-L4_INTEL_80216_INDICATION-typedef-redefinition.patch
623 ===================================================================
624 From 648897ebad3718ed52432fa39c8de80b30d7c1d9 Mon Sep 17 00:00:00 2001
625 From: Doug Kehn <rdkehn@×××××.com>
626 Date: Wed, 26 Jan 2011 14:29:14 -0800
627 Subject: [PATCH 17/20] L4_INTEL_80216_INDICATION typedef redefinition
628
629 The variable holding L3_L4_OPCODE_* value undergoes various typecasting
630 changes as it moves along the call stack. The end result, on big-endian
631 machines, is that the variable holding the opcode (indication_id) will
632 always equal 0. Changing the typedef from UINT16 to UINT32 resolves
633 this problem.
634
635 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
636 ---
637 .../OSAgnostic/Product/AppSrvInfra/L4MsgProxy.h | 2 +-
638 1 files changed, 1 insertions(+), 1 deletions(-)
639
640 diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.h b/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.h
641 index 5f8753e..178d319 100644
642 --- a/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.h
643 +++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.h
644 @@ -57,7 +57,7 @@ extern L5_CONNECTION l4Proxy_Connection;
645 extern tL5DispatcherFunctions *l4Proxy_pFuncs;
646
647
648 -typedef UINT16 L4_INTEL_80216_INDICATION;
649 +typedef UINT32 L4_INTEL_80216_INDICATION;
650
651
652 // AppSrv Agent Interface:
653 --
654 1.7.4.1
655
656
657
658
659 1.1 net-wireless/wimax/files/updates/0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch
660
661 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch?rev=1.1&view=markup
662 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch?rev=1.1&content-type=text/plain
663
664 Index: 0007-supplicant-fix-invocation-of-eap_peer_sm_init.patch
665 ===================================================================
666 From fc06cfd00b80e54fb178ffae51050675f42501b9 Mon Sep 17 00:00:00 2001
667 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
668 Date: Tue, 23 Nov 2010 15:55:37 -0800
669 Subject: [PATCH 07/20] supplicant: fix invocation of eap_peer_sm_init()
670
671 Fourth argument was being pass with wrong typing (and luckily it is
672 not really being used, so it wasn't pulling garbage). Fixed by
673 creating a null 'struct eap_config' that is passed to
674 eap_peer_sm_init().
675
676 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
677 ---
678 .../Agents/Supplicant/Source/SupplicantAgent.c | 8 +++++++-
679 1 files changed, 7 insertions(+), 1 deletions(-)
680
681 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
682 index 3948615..742c57b 100644
683 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
684 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
685 @@ -466,6 +466,12 @@ wmx_Status_t InitSupplicantLibrary(VOID)
686 char answer[MAX_ANSWER_SIZE];
687 void *ft;
688 #endif
689 + struct eap_config eap_config_null = {
690 + .opensc_engine_path = NULL,
691 + .pkcs11_engine_path = NULL,
692 + .pkcs11_module_path = NULL,
693 + .wps = NULL,
694 + };
695
696 TRACE(TR_MOD_SUPPLICANT_AGENT, TR_SEV_INFO,"Supplicant: InitSupplicantLibrary (IN)");
697 // init DS status variable
698 @@ -496,7 +502,7 @@ wmx_Status_t InitSupplicantLibrary(VOID)
699 eap_cb.notify_pending = peer_notify_pending;
700
701 eap_peer_register_methods();
702 - eap_ctx.eap = eap_peer_sm_init(&eap_ctx, &eap_cb, &eap_ctx, &eap_ctx.eap_config);
703 + eap_ctx.eap = eap_peer_sm_init(&eap_ctx, &eap_cb, &eap_ctx, &eap_config_null);
704 if (eap_ctx.eap == NULL)
705 return WMX_ST_FAIL;
706
707 --
708 1.7.4.1
709
710
711
712
713 1.1 net-wireless/wimax/files/updates/0018-L5Common-Big-endian-support.patch
714
715 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0018-L5Common-Big-endian-support.patch?rev=1.1&view=markup
716 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0018-L5Common-Big-endian-support.patch?rev=1.1&content-type=text/plain
717
718 Index: 0018-L5Common-Big-endian-support.patch
719 ===================================================================
720 From 0a065f6386b285e211dcc0444847469cba9071ef Mon Sep 17 00:00:00 2001
721 From: Doug Kehn <rdkehn@×××××.com>
722 Date: Wed, 26 Jan 2011 14:30:11 -0800
723 Subject: [PATCH 18/20] L5Common: Big-endian support
724
725 Add byte swap calls where needed.
726
727 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
728 ---
729 .../Common/L5Common/IndicatorsSubscribers.c | 5 +++--
730 .../OSAgnostic/Product/PipeHandler/Makefile.am | 7 +++++--
731 .../OSAgnostic/Product/PipeHandler/Makefile.in | 6 +++++-
732 3 files changed, 13 insertions(+), 5 deletions(-)
733
734 diff --git a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
735 index 97e7b8e..f920509 100644
736 --- a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
737 +++ b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
738 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
739 ***************************************************************************/
740 #include <unistd.h>
741 #include <stdlib.h>
742 +#include <wimaxll.h>
743 #include "IndicatorsSubscribers.h"
744
745 #include "CommonServices.h"
746 @@ -197,8 +198,8 @@ EXPORT void SendIndicationToSubscribers( UINT32 internalRequestID, void *_buffer
747 {
748 //in case we are working with remote DnD, we want to send the trace and monitor indications
749 //only to the DnD agent
750 - if(((L3_L4_OPCODE_REPORT_MONITOR_EVACUATE != *((UINT16 *)buffer->indication_buffer)) &&
751 - (L3_L4_OPCODE_REPORT_TRACE_EVACUATE != *((UINT16 *)buffer->indication_buffer))) ||
752 + if(((L3_L4_OPCODE_REPORT_MONITOR_EVACUATE != wimaxll_le16_to_cpu(*((UINT16 *)buffer->indication_buffer))) &&
753 + (L3_L4_OPCODE_REPORT_TRACE_EVACUATE != wimaxll_le16_to_cpu(*((UINT16 *)buffer->indication_buffer)))) ||
754 (L5_TARGET_DND_AGENT == targetID))
755 {
756 TRACE(TR_MOD_WRAPPER_LOGS, TR_SEV_DEBUG,"SendIndicationToSubscribers - senderL5Conn=0x%x, targetID=%d, internalRequestID=%d",
757 diff --git a/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.am b/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.am
758 index ea69a28..5969a48 100644
759 --- a/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.am
760 +++ b/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.am
761 @@ -56,10 +56,13 @@ libPipeHandler_la_CFLAGS = -I "$(top_srcdir)/InfraStack/OSAgnostic/Common/Commo
762 -I "$(top_srcdir)/InfraStack/OSDependent/Linux/InfraStackModules/TraceModule/" \
763 -D _GNU_SOURCE \
764 -D "L5_USE_CLIENT_SOCKETS" -D "_USE_TRACE" \
765 + @LIBWIMAX_CFLAGS@ \
766 -D "BMI_MACHINE_ENDIANNESS_LITTLE" -D "_LINUX"
767
768 -libPipeHandler_la_LIBADD = $(top_builddir)/InfraStack/OSDependent/Linux/InfraStackModules/IPCs/libSockets.la
769 +libPipeHandler_la_LIBADD = \
770 + $(top_builddir)/InfraStack/OSDependent/Linux/InfraStackModules/IPCs/libSockets.la \
771 + @LIBWIMAX_LIBS@
772 +
773
774 -
775
776
777 diff --git a/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.in b/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.in
778 index c35402c..f3571a7 100644
779 --- a/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.in
780 +++ b/InfraStack/OSAgnostic/Product/PipeHandler/Makefile.in
781 @@ -260,9 +260,13 @@ libPipeHandler_la_CFLAGS = -I "$(top_srcdir)/InfraStack/OSAgnostic/Common/Common
782 -I "$(top_srcdir)/InfraStack/OSDependent/Linux/InfraStackModules/TraceModule/" \
783 -D _GNU_SOURCE \
784 -D "L5_USE_CLIENT_SOCKETS" -D "_USE_TRACE" \
785 + @LIBWIMAX_CFLAGS@ \
786 -D "BMI_MACHINE_ENDIANNESS_LITTLE" -D "_LINUX"
787
788 -libPipeHandler_la_LIBADD = $(top_builddir)/InfraStack/OSDependent/Linux/InfraStackModules/IPCs/libSockets.la
789 +libPipeHandler_la_LIBADD = \
790 + $(top_builddir)/InfraStack/OSDependent/Linux/InfraStackModules/IPCs/libSockets.la \
791 + @LIBWIMAX_LIBS@
792 +
793 all: all-am
794
795 .SUFFIXES:
796 --
797 1.7.4.1
798
799
800
801
802 1.1 net-wireless/wimax/files/updates/0014-KDapi-Big-endian-support.patch
803
804 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0014-KDapi-Big-endian-support.patch?rev=1.1&view=markup
805 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0014-KDapi-Big-endian-support.patch?rev=1.1&content-type=text/plain
806
807 Index: 0014-KDapi-Big-endian-support.patch
808 ===================================================================
809 From baecb142a4f57faee480e5622ad45b17c154469c Mon Sep 17 00:00:00 2001
810 From: Doug Kehn <rdkehn@×××××.com>
811 Date: Wed, 26 Jan 2011 14:26:05 -0800
812 Subject: [PATCH 14/20] KDapi: Big-endian support
813
814 Add byte swap calls where needed.
815
816 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
817 ---
818 .../Linux/InfraStackModules/KDapi/KDapi.c | 88 ++++++++++----------
819 1 files changed, 44 insertions(+), 44 deletions(-)
820
821 diff --git a/InfraStack/OSDependent/Linux/InfraStackModules/KDapi/KDapi.c b/InfraStack/OSDependent/Linux/InfraStackModules/KDapi/KDapi.c
822 index 27c8abc..6db2e11 100644
823 --- a/InfraStack/OSDependent/Linux/InfraStackModules/KDapi/KDapi.c
824 +++ b/InfraStack/OSDependent/Linux/InfraStackModules/KDapi/KDapi.c
825 @@ -58,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
826 #include "KDapiForLinuxNlsock.h"
827 #include "L4BufMan_L3L4Structs_Desc.h"
828 #include "L4BufMan_L3L4Structs.h"
829 +#include "Services_Ctrl.h"
830
831 #define MAX_DATA_SIZE_SET_NORMAL 100
832
833 @@ -264,12 +265,12 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
834 // the flag so that next LINK_UP is accepted for dhcp req
835 // This will be useful in fast reconnect scenario where firmware is
836 // failing to send LINK_DOWN before sending a LINK_UP
837 - if(wmx_in_buffer->type == L4_L3_OPCODE_CMD_CONNECT)
838 + if(wmx_in_buffer->type == wimaxll_cpu_to_le16(L4_L3_OPCODE_CMD_CONNECT))
839 {
840 linkup_redundant = 0;
841 }
842
843 - if (*((UINT16 *) pInBuffer) == 0x4604) // enable raw logging during connect
844 + if (*((UINT16 *) pInBuffer) == wimaxll_cpu_to_le16(0x4604)) // enable raw logging during connect
845 {
846 bEnableRawTracing = 1;
847 //g_Connected = 0;
848 @@ -281,7 +282,7 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
849
850
851
852 - if ((bEnableRawTracing) || (*((UINT16 *) pInBuffer) == 0x6201)) {
853 + if ((bEnableRawTracing) || (*((UINT16 *) pInBuffer) == wimaxll_cpu_to_le16(0x6201))) {
854 #ifdef _DEBUG1
855 if (inBufSize == 2088) {
856 // Probe to check if the device has already rebooted before sending this large packet down
857 @@ -289,7 +290,7 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
858 inBufSize = sizeof(GET_STATE_L4L3_MSG);
859 }
860 #endif
861 - if (*((UINT16 *) pInBuffer) == 0x6201)
862 + if (*((UINT16 *) pInBuffer) == wimaxll_cpu_to_le16(0x6201))
863 DumpHexString("Gatekeeper (TLS Out): ", pInBuffer, inBufSize);
864 else {
865 DumpHexString("Gatekeeper (out) : ", pInBuffer, inBufSize);
866 @@ -328,22 +329,23 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
867 if (send_rcv_msg->type != *(unsigned short *)pInBuffer) {
868 TRACE(TR_MOD_KDAPI, TR_SEV_ERR,
869 "Incorrect response recieved %x expected %x\n",
870 - send_rcv_msg->type, *(unsigned short *)pInBuffer);
871 + wimaxll_le16_to_cpu(send_rcv_msg->type),
872 + wimaxll_le16_to_cpu(*(unsigned short *)pInBuffer));
873 printk("Incorrect response recieved %x expected %x\n",
874 - send_rcv_msg->type,
875 - *(unsigned short *)pInBuffer);
876 + wimaxll_le16_to_cpu(send_rcv_msg->type),
877 + wimaxll_le16_to_cpu(*(unsigned short *)pInBuffer));
878 free(send_rcv_msg);
879 send_rcv_msg = NULL;
880 goto error_msg_send_command;
881 }
882 memcpy(pOutBuffer, send_rcv_msg, rcv_msg_size);
883 *pWrittenOutBufSize = rcv_msg_size;
884 - printk("Response recieved: size(%d) status(%x)\n", rcv_msg_size, send_rcv_msg->status);
885 + printk("Response recieved: size(%d) status(%x)\n", rcv_msg_size, wimaxll_le16_to_cpu(send_rcv_msg->status));
886
887 #ifndef DEBUG_DEVELOPER
888 if(g_enable_driver_msg == TRUE) {
889 printf("<<< [RSP 0x%x][%d]\n", Command, rcv_msg_size);
890 - print_hex(send_rcv_msg, rcv_msg_size);
891 + print_hex((unsigned char *)send_rcv_msg, rcv_msg_size);
892 }
893 #endif
894 // free the memory allocated by send_msg_response_to_l4
895 @@ -351,13 +353,13 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
896 send_rcv_msg = NULL;
897
898 if (bEnableRawTracing) {
899 - if (*((UINT16 *) pInBuffer) == 0x6201)
900 + if (*((UINT16 *) pInBuffer) == wimaxll_cpu_to_le16(0x6201))
901 DumpHexString("Gatekeeper (TLS IN): ", pOutBuffer, rcv_msg_size);
902 else
903 DumpHexString("Gatekeeper (in): ", pOutBuffer, rcv_msg_size);
904 }
905 // #if 1
906 -// if ( *((UINT16 *)pInBuffer) == 0xd002 )
907 +// if ( *((UINT16 *)pInBuffer) == wimaxll_cpu_to_le16(0xd002) )
908 // {
909 // UINT16 *pTmp = pInBuffer;
910
911 @@ -367,7 +369,7 @@ static int send_recieve_message_to_driver(IN UINT32 Command,
912 // }
913 // #endif // 1
914 #ifdef INTERNAL_SUPPLICANT_DONT_SEND_KEY_SECONDTIME_IF_ALREADY_CONNECTED
915 - if (*((UINT16 *) pInBuffer) == 0xd002) {
916 + if (*((UINT16 *) pInBuffer) == wimaxll_cpu_to_le16(0xd002)) {
917 UINT16 *pTmp = pInBuffer;
918 // Set the global system state
919 if (*(pTmp + 12) == 8) {
920 @@ -407,8 +409,8 @@ static int get_L4M_version()
921 UINT32 tempByteWritten = 30;
922
923 memset(&cmd, 0, sizeof(cmd));
924 - cmd.type = I2400M_MT_GET_LM_VERSION;
925 - cmd.version = I2400M_L3L4_VERSION;
926 + cmd.type = wimaxll_cpu_to_le16(I2400M_MT_GET_LM_VERSION);
927 + cmd.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
928
929 res =
930 send_recieve_message_to_driver(0, &cmd, sizeof(cmd), response_from_driver,
931 @@ -515,7 +517,7 @@ static KDAPI_RESULT KDAPI_send_io_control(IN void *pInBuffer,
932
933 //printk("*");
934
935 - type = *(unsigned short *)pInBuffer;
936 + type = wimaxll_le16_to_cpu(*(unsigned short *)pInBuffer);
937 printk("KK Ioctl Sending L4 Message type %d\n", type);
938
939 TRACE(TR_MOD_KDAPI, TR_SEV_DEBUG, "Sending DeviceIoControl with ioctl");
940 @@ -550,14 +552,14 @@ static KDAPI_RESULT KDAPI_send_io_control(IN void *pInBuffer,
941 #endif
942
943 /*
944 - if(header->Opcode == L4_L3_OPCODE_SET_SCAN_PARAM)
945 + if(header->Opcode == wimaxll_cpu_to_le16(L4_L3_OPCODE_SET_SCAN_PARAM))
946 {
947 //memset((char *)pInBuffer + 28, 0xff, 16);
948 }
949 */
950
951 ioctlRes =
952 - send_recieve_message_to_driver(*(unsigned short *)pInBuffer, pInBuffer,
953 + send_recieve_message_to_driver(wimaxll_le16_to_cpu(*(unsigned short *)pInBuffer), pInBuffer,
954 inBufSize, pOutBuffer, &BytesWritten);
955 if (ioctlRes != 0) {
956 TRACE(TR_MOD_KDAPI, TR_SEV_ERR,
957 @@ -602,14 +604,14 @@ static int set_device_mode_to_normal()
958 }
959 //assemble radio-on message
960 //setup header
961 - header.Opcode = L4_L3_OPCODE_CMD_MODE_OF_OPERATION; //setup message type
962 - header.Length = sizeof(struct ModeOfOperationCommand); //setup message length. rest of the fields are irrelevant
963 + header.Opcode = wimaxll_cpu_to_le16(L4_L3_OPCODE_CMD_MODE_OF_OPERATION); //setup message type
964 + header.Length = wimaxll_cpu_to_le16(sizeof(struct ModeOfOperationCommand)); //setup message length. rest of the fields are irrelevant
965 memcpy(message, (char *)&header, sizeof(header));
966
967 //setup message body
968 - modeCommand.type = L3L4_TLV_TYPE_MODE_OF_OPERATION; //setup rf operatig_wmx_handleon TLV type
969 - modeCommand.length = sizeof(struct RfControl) - 4; //setup rf operation TLV length
970 - modeCommand.modeCommand = E_MODE_OF_OPERATION_NORMAL; //setup rf operation to ON
971 + modeCommand.type = wimaxll_cpu_to_le16(L3L4_TLV_TYPE_MODE_OF_OPERATION); //setup rf operatig_wmx_handleon TLV type
972 + modeCommand.length = wimaxll_cpu_to_le16(sizeof(struct RfControl) - 4); //setup rf operation TLV length
973 + modeCommand.modeCommand = wimaxll_cpu_to_le32(E_MODE_OF_OPERATION_NORMAL); //setup rf operation to ON
974 memcpy(message + sizeof(header), (char *)&modeCommand,
975 sizeof(modeCommand));
976
977 @@ -626,8 +628,8 @@ static int set_device_mode_to_normal()
978
979 free(message);
980 header = *(struct L3L4Header *)retMsg;
981 - if ((header.Status != L3L4_RESPONSE_STATUS_SUCCESS_DONE)
982 - && (header.Status != L3L4_RESPONSE_STATUS_SUCCESS_IN_PROCESS)) {
983 + if ((header.Status != wimaxll_cpu_to_le16(L3L4_RESPONSE_STATUS_SUCCESS_DONE))
984 + && (header.Status != wimaxll_cpu_to_le16(L3L4_RESPONSE_STATUS_SUCCESS_IN_PROCESS))) {
985 retStatus = 0;
986 printk
987 ("Got status response other than SUCCESS_DONE or SUCCESS_IN_PROCESS\n");
988 @@ -649,8 +651,8 @@ static void prepare_nl_iface()
989
990 /* open command: Send a raw request */
991 memset(&cmd, 0, sizeof(cmd));
992 - cmd.type = (I2400M_MT_OPEN);
993 - cmd.version = (I2400M_L3L4_VERSION);
994 + cmd.type = wimaxll_cpu_to_le16(I2400M_MT_OPEN);
995 + cmd.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
996 result = wimaxll_msg_write(g_wmx_write_handle,NULL ,&cmd, sizeof(cmd));
997 if (result < 0) {
998 printk(stderr, "E: libwimax: can't send open message: %d\n",
999 @@ -661,7 +663,7 @@ static void prepare_nl_iface()
1000 /* open command: get the ack */
1001 result = wimax_msg_read(g_wmx_read_handle, (void **)&ack);
1002
1003 - if ((ack->type) != I2400M_MT_OPEN) {
1004 + if (wimaxll_le16_to_cpu(ack->type) != I2400M_MT_OPEN) {
1005 printk(stderr,
1006 "E: libwimax: wrong reply 0x%04x to OPEN command\n",
1007 (ack->type));
1008 @@ -687,8 +689,8 @@ static int get_L4M_version_no_thread()
1009 /* get l4m version: Send a raw request */
1010 printk("get l4m version: Send a raw request \n");
1011 memset(&cmd, 0, sizeof(cmd));
1012 - cmd.type = I2400M_MT_GET_LM_VERSION;
1013 - cmd.version = I2400M_L3L4_VERSION;
1014 + cmd.type = wimaxll_cpu_to_le16(I2400M_MT_GET_LM_VERSION);
1015 + cmd.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
1016
1017 CHECK_NL_HANDLE();
1018
1019 @@ -711,7 +713,7 @@ static int get_L4M_version_no_thread()
1020 "Error wimax read messsage: %d\n", result);
1021 return -1;
1022 }
1023 - if ((ack->type) == I2400M_MT_GET_LM_VERSION) {
1024 + if (wimaxll_le16_to_cpu(ack->type) == I2400M_MT_GET_LM_VERSION) {
1025 printk
1026 ("Nlsock: correct reply 0x%04x to get l4m version command\n",
1027 (ack->type));
1028 @@ -789,8 +791,8 @@ use_EL3RST:
1029 * get a -EL3RST back.
1030 */
1031 memset(&cmd, 0, sizeof(cmd));
1032 - cmd.type = L4_L3_OPCODE_GET_STATE;
1033 - cmd.version = I2400M_L3L4_VERSION;
1034 + cmd.type = wimaxll_cpu_to_le16(L4_L3_OPCODE_GET_STATE);
1035 + cmd.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
1036
1037 retry_count = 10;
1038 while(--retry_count) {
1039 @@ -839,8 +841,8 @@ static int init_device()
1040
1041 /* init device: Send a raw request */
1042 memset(&cmd, 0, sizeof(cmd));
1043 - cmd.type = (L4_L3_OPCODE_CMD_INIT);
1044 - cmd.version = (I2400M_L3L4_VERSION);
1045 + cmd.type = wimaxll_cpu_to_le16(L4_L3_OPCODE_CMD_INIT);
1046 + cmd.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
1047
1048 CHECK_NL_HANDLE();
1049
1050 @@ -870,7 +872,7 @@ static int init_device()
1051 printk("Error wimax read message \n");
1052 }
1053
1054 - if ((ack->type) == L4_L3_OPCODE_CMD_INIT) {
1055 + if ((ack->type) == wimaxll_cpu_to_le16(L4_L3_OPCODE_CMD_INIT)) {
1056 wimaxll_msg_free(ack);
1057 break;
1058 }
1059 @@ -970,7 +972,7 @@ static int preinit_device()
1060 return -1;
1061 }
1062
1063 - if ((ack->type) == L4_L3_OPCODE_SET_PREINIT_CONFIG) {
1064 + if ((ack->type) == wimaxll_cpu_to_le16(L4_L3_OPCODE_SET_PREINIT_CONFIG)) {
1065 wimaxll_msg_free(ack);
1066 break;
1067 }
1068 @@ -1003,13 +1005,11 @@ static int stop_trace()
1069 /* stop trace: Send a raw request */
1070 printk("stop trace: Send a raw request \n");
1071 memset(&cmd, 0, sizeof(cmd));
1072 - // warning FIXME: need conversion to little endian
1073 - // Don't worry if we are running on X86 platform as X86 platform is already little endian
1074 - cmd.hdr.type = I2400M_MT_CMD_MONITOR_CONTROL;
1075 - cmd.hdr.length = sizeof(cmd) - sizeof(cmd.hdr);
1076 - cmd.hdr.version = I2400M_L3L4_VERSION;
1077 - cmd.tlv.type = 0x4002;
1078 - cmd.tlv.length = 1;
1079 + cmd.hdr.type = wimaxll_cpu_to_le16(I2400M_MT_CMD_MONITOR_CONTROL);
1080 + cmd.hdr.length = wimaxll_cpu_to_le16(sizeof(cmd) - sizeof(cmd.hdr));
1081 + cmd.hdr.version = wimaxll_cpu_to_le16(I2400M_L3L4_VERSION);
1082 + cmd.tlv.type = wimaxll_cpu_to_le16(0x4002);
1083 + cmd.tlv.length = wimaxll_cpu_to_le16(1);
1084 cmd.val = 1;
1085
1086 CHECK_NL_HANDLE();
1087 @@ -1187,7 +1187,7 @@ void send_msg_response_to_l4(const struct i2400m_l3l4_hdr *l3l4, size_t size)
1088 #else
1089 if(g_enable_driver_msg == TRUE) {
1090 printf("<<< [IND 0x%x][%d]\n", type, size);
1091 - print_hex(l3l4, size);
1092 + print_hex((unsigned char *)l3l4, size);
1093 }
1094 #endif
1095
1096 --
1097 1.7.4.1
1098
1099
1100
1101
1102 1.1 net-wireless/wimax/files/updates/0016-Wrappers-wmx_SystemStateUpdate-alignment.patch
1103
1104 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0016-Wrappers-wmx_SystemStateUpdate-alignment.patch?rev=1.1&view=markup
1105 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0016-Wrappers-wmx_SystemStateUpdate-alignment.patch?rev=1.1&content-type=text/plain
1106
1107 Index: 0016-Wrappers-wmx_SystemStateUpdate-alignment.patch
1108 ===================================================================
1109 From dc866f55d03daf36dc018418dee2f99cc330a284 Mon Sep 17 00:00:00 2001
1110 From: Doug Kehn <rdkehn@×××××.com>
1111 Date: Wed, 26 Jan 2011 14:27:44 -0800
1112 Subject: [PATCH 16/20] Wrappers: wmx_SystemStateUpdate alignment
1113
1114 Commented out dummyCompilerHappy[3] from wmx_SystemStateUpdate. This
1115 change resolved alignment problems on ARM XSCALE (big-endian) processor.
1116
1117 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
1118 ---
1119 .../WiMax/Wrappers/Include/wmxSDK_Nds_1.h | 2 +-
1120 1 files changed, 1 insertions(+), 1 deletions(-)
1121
1122 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1123 index 7fb5817..e7bd050 100644
1124 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1125 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1126 @@ -248,7 +248,7 @@ typedef struct _wmx_SystemStateUpdate
1127 wmx_LinkStatus_t linkStatus;
1128 wmx_MediaStatus_t MediaStatus;
1129 wmx_ChannedInfo_t channelInfo;
1130 - UINT8 dummyCompilerHappy[3];
1131 +// UINT8 dummyCompilerHappy[3];
1132 wmx_RfSwitchesStatus_t rfSwitchesStatus;
1133 } wmx_SystemStateUpdate, *wmx_pSystemStateUpdate;
1134
1135 --
1136 1.7.4.1
1137
1138
1139
1140
1141 1.1 net-wireless/wimax/files/updates/0002-cleanup-fix-struct-packing-and-type-casting-issues.patch
1142
1143 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0002-cleanup-fix-struct-packing-and-type-casting-issues.patch?rev=1.1&view=markup
1144 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0002-cleanup-fix-struct-packing-and-type-casting-issues.patch?rev=1.1&content-type=text/plain
1145
1146 Index: 0002-cleanup-fix-struct-packing-and-type-casting-issues.patch
1147 ===================================================================
1148 From bb496da3c393e415ae85917d66e3bf0610303c11 Mon Sep 17 00:00:00 2001
1149 From: Paul Donohue <wimax@××××××.com>
1150 Date: Tue, 5 Oct 2010 16:40:55 -0400
1151 Subject: [PATCH 02/20] cleanup: fix struct packing and type casting issues
1152
1153 cleanup: fix struct packing and type casting issues
1154
1155 Signed-off-by: Paul Donohue <wimax@××××××.com>
1156 ---
1157 .../Common/CommonServices/VersionUtils.h | 4 +++-
1158 .../Common/L5Common/IndicatorsSubscribers.c | 10 +++++-----
1159 InfraStack/OSAgnostic/Common/L5Common/L5Common.h | 1 +
1160 .../Product/AppSrvInfra/L5SocketsDispatcher.c | 2 +-
1161 .../WiMax/Agents/NDnS/APDO/NDnSAgent_APDO_CBs.c | 4 ++--
1162 .../WiMax/Agents/NDnS/Source/NDnSAgent_Internals.h | 4 ++--
1163 .../Agents/Supplicant/Source/SupplicantAgent.c | 2 +-
1164 .../Agents/Supplicant/Source/ds/driver_broadcom.h | 8 ++++----
1165 .../WiMax/Wrappers/Include/wmxSDK_Msc_2.h | 9 ++++++++-
1166 .../WiMax/Wrappers/Include/wmxSDK_Nds_1.h | 3 ++-
1167 .../WiMax/Wrappers/Include/wmxSDK_Nds_3.h | 6 ++++++
1168 .../WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h | 4 ++++
1169 .../OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Coex_1.c | 2 +-
1170 .../InfraStackModules/CommonAPIHeaders/WiMaxType.h | 4 +++-
1171 .../Linux/OSAL/Primitives/wimax_osal_linux_types.h | 2 +-
1172 .../Linux/OSAL/Primitives/wimax_osal_trace.c | 2 +-
1173 .../OSDependent/Linux/wimaxcu/wimaxcu_scan_op.c | 4 ++--
1174 17 files changed, 47 insertions(+), 24 deletions(-)
1175
1176 diff --git a/InfraStack/OSAgnostic/Common/CommonServices/VersionUtils.h b/InfraStack/OSAgnostic/Common/CommonServices/VersionUtils.h
1177 index 2b881eb..526f8f4 100644
1178 --- a/InfraStack/OSAgnostic/Common/CommonServices/VersionUtils.h
1179 +++ b/InfraStack/OSAgnostic/Common/CommonServices/VersionUtils.h
1180 @@ -51,6 +51,7 @@ typedef struct _wmx_Version_t
1181 UINT32 revision;
1182 UINT32 branch;
1183 } wmx_Version_t, *wmx_pVersion_t;
1184 +#pragma pack( pop )
1185
1186 typedef char* wmx_ModuleName_t;
1187 typedef char* wmx_pVersionStr_t;
1188 @@ -62,6 +63,7 @@ typedef struct _wmx_VersionEntry_t
1189 wmx_ModuleName_t moduleName;
1190 wmx_Version_t version;
1191 } wmx_VersionEntry_t, *wmx_pVersionEntry_t;
1192 +#pragma pack( pop )
1193
1194
1195 BOOL VersionUtils_Init();
1196 @@ -73,4 +75,4 @@ EXPORT void GetFullVersionString(char *str, wmx_Version_t version);
1197 EXTERN_C EXPORT VERSION_RESULT ValidateVersion(wmx_ModuleName_t moduleName, wmx_Version_t actualVersion, wmx_Version_t expectedVersion);
1198
1199
1200 -#endif // _VERSION_UTILS_H
1201 \ No newline at end of file
1202 +#endif // _VERSION_UTILS_H
1203 diff --git a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1204 index 41bb044..53559af 100644
1205 --- a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1206 +++ b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1207 @@ -153,7 +153,7 @@ EXPORT void SendIndicationToSubscribers( UINT32 internalRequestID, void *_buffer
1208 SendIndData *buffer = _buffer;
1209 ListItem* handle;
1210 L5_TARGET_ID targetID;
1211 - ULONG_PTR data;
1212 + L5_TARGET_ID data;
1213 L5_RESULT res;
1214 IndicatorSubscribers *indSubscribers;
1215 List tempList;
1216 @@ -174,12 +174,12 @@ EXPORT void SendIndicationToSubscribers( UINT32 internalRequestID, void *_buffer
1217 handle = CreateIterator(&(indSubscribers->subscribersList));
1218 // handle = Iterator_GetNext(&(indSubscribers->subscribersList), handle, (void**)&targetID);
1219 handle = Iterator_GetNext(&(indSubscribers->subscribersList), handle, (void**)(&data));
1220 - targetID = (int) data;
1221 + targetID = data;
1222 while (handle != NULL)
1223 {
1224 List_AddItem(&tempList, (void *)targetID);
1225 handle = Iterator_GetNext(&(indSubscribers->subscribersList), handle, (void**)(&data));
1226 - targetID = (int)data; ////
1227 + targetID = data; ////
1228
1229 // handle = Iterator_GetNext(&(indSubscribers->subscribersList), handle, (void**)&targetID);
1230 }
1231 @@ -189,7 +189,7 @@ EXPORT void SendIndicationToSubscribers( UINT32 internalRequestID, void *_buffer
1232 //iterate the temp list and send the targets indication:
1233 handle = CreateIterator(&tempList);
1234 handle = Iterator_GetNext(&tempList, handle, (void**)(&data));
1235 - targetID = (int) data;
1236 + targetID = data;
1237
1238 // handle = Iterator_GetNext(&tempList, handle, (void**)&targetID);
1239 while (handle != NULL)
1240 @@ -219,7 +219,7 @@ EXPORT void SendIndicationToSubscribers( UINT32 internalRequestID, void *_buffer
1241 // handle = Iterator_GetNext(&tempList, handle, (void**)&targetID);
1242
1243 handle = Iterator_GetNext(&tempList, handle, (void**)(&data));
1244 - targetID = (int) data;
1245 + targetID = data;
1246
1247
1248 // TODO - XXX - check L5_COMMON_UTILS_IsTargetNotExist
1249 diff --git a/InfraStack/OSAgnostic/Common/L5Common/L5Common.h b/InfraStack/OSAgnostic/Common/L5Common/L5Common.h
1250 index 037ccd5..6050052 100644
1251 --- a/InfraStack/OSAgnostic/Common/L5Common/L5Common.h
1252 +++ b/InfraStack/OSAgnostic/Common/L5Common/L5Common.h
1253 @@ -282,5 +282,6 @@ typedef struct _tL5DispatcherFunctions
1254 extern tL5DispatcherFunctions *GetL5Funcs();
1255 extern tUtilityFunctions *GetUtilsFuncs();
1256
1257 +#pragma pack(pop)
1258
1259 #endif
1260 diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
1261 index 33618cc..a7346a3 100644
1262 --- a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
1263 +++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5SocketsDispatcher.c
1264 @@ -61,7 +61,7 @@ typedef struct
1265 L5_CONNECTION L5Conn; // Can be NULL before handshake
1266
1267 // Is this an active slot?
1268 - // Updated using OSAL_atomic_exchange, so this must be a LONG not a BOOL
1269 + // Updated using OSAL_atomic_exchange(), so this must be a LONG not a BOOL
1270 LONG bActive;
1271
1272 // Connections from both sides
1273 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/APDO/NDnSAgent_APDO_CBs.c b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/APDO/NDnSAgent_APDO_CBs.c
1274 index 5e9fcbc..75d5786 100644
1275 --- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/APDO/NDnSAgent_APDO_CBs.c
1276 +++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/APDO/NDnSAgent_APDO_CBs.c
1277 @@ -487,8 +487,8 @@ void NDnSAgent_HandleApdoLinkStatus(wmx_ApdoLinkStatus_t linkStatus)
1278 lastConnectedStatus = Ndns_GetLastConnectedState();
1279
1280 // Check if the link status has changed
1281 - if (linkStatus == APDO_linkUp && lastConnectedStatus == FALSE ||
1282 - linkStatus == APDO_linkDown && lastConnectedStatus == TRUE)
1283 + if ((linkStatus == APDO_linkUp && lastConnectedStatus == FALSE) ||
1284 + (linkStatus == APDO_linkDown && lastConnectedStatus == TRUE))
1285 {
1286 return; // No change in the link status
1287 }
1288 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_Internals.h b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_Internals.h
1289 index e247d28..da7a344 100644
1290 --- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_Internals.h
1291 +++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_Internals.h
1292 @@ -200,8 +200,8 @@ typedef struct _wmx_NDnS_Context_t
1293 wmx_ConnectStatus_t connectStatus;
1294 int DummyForCompilerHappy3;
1295 TinyFSM_t fsm;
1296 - L4C_Task scheduledTask;
1297 - wmx_ScheduledTaskData_t scheduledTaskData;
1298 + LONG scheduledTask; // Updated using OSAL_atomic_exchange(), so this must be a LONG not an L4C_Task
1299 + wmx_ScheduledTaskData_t scheduledTaskData;
1300 wmx_Status_t scanStatus;
1301 wmx_LinkLossType_t linkLossType;
1302 wmx_ScanType_t currentScanType;
1303 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
1304 index 1eeae5b..3948615 100644
1305 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
1306 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/SupplicantAgent.c
1307 @@ -482,7 +482,7 @@ wmx_Status_t InitSupplicantLibrary(VOID)
1308 eap_ctx.eap_config.password_len = 8;
1309 eap_ctx.eap_config.ca_cert = (u8 *) os_strdup("ca.pem");
1310 eap_ctx.eap_config.fragment_size = TLS_MAX_SIZE;
1311 - eap_ctx.eap_config.eap_methods = eap_methods;
1312 + eap_ctx.eap_config.eap_methods = &eap_methods;
1313
1314 memset(&eap_cb, 0, sizeof(eap_cb));
1315 eap_cb.get_config = peer_get_config;
1316 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/ds/driver_broadcom.h b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/ds/driver_broadcom.h
1317 index 8973978..72f6384 100644
1318 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/ds/driver_broadcom.h
1319 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Source/ds/driver_broadcom.h
1320 @@ -20,15 +20,15 @@ typedef s8 int8;
1321 typedef unsigned char bool; /* consistent w/BOOL */
1322
1323 /* require default structure packing */
1324 -#if !defined(__GNUC__)
1325 -#pragma pack(push,8)
1326 -#endif
1327 +//#if !defined(__GNUC__)
1328 +//#pragma pack(push,8)
1329 +//#endif
1330
1331 /* enable structure packing */
1332 #if defined(__GNUC__)
1333 #define PACKED __attribute__((packed))
1334 #else
1335 -#pragma pack(1)
1336 +#pragma pack(push,1)
1337 #define PACKED
1338 #endif
1339
1340 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Msc_2.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Msc_2.h
1341 index 33b3336..236217d 100644
1342 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Msc_2.h
1343 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Msc_2.h
1344 @@ -87,6 +87,7 @@ typedef struct _wmx_ModelType_t
1345 UINT32 modelTypeID;
1346 char modelTypeName[WMX_MODEL_TYPE_NAME_MAX_LENGTH];
1347 } wmx_ModelType_t, *wmx_pModelType_t;
1348 +#pragma pack( pop )
1349
1350 /// <summary>
1351 /// A constant specifying the maximal length of the manufacturer string.
1352 @@ -102,6 +103,7 @@ typedef struct _wmx_Manufacturer_t
1353 UINT32 manufacturerID;
1354 char manufacturerName[WMX_MANUFACTURER_NAME_MAX_LENGTH];
1355 } wmx_Manufacturer_t, *wmx_pManufacturer_t;
1356 +#pragma pack( pop )
1357
1358 /// <summary>
1359 /// Definition of a struct that holds the manufacturer ID and string.
1360 @@ -111,6 +113,7 @@ typedef struct _wmx_DevicePID_t
1361 {
1362 UINT32 productID;
1363 } wmx_DevicePID_t, *wmx_pDevicePID_t;
1364 +#pragma pack( pop )
1365
1366 /// <summary>
1367 /// A constant specifying the maximal length of the serial number string.
1368 @@ -125,6 +128,7 @@ typedef struct _wmx_SerialNumber_t
1369 {
1370 char serialNumber[WMX_SERIAL_NUMBER_MAX_LENGTH];
1371 } wmx_SerialNumber_t, *wmx_pSerialNumber_t;
1372 +#pragma pack( pop )
1373
1374
1375
1376 @@ -140,6 +144,7 @@ typedef struct _wmx_SerialNumber_t
1377 // UINT32 TotalTxBytes;
1378 // UINT32 TotalTxPackets;
1379 //} wmx_Statistics_t, *wmx_pStatistics_t;
1380 +//#pragma pack( pop )
1381
1382
1383 /// <summary>
1384 @@ -153,6 +158,7 @@ typedef struct _wmx_SfStatistics_t
1385 UINT32 noReceivedBytes;
1386 UINT32 noTransmittedBytes;
1387 } wmx_SfStatistics_t, *wmx_pSfStatistics_t;
1388 +#pragma pack( pop )
1389
1390 /// <summary>
1391 /// A constant specifying the maximal length of the strings in the wmx_DeviceVersion_t struct.
1392 @@ -171,6 +177,7 @@ typedef struct _wmx_DeviceVersion_t
1393 char BoardName[WMX_DEVICE_VERSION_MAX_LENGTH];
1394 char Software[WMX_DEVICE_VERSION_MAX_LENGTH];
1395 } wmx_DeviceVersion_t, *wmx_pDeviceVersion_t;
1396 +#pragma pack( pop )
1397
1398
1399
1400 @@ -230,4 +237,4 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetDeviceDetailsEx( wmx_MacAd
1401 wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetDeviceVersion( wmx_pDeviceVersion_t pDeviceVersion );
1402
1403 wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_ResetDevice( );
1404 -#endif // _WMX_SDK_MSC_2_H
1405 \ No newline at end of file
1406 +#endif // _WMX_SDK_MSC_2_H
1407 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1408 index 9a7863f..7fb5817 100644
1409 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1410 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_1.h
1411 @@ -235,6 +235,7 @@ typedef struct _wmx_Statistics_t
1412 UINT32 TotalTxBytes;
1413 UINT32 TotalTxPackets;
1414 } wmx_Statistics_t, *wmx_pStatistics_t;
1415 +#pragma pack( pop )
1416
1417 /// <summary>
1418 /// Type definition for a structure giving a detailed info on a system state.
1419 @@ -671,4 +672,4 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_IsAssociated(wmx_pAssociate_t
1420 wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetSpLockStatus(wmx_pSpLock_t pSpLockStatus);
1421 wmx_Status_t wmx_CmdSpLockUnLock(wmx_SpLockCode_t SpLockCode);
1422
1423 -#endif // _WMX_SDK_NDS_1_H
1424 \ No newline at end of file
1425 +#endif // _WMX_SDK_NDS_1_H
1426 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h
1427 index 05fc677..2bb463d 100644
1428 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h
1429 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h
1430 @@ -110,6 +110,7 @@ typedef struct _wmx_SLA_t
1431 wmx_LinkSpeed_t downLinkSpeed;
1432 UINT32 agreementLevel;
1433 } wmx_SLA_t, *wmx_pSLA_t;
1434 +#pragma pack( pop )
1435
1436 #define WMX_SUBSCRIBER_NAME_MAX_SIZE 100
1437 #define WMX_SUBSCRIBER_ID_MAX_SIZE 256
1438 @@ -125,6 +126,7 @@ typedef struct _wmx_SubscriberInfo_t
1439 BOOL userCredRequired;
1440 //////////////////
1441 } wmx_SubscriberInfo_t, *wmx_pSubscriberInfo_t;
1442 +#pragma pack( pop )
1443
1444 /// <summary>
1445 /// Type definition for a struct containing information of a specific NSP.
1446 @@ -149,6 +151,7 @@ typedef struct _wmx_NSP_t
1447 wmx_SubscriberInfo_t subscribers[WMX_NSP_SUBSCRIBERS_MAX_NUM]; // The list of subscribers associated with this NSP on this device.
1448 UINT32 numOfSubscribers;
1449 } wmx_NSP_t, *wmx_pNSP_t;
1450 +#pragma pack( pop )
1451
1452 // TODO: Add description
1453 #pragma pack( push, 1 )
1454 @@ -158,6 +161,7 @@ typedef struct _wmx_ContactInformation_t
1455 UINT32 uriType; //TODO - don't forget to validate the values 0-255
1456 char text[MAX_SIZE_OF_STRING_BUFFER];
1457 } wmx_ContactInformation_t, *wmx_pContactInformation_t;
1458 +#pragma pack( pop )
1459
1460 /// <summary>
1461 /// Type definition for an enum specifying the possible outcomes of a scan cycle.
1462 @@ -224,6 +228,7 @@ typedef struct _wmx_UserLinkStatus_t
1463 wmx_LinkSpeed_t downLinkSpeed;
1464 wmx_BSid_t bsId;
1465 } wmx_UserLinkStatus_t, *wmx_pUserLinkStatus_t;
1466 +#pragma pack( pop )
1467
1468 #pragma pack( push, 1 )
1469 typedef struct _wmx_UserStatistics_t
1470 @@ -234,6 +239,7 @@ typedef struct _wmx_UserStatistics_t
1471 UINT32 TotalTxBytes;
1472 UINT32 TotalTxPackets;
1473 } wmx_UserStatistics_t, *wmx_pUserStatistics_t;
1474 +#pragma pack( pop )
1475
1476 /// <summary>
1477 /// A constant specifying the maximal length of a NSPs structs vector (in terms of the number of wmx_NSP_t structs the vector can contain).
1478 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1479 index 2dc5f37..21fdf62 100644
1480 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1481 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1482 @@ -435,6 +435,7 @@ typedef struct _wmx_RfSwitchesStatus_t
1483 wmx_RfStatus_t swRfStatus;
1484 wmx_RfStatus_t hwRfStatus;
1485 }wmx_RfSwitchesStatus_t, *wmx_pRfSwitchesStatus_t;
1486 +#pragma pack( pop )
1487
1488 /// <summary>
1489 /// A struct in which the API will place information (such as URLs, VoIP numbers, �) that are relevant to the
1490 @@ -446,6 +447,7 @@ typedef struct _wmx_APDOContactInfo_t
1491 {
1492 char contactDetails[MAX_CONTACT_DETAILS_SIZE];
1493 } wmx_APDOContactInfo_t, *wmx_pAPDOContactInfo_t;
1494 +#pragma pack( pop )
1495
1496 /// <summary>
1497 /// A struct in which the API will place information which is needed in the package update process.
1498 @@ -460,6 +462,7 @@ typedef struct _wmx_PackageInfo_t
1499 BOOL mandatoryUpdate; /**< (TRUE = mandatory FALSE, optional) */
1500 BOOL warnUser; /**< (TRUE = warn user, FALSE = no user warning */
1501 } wmx_PackageInfo_t, *wmx_pPackageInfo_t;
1502 +#pragma pack( pop )
1503
1504 typedef enum _wmx_SPLockStatus_t
1505 {
1506 @@ -507,5 +510,6 @@ typedef struct _wmx_InstallationInfo_t
1507 char fwVersion[MAX_INSTALLAION_VERSION_SIZE];
1508 char hwVersion[MAX_INSTALLAION_VERSION_SIZE];
1509 } wmx_InstallationInfo_t, *wmx_pInstallationInfo_t;
1510 +#pragma pack( pop )
1511
1512 #endif // _WMX_SDK_NDS_CMN_H
1513 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Coex_1.c b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Coex_1.c
1514 index 97bd45c..beac961 100644
1515 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Coex_1.c
1516 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Coex_1.c
1517 @@ -64,7 +64,7 @@ wmx_Status_t wmx_SetCoexistenceMode(wmx_CoexistenceMode_t coexMode)
1518 if (coexMode == WMX_MODE_CM && UserCall){
1519 TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "SetCoexistanceMode recieved set CM mode in CM mode.");
1520 if (act_thread_coexHandler!=NULL){
1521 - OSAL_kill_thread(&act_thread_coexHandler);
1522 + OSAL_kill_thread(act_thread_coexHandler);
1523 retStatus = WMX_ST_OK;
1524 }
1525 // setting fall to xor key to zero so we never fall to xor even when driver falls and brings itself up
1526 diff --git a/InfraStack/OSDependent/Linux/InfraStackModules/CommonAPIHeaders/WiMaxType.h b/InfraStack/OSDependent/Linux/InfraStackModules/CommonAPIHeaders/WiMaxType.h
1527 index 9afb111..4c56ab9 100644
1528 --- a/InfraStack/OSDependent/Linux/InfraStackModules/CommonAPIHeaders/WiMaxType.h
1529 +++ b/InfraStack/OSDependent/Linux/InfraStackModules/CommonAPIHeaders/WiMaxType.h
1530 @@ -305,7 +305,7 @@ typedef struct _WIMAX_API_RF_SWITCHES_STATUS
1531 {
1532 UINT32 structureSize; /**< size of this structure. */
1533 WIMAX_API_PROFILE_ID profileID; /**< profile ID. Profile id 0 is reserve to connection without specifying a user account. */
1534 - char profileName[MAX_SIZE_OF_STRING_BUFFER]; /**< profile name. */
1535 + WIMAX_CHAR profileName[MAX_SIZE_OF_STRING_BUFFER]; /**< profile name. */
1536 } WIMAX_API_PROFILE_INFO, *WIMAX_API_PROFILE_INFO_P;
1537
1538 /// Device version
1539 @@ -467,6 +467,8 @@ typedef struct _WIMAX_API_RF_SWITCHES_STATUS
1540 } WIMAX_API_INTERFACE_INFO, *WIMAX_API_INTERFACE_INFO_P;
1541 #endif
1542
1543 +#pragma pack( pop )
1544 +
1545 /// The statuses provided by this API can generally be mapped to movements along the SDK common state machine. The indications may provide further detailed information using the API�s arguments when relevant.
1546 /// \param[in] pDeviceId - Pointer to Device Identifier passed on open of device.
1547 /// \param[in] deviceStatus - The device Status value
1548 diff --git a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_linux_types.h b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_linux_types.h
1549 index 99b01f6..364c511 100644
1550 --- a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_linux_types.h
1551 +++ b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_linux_types.h
1552 @@ -105,7 +105,7 @@ typedef unsigned long long UINT64;
1553
1554 typedef unsigned int DWORD;
1555
1556 -typedef int INT_PTR;
1557 +typedef int * INT_PTR;
1558
1559
1560 typedef char INT8;
1561 diff --git a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
1562 index 26e2a91..6ced165 100644
1563 --- a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
1564 +++ b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_trace.c
1565 @@ -173,7 +173,7 @@ void osallog(char *ch, int flush)
1566 }
1567 }
1568 // write into file
1569 - fprintf(log, ch);
1570 + fprintf(log, "%s", ch);
1571 // put extra to log next line to build
1572 //fprintf(log,"\n");
1573 if (flush == 1)
1574 diff --git a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_scan_op.c b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_scan_op.c
1575 index 2f438ab..7d7b0a5 100644
1576 --- a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_scan_op.c
1577 +++ b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_scan_op.c
1578 @@ -468,7 +468,7 @@ int wimaxcu_get_network_list(WIMAX_API_DEVICE_ID_P p_device_id, CMD_ARGS scan_mo
1579
1580 } else if (scan_mode == CMD_SCAN_ARG_WIDE) {
1581 // Get User Connect Mode
1582 - int userConnectMode;
1583 + WIMAX_API_CONNECTION_MODE userConnectMode;
1584 wmxStatus = GetConnectionMode(p_device_id, &userConnectMode);
1585 if (WIMAX_API_RET_SUCCESS != wmxStatus) {
1586 PrintWmxStatus(wmxStatus);
1587 @@ -904,4 +904,4 @@ int wimaxcu_stop_scan(WIMAX_API_DEVICE_ID_P p_device_id)
1588 }
1589
1590 }
1591 -}
1592 \ No newline at end of file
1593 +}
1594 --
1595 1.7.4.1
1596
1597
1598
1599
1600 1.1 net-wireless/wimax/files/updates/0011-configure-remove-O2-by-default.patch
1601
1602 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0011-configure-remove-O2-by-default.patch?rev=1.1&view=markup
1603 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0011-configure-remove-O2-by-default.patch?rev=1.1&content-type=text/plain
1604
1605 Index: 0011-configure-remove-O2-by-default.patch
1606 ===================================================================
1607 From 0e192859b07bdb06fa81eb8af7c28286ca9c6614 Mon Sep 17 00:00:00 2001
1608 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1609 Date: Mon, 20 Dec 2010 13:53:31 -0800
1610 Subject: [PATCH 11/20] configure: remove -O2 by default
1611
1612 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1613 ---
1614 configure | 2 +-
1615 configure.ac | 2 +-
1616 2 files changed, 2 insertions(+), 2 deletions(-)
1617
1618 diff --git a/configure b/configure
1619 index aa5baa4..35ea926 100755
1620 --- a/configure
1621 +++ b/configure
1622 @@ -11223,7 +11223,7 @@ program_suffix=$cooked_program_suffix
1623
1624
1625 #if (test "${CFLAGS}" = ""); then
1626 -CFLAGS="-O2 -g -Wall -D _USE_TRACE -ldl -lm"
1627 +CFLAGS="-g -Wall -D _USE_TRACE -ldl -lm"
1628 #fi
1629
1630 # Check whether --enable-debug was given.
1631 diff --git a/configure.ac b/configure.ac
1632 index e684bfa..69916eb 100644
1633 --- a/configure.ac
1634 +++ b/configure.ac
1635 @@ -23,7 +23,7 @@ AC_SUBST(program_suffix, $cooked_program_suffix)
1636
1637
1638 #if (test "${CFLAGS}" = ""); then
1639 -CFLAGS="-O2 -g -Wall -D _USE_TRACE -ldl -lm"
1640 +CFLAGS="-g -Wall -D _USE_TRACE -ldl -lm"
1641 #fi
1642
1643 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
1644 --
1645 1.7.4.1
1646
1647
1648
1649
1650 1.1 net-wireless/wimax/files/updates/0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch
1651
1652 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch?rev=1.1&view=markup
1653 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch?rev=1.1&content-type=text/plain
1654
1655 Index: 0004-Fix-a-lot-of-warnings-about-undefined-malloc-free.patch
1656 ===================================================================
1657 From 763bfcc760083c2f2731f97578e053a945d5e19d Mon Sep 17 00:00:00 2001
1658 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1659 Date: Tue, 5 Oct 2010 15:58:06 -0700
1660 Subject: [PATCH 04/20] Fix a lot of warnings about undefined malloc/free
1661
1662 Signed-off-by: Leonid Lisovskiy <lly.dev@×××××.com>
1663 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1664 ---
1665 .../OSAgnostic/Common/CommonServices/Messenger.c | 1 +
1666 .../OSAgnostic/Common/CommonServices/Queue.c | 1 +
1667 .../Common/CommonServices/VersionHandshake.c | 1 +
1668 .../OSAgnostic/Common/L5Common/EventSubscribers.c | 1 +
1669 .../Common/L5Common/IndicatorsSubscribers.c | 1 +
1670 .../Common/WrappersCommon/WrappersUtils.c | 1 +
1671 .../OSAgnostic/Product/AppSrvInfra/L4MsgProxy.c | 1 +
1672 .../OSAgnostic/Product/AppSrvInfra/L5Dispatcher.c | 1 +
1673 8 files changed, 8 insertions(+), 0 deletions(-)
1674
1675 diff --git a/InfraStack/OSAgnostic/Common/CommonServices/Messenger.c b/InfraStack/OSAgnostic/Common/CommonServices/Messenger.c
1676 index 54c920e..20168bb 100644
1677 --- a/InfraStack/OSAgnostic/Common/CommonServices/Messenger.c
1678 +++ b/InfraStack/OSAgnostic/Common/CommonServices/Messenger.c
1679 @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
1680
1681 ***************************************************************************/
1682 #include <unistd.h>
1683 +#include <stdlib.h>
1684 #include "wimax_osal_primitives.h"
1685
1686 #include "Messenger.h"
1687 diff --git a/InfraStack/OSAgnostic/Common/CommonServices/Queue.c b/InfraStack/OSAgnostic/Common/CommonServices/Queue.c
1688 index b5f27f1..5323001 100644
1689 --- a/InfraStack/OSAgnostic/Common/CommonServices/Queue.c
1690 +++ b/InfraStack/OSAgnostic/Common/CommonServices/Queue.c
1691 @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
1692
1693 ***************************************************************************/
1694 #include <unistd.h>
1695 +#include <stdlib.h>
1696 #include "wimax_osal_primitives.h"
1697 #include "Queue.h"
1698 #include "CommonServices.h"
1699 diff --git a/InfraStack/OSAgnostic/Common/CommonServices/VersionHandshake.c b/InfraStack/OSAgnostic/Common/CommonServices/VersionHandshake.c
1700 index bc53cf9..1c49cea 100644
1701 --- a/InfraStack/OSAgnostic/Common/CommonServices/VersionHandshake.c
1702 +++ b/InfraStack/OSAgnostic/Common/CommonServices/VersionHandshake.c
1703 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
1704 ***************************************************************************/
1705 // Project
1706 #include <unistd.h>
1707 +#include <stdlib.h>
1708 #include "PipeHandlerInternal.h"
1709 #include "VersionUtils.h"
1710 #include "L5OpCodes.h"
1711 diff --git a/InfraStack/OSAgnostic/Common/L5Common/EventSubscribers.c b/InfraStack/OSAgnostic/Common/L5Common/EventSubscribers.c
1712 index 9262520..d6fa160 100644
1713 --- a/InfraStack/OSAgnostic/Common/L5Common/EventSubscribers.c
1714 +++ b/InfraStack/OSAgnostic/Common/L5Common/EventSubscribers.c
1715 @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
1716
1717 ***************************************************************************/
1718 #include <unistd.h>
1719 +#include <stdlib.h>
1720 #include "EventSubscribers.h"
1721
1722 #include "CommonServices.h"
1723 diff --git a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1724 index 53559af..97e7b8e 100644
1725 --- a/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1726 +++ b/InfraStack/OSAgnostic/Common/L5Common/IndicatorsSubscribers.c
1727 @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
1728
1729 ***************************************************************************/
1730 #include <unistd.h>
1731 +#include <stdlib.h>
1732 #include "IndicatorsSubscribers.h"
1733
1734 #include "CommonServices.h"
1735 diff --git a/InfraStack/OSAgnostic/Common/WrappersCommon/WrappersUtils.c b/InfraStack/OSAgnostic/Common/WrappersCommon/WrappersUtils.c
1736 index c0a40e3..6df4dcd 100644
1737 --- a/InfraStack/OSAgnostic/Common/WrappersCommon/WrappersUtils.c
1738 +++ b/InfraStack/OSAgnostic/Common/WrappersCommon/WrappersUtils.c
1739 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
1740 ***************************************************************************/
1741 #include "wimax_osal_primitives.h"
1742 #include <unistd.h>
1743 +#include <stdlib.h>
1744 #include "Services_Ctrl.h"
1745 #include "WrappersUtils.h"
1746 #include "WrappersCommon.h"
1747 diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.c b/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.c
1748 index 2ca1915..cfd965c 100644
1749 --- a/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.c
1750 +++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/L4MsgProxy.c
1751 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
1752 ***************************************************************************/
1753 //#pragma warning(disable : 4201) // warning C4201: nonstandard extension used : nameless struct/union
1754 #include <unistd.h>
1755 +#include <stdlib.h>
1756
1757 #include "Services_Ctrl.h"
1758 #include "L5Common.h"
1759 diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5Dispatcher.c b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5Dispatcher.c
1760 index acf6e58..8ce4c9a 100644
1761 --- a/InfraStack/OSAgnostic/Product/AppSrvInfra/L5Dispatcher.c
1762 +++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/L5Dispatcher.c
1763 @@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
1764 // OSAL
1765 #include "wimax_osal_primitives.h"
1766 #include <unistd.h>
1767 +#include <stdlib.h>
1768
1769 // Project
1770 #include "L5Dispatcher.h"
1771 --
1772 1.7.4.1
1773
1774
1775
1776
1777 1.1 net-wireless/wimax/files/updates/0006-wimaxcu-fix-array-size.patch
1778
1779 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0006-wimaxcu-fix-array-size.patch?rev=1.1&view=markup
1780 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0006-wimaxcu-fix-array-size.patch?rev=1.1&content-type=text/plain
1781
1782 Index: 0006-wimaxcu-fix-array-size.patch
1783 ===================================================================
1784 From c23d28bd5e8adf7186bc393a50ec784fc3b2528c Mon Sep 17 00:00:00 2001
1785 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1786 Date: Tue, 23 Nov 2010 15:52:18 -0800
1787 Subject: [PATCH 06/20] wimaxcu: fix array size
1788
1789 Array size declaration for 'cmd_args' was of the wrong size, thus
1790 throwing a warning.
1791
1792 Reported-by: Andrey Kononov <kononov@×××××××.ru>
1793 Signed-off-by: Inaky Perez-Gonzalez <inaky@×××××××××××.com>
1794 ---
1795 .../OSDependent/Linux/wimaxcu/wimaxcu_defs.h | 2 +-
1796 1 files changed, 1 insertions(+), 1 deletions(-)
1797
1798 diff --git a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_defs.h b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_defs.h
1799 index aa6df57..534848b 100644
1800 --- a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_defs.h
1801 +++ b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_defs.h
1802 @@ -210,7 +210,7 @@ struct cu_cmd_specs
1803
1804 char *default_arg; // eg. scan [preferred]
1805
1806 - cmd_arg_map cmd_args[6]; // Maximum number of arguments any of cmds can accept (un-used ones will be either NULL or empty strings)
1807 + cmd_arg_map cmd_args[7]; // Maximum number of arguments any of cmds can accept (un-used ones will be either NULL or empty strings)
1808
1809 size_3_string_array scan_connect_mode_options[2];
1810 char *cmd_mode_options[2];
1811 --
1812 1.7.4.1
1813
1814
1815
1816
1817 1.1 net-wireless/wimax/files/updates/0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch
1818
1819 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch?rev=1.1&view=markup
1820 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch?rev=1.1&content-type=text/plain
1821
1822 Index: 0009-daemon-don-t-mask-SEGV-just-crash-and-dump-core.patch
1823 ===================================================================
1824 From cd0435d6ec9a721188900a811f61d3ea19b58932 Mon Sep 17 00:00:00 2001
1825 From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1826 Date: Tue, 23 Nov 2010 16:17:56 -0800
1827 Subject: [PATCH 09/20] daemon: don't mask SEGV, just crash and dump core
1828
1829 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@×××××.com>
1830 ---
1831 .../Skeletons/AppSrv/GenericConsole.c | 5 +--
1832 .../Skeletons/AppSrv/GenericDaemon.c | 1 -
1833 InfraStack/OSDependent/Linux/wimaxcu/wimaxcu.c | 17 +--------------
1834 .../OSDependent/Linux/wimaxcu/wimaxcu_main.c | 22 --------------------
1835 4 files changed, 3 insertions(+), 42 deletions(-)
1836
1837 diff --git a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericConsole.c b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericConsole.c
1838 index 63e8e90..b07b8e0 100644
1839 --- a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericConsole.c
1840 +++ b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericConsole.c
1841 @@ -104,7 +104,7 @@ void print_callstack_to_file(int sig, siginfo_t *info, void *secret)
1842 // printf("Came here %d\n", __LINE__);
1843 char command[MAX_STR_LEN + MAX_FILENAME_LEN];
1844 /* Do something useful with siginfo_t */
1845 - if ((sig != SIGSEGV) && (sig != SIGINT)) {
1846 + if (sig != SIGINT) {
1847 syslog(LOG_ERR,"Got signal %d#92", sig);
1848 // printf("Came here %d\n", __LINE__);
1849 return;
1850 @@ -167,7 +167,7 @@ void console_signal_handler(int sig, siginfo_t *info, void *secret)
1851 // printf("First ctrl +c recieived \n");
1852 no_of_signals++;
1853
1854 - if ((sig == SIGSEGV) && (sig == SIGINT)) {
1855 + if (sig == SIGINT) {
1856 syslog(LOG_ERR,"Got signal %d", sig);
1857 print_callstack_to_file(sig, info, secret);
1858 }
1859 @@ -201,7 +201,6 @@ int main_console(void)
1860 sigemptyset (&sa.sa_mask);
1861 sa.sa_flags = SA_RESTART | SA_SIGINFO;
1862
1863 - sigaction(SIGSEGV, &sa, NULL);
1864 sigaction(SIGUSR1, &sa, NULL); // install our handler
1865 sigaction(SIGINT, &sa, NULL);
1866 sigaction(SIGTERM, &sa, NULL); // install our handler
1867 diff --git a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericDaemon.c b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericDaemon.c
1868 index bdf6e22..0637790 100644
1869 --- a/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericDaemon.c
1870 +++ b/InfraStack/OSDependent/Linux/InfraStackModules/Skeletons/AppSrv/GenericDaemon.c
1871 @@ -254,7 +254,6 @@ int main_daemon(void)
1872 sigemptyset (&sa.sa_mask);
1873 sa.sa_flags = SA_RESTART | SA_SIGINFO;
1874
1875 - sigaction(SIGSEGV, &sa, NULL);
1876 sigaction(SIGUSR1, &sa, NULL);
1877
1878 signal(SIGINT, stop_signal_handler);
1879 diff --git a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu.c b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu.c
1880 index ad187c4..dfa94db 100644
1881 --- a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu.c
1882 +++ b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu.c
1883 @@ -3055,7 +3055,7 @@ void print_callstack_to_file(int sig, siginfo_t *info,
1884 // printf("Came here %d\n", __LINE__);
1885 char command[MAX_STR_LEN + MAX_FILENAME_LEN];
1886 /* Do something useful with siginfo_t */
1887 - if ((sig != SIGSEGV) && (sig != SIGINT)) {
1888 + if (sig != SIGINT) {
1889 syslog(LOG_ERR,"Got signal %d#92", sig);
1890 // printf("Came here %d\n", __LINE__);
1891 return;
1892 @@ -3136,20 +3136,6 @@ void wimaxcu_signal_handler(int sig, siginfo_t *info,
1893 printf("Please check /var/log/wimax folder \n");
1894
1895 print_callstack_to_file(sig, info, secret);
1896 -
1897 -
1898 - // kalyan
1899 - // If wimaxcu recieved segmentation fault
1900 - // Stack might be corrupted
1901 - // So it is good idea to just exit
1902 - // This may recives some system resources hanging
1903 -
1904 - if(sig == SIGSEGV) {
1905 - printf("Exit \n");
1906 - exit(0);
1907 - }
1908 -
1909 -
1910 wimaxcu_stop_signal_handler(sig);
1911
1912 }
1913 @@ -3191,7 +3177,6 @@ int main(int argc, char *argv[])
1914 sigemptyset (&sa.sa_mask);
1915 sa.sa_flags = SA_RESTART | SA_SIGINFO;
1916
1917 - sigaction(SIGSEGV, &sa, NULL);
1918 sigaction(SIGUSR1, &sa, NULL);
1919
1920 signal(SIGINT, wimaxcu_stop_signal_handler);
1921 diff --git a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_main.c b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_main.c
1922 index faf0f36..d14a2ae 100644
1923 --- a/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_main.c
1924 +++ b/InfraStack/OSDependent/Linux/wimaxcu/wimaxcu_main.c
1925 @@ -330,27 +330,6 @@ void wimaxcu_stop_signal_handler(int sig)
1926
1927 }
1928
1929 -
1930 -void handler(int sig)
1931 -{
1932 - void *array[10];
1933 - size_t size;
1934 - size_t i;
1935 - char **strings;
1936 - size = backtrace(array,10);
1937 - fprintf(stderr,"Error: signal %d: \n",sig);
1938 - strings = backtrace_symbols (array, size);
1939 -
1940 - printf ("Obtained %zd stack frames.\n", size);
1941 -
1942 - for (i = 0; i < size; i++)
1943 - printf ("%s\n", strings[i]);
1944 -
1945 - free (strings);
1946 -
1947 -// backtrace_symbols_fd(array,size,2);
1948 - exit(1);
1949 -}
1950 /*
1951 * Function: main
1952 * Description: main function calls functions for intialization and
1953 @@ -402,7 +381,6 @@ int main(int argc, char *argv[])
1954 // sleep(1);
1955 // Execute the command
1956 ret = cmd_handler(&gbl_device_id, &out_cmd);
1957 - signal(SIGSEGV,handler);
1958 // Finalize the SDK
1959 wimaxcu_finalize(&gbl_device_id);
1960
1961 --
1962 1.7.4.1
1963
1964
1965
1966
1967 1.1 net-wireless/wimax/files/updates/0015-Wrappers-wmx_Preambles_t-alignment.patch
1968
1969 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0015-Wrappers-wmx_Preambles_t-alignment.patch?rev=1.1&view=markup
1970 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0015-Wrappers-wmx_Preambles_t-alignment.patch?rev=1.1&content-type=text/plain
1971
1972 Index: 0015-Wrappers-wmx_Preambles_t-alignment.patch
1973 ===================================================================
1974 From c300707009417e45ab50bafc74cd4b9488e9f365 Mon Sep 17 00:00:00 2001
1975 From: Doug Kehn <rdkehn@×××××.com>
1976 Date: Wed, 26 Jan 2011 14:26:57 -0800
1977 Subject: [PATCH 15/20] Wrappers: wmx_Preambles_t alignment
1978
1979 Update the size of wmx_Preambles_t to be a power of 2. This change
1980 resolved alignment problems on ARM XSCALE (big-endian) processor.
1981
1982 The PREAMBLES_LENGTH define, used extensively throughout the code, was
1983 not altered.
1984
1985 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
1986 ---
1987 .../WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h | 3 ++-
1988 1 files changed, 2 insertions(+), 1 deletions(-)
1989
1990 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1991 index 21fdf62..457a25c 100644
1992 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1993 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
1994 @@ -41,6 +41,7 @@
1995 #define MAX_VERBOSE_NSP_NAME_SIZE 256
1996 #define MAX_SP_LOCK_CODE_SIZE 32
1997 #define PREAMBLES_LENGTH 15
1998 +#define PREAMBLES_SIZE 16
1999 #define WMX_CHANNELS_MAX_NUM 64
2000 #define MAX_INSTALLAION_VERSION_SIZE 50
2001
2002 @@ -75,7 +76,7 @@ typedef UINT8 wmx_BSidMask_t[6], *wmx_pBSidMask_t;
2003 /// </summary>
2004 typedef UINT16 wmx_ChannelID_t, *wmx_pChannelID_t;
2005 typedef UINT32 wmx_PPMFreqError_t, *wmx_pPPMFreqError_t;
2006 -typedef UINT8 wmx_Preambles_t[PREAMBLES_LENGTH], *wmx_pPreambles_t;
2007 +typedef UINT8 wmx_Preambles_t[PREAMBLES_SIZE], *wmx_pPreambles_t;
2008
2009 /// <summary>
2010 /// Type definition for a variable containing the ID of a NSP.
2011 --
2012 1.7.4.1
2013
2014
2015
2016
2017 1.1 net-wireless/wimax/files/updates/0019-Supplicant-Big-endian-support.patch
2018
2019 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0019-Supplicant-Big-endian-support.patch?rev=1.1&view=markup
2020 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0019-Supplicant-Big-endian-support.patch?rev=1.1&content-type=text/plain
2021
2022 Index: 0019-Supplicant-Big-endian-support.patch
2023 ===================================================================
2024 From 0cf64cffc9a8bf4e67af09aa1e84540f4969016a Mon Sep 17 00:00:00 2001
2025 From: Doug Kehn <rdkehn@×××××.com>
2026 Date: Wed, 26 Jan 2011 14:32:06 -0800
2027 Subject: [PATCH 19/20] Supplicant: Big-endian support
2028
2029 Add byte swap calls where needed.
2030
2031 Signed-off-by: Doug Kehn <rdkehn@×××××.com>
2032 ---
2033 .../OSAgnostic/WiMax/Agents/Supplicant/Makefile.am | 4 ++--
2034 .../OSAgnostic/WiMax/Agents/Supplicant/Makefile.in | 8 ++++----
2035 .../WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c | 14 ++++++++++----
2036 3 files changed, 16 insertions(+), 10 deletions(-)
2037
2038 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
2039 index ac8169f..b6d2222 100644
2040 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
2041 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
2042 @@ -124,7 +124,7 @@ libSupplicantAgent_la_CFLAGS = -I "$(top_srcdir)/InfraStack/OSAgnostic/Product/
2043 -I "$(srcdir)/../../Wrappers/NDnS" \
2044 -I "$(srcdir)/../../Wrappers/Apdo" \
2045 -I "$(srcdir)/Source/ds" \
2046 - -D _GNU_SOURCE \
2047 + -D _GNU_SOURCE @LIBWIMAX_CFLAGS@ \
2048 -D "_USE_TRACE" -D "BMI_MACHINE_ENDIANNESS_LITTLE" \
2049 -D "IEEE8021X_EAPOL" -D "_OS_WIN32SIM" -D "_LINUX"
2050
2051 @@ -133,7 +133,7 @@ libSupplicantAgent_la_CFLAGS = -I "$(top_srcdir)/InfraStack/OSAgnostic/Product/
2052 if WPA_SUP_ENABLE
2053 libSupplicantAgent_la_SOURCES += $(WPA_SUP_SOURCES)
2054 libSupplicantAgent_la_CFLAGS += $(WPA_SUP_CFLAGS)
2055 -libSupplicantAgent_la_LIBS = $(WPA_SUP_LIBS)
2056 +libSupplicantAgent_la_LIBS = $(WPA_SUP_LIBS) @LIBWIMAX_LIBS@
2057 EXTRA_DIST += $(DS_SUP_SOURCES)
2058 else
2059 libSupplicantAgent_la_SOURCES += $(DS_SUP_SOURCES)
2060 diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.in b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.in
2061 index 1118c3e..6078349 100644
2062 --- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.in
2063 +++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.in
2064 @@ -396,10 +396,10 @@ libSupplicantAgent_la_CFLAGS = -I \
2065 "$(top_srcdir)/InfraStack/OSAgnostic/Product/Instrumantation/MOCHandler/UDapiL5" \
2066 -I "$(srcdir)/../NDnS/APDO" -I "$(srcdir)/../../Wrappers/NDnS" \
2067 -I "$(srcdir)/../../Wrappers/Apdo" -I "$(srcdir)/Source/ds" -D \
2068 - _GNU_SOURCE -D "_USE_TRACE" -D "BMI_MACHINE_ENDIANNESS_LITTLE" \
2069 - -D "IEEE8021X_EAPOL" -D "_OS_WIN32SIM" -D "_LINUX" \
2070 - $(am__append_2)
2071 -@WPA_SUP_ENABLE_TRUE@libSupplicantAgent_la_LIBS = $(WPA_SUP_LIBS)
2072 + _GNU_SOURCE @LIBWIMAX_CFLAGS@ -D "_USE_TRACE" -D \
2073 + "BMI_MACHINE_ENDIANNESS_LITTLE" -D "IEEE8021X_EAPOL" -D \
2074 + "_OS_WIN32SIM" -D "_LINUX" $(am__append_2)
2075 +@WPA_SUP_ENABLE_TRUE@libSupplicantAgent_la_LIBS = $(WPA_SUP_LIBS) @LIBWIMAX_LIBS@
2076 all: all-am
2077
2078 .SUFFIXES:
2079 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c b/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2080 index 8f55917..ad592e0 100644
2081 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2082 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2083 @@ -53,6 +53,8 @@
2084 #include <eap_peer/util/common.h>
2085 #include <eap_peer/crypto/tls.h>
2086
2087 +#include <wimaxll.h>
2088 +
2089
2090 #ifndef WPA_OPEN_SOURCE
2091 /* temporary, remove*/
2092 @@ -211,8 +213,12 @@ void wmxSup_MessagesHandler(L5_CONNECTION Conn,
2093 void *pvReserved )
2094 {
2095 L3L4CompleteHeader_type *l3L4CompleteHeader;
2096 + UINT16 length;
2097 + UINT16 type;
2098
2099 l3L4CompleteHeader = (L3L4CompleteHeader_type*)pvSentBuffer;
2100 + type = wimaxll_le16_to_cpu(l3L4CompleteHeader->Type);
2101 + length = wimaxll_le16_to_cpu(l3L4CompleteHeader->Length);
2102
2103 UNREFERENCED_PARAMETER(pvReserved);
2104 UNREFERENCED_PARAMETER(pvUserContext);
2105 @@ -227,7 +233,7 @@ void wmxSup_MessagesHandler(L5_CONNECTION Conn,
2106 //GOLD, SILVER
2107 case L4_PROXY_OPCODE_STATUS_INDICATION_ARRIVED:
2108 case L4_PROXY_OPCODE_L4_INDICATION_ARRIVED:
2109 - switch (l3L4CompleteHeader->Type)
2110 + switch (type)
2111 {
2112 case L3_L4_OPCODE_REPORT_EAP_REQUEST:
2113 pUtils->tpfnPostRequest( MEDIUM,
2114 @@ -240,13 +246,13 @@ void wmxSup_MessagesHandler(L5_CONNECTION Conn,
2115 case L3_L4_OPCODE_REPORT_ALT_ACCEPT:
2116 case L3_L4_OPCODE_REPORT_KEY_REQUEST:
2117 pUtils->tpfnPostRequest( MEDIUM,
2118 - l3L4CompleteHeader->Type,
2119 + type,
2120 NULL,
2121 0,
2122 wmxSup_InternalHandler );
2123 break;
2124 case L3_L4_OPCODE_REPORT_EMSK_RELATED_KEYS:
2125 - TRACE(TR_MOD_SUPPLICANT_WRAPPER, TR_SEV_INFO, "Received BEK (%d bytes)", l3L4CompleteHeader->Length);
2126 + TRACE(TR_MOD_SUPPLICANT_WRAPPER, TR_SEV_INFO, "Received BEK (%d bytes)", length);
2127 break;
2128 default:
2129 TRACE(TR_MOD_SUPPLICANT_WRAPPER, TR_SEV_ERR,"Unknown message arrived");
2130 @@ -255,7 +261,7 @@ void wmxSup_MessagesHandler(L5_CONNECTION Conn,
2131 break;
2132 //PVC
2133 case SUP_OPCODE_INDICATION_ARRIVED:
2134 - switch (((pSUP_MESSAGE_HEADER)pvSentBuffer)->opcode)
2135 + switch (wimaxll_le32_to_cpu(((pSUP_MESSAGE_HEADER)pvSentBuffer)->opcode))
2136 {
2137 case SUP_OPCODE_IND_EVENT:
2138 EventReportCB(*(wmx_pSupEvent_t)(((pSUP_MESSAGE)pvSentBuffer)->buf));
2139 --
2140 1.7.4.1
2141
2142
2143
2144
2145 1.1 net-wireless/wimax/files/updates/0005-remove-duplicate-typedef-for-u8.patch
2146
2147 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0005-remove-duplicate-typedef-for-u8.patch?rev=1.1&view=markup
2148 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0005-remove-duplicate-typedef-for-u8.patch?rev=1.1&content-type=text/plain
2149
2150 Index: 0005-remove-duplicate-typedef-for-u8.patch
2151 ===================================================================
2152 From f901c5c17b15ae979cca5a3da7247404ffc8995e Mon Sep 17 00:00:00 2001
2153 From: Alexander Gordeev <lasaine@××××××××××.su>
2154 Date: Wed, 6 Oct 2010 14:53:22 +0400
2155 Subject: [PATCH 05/20] remove duplicate typedef for u8
2156
2157 This typedef is already in eap_peer/util/common.h, no need to declare
2158 it one more time.
2159
2160 Signed-off-by: Alexander Gordeev <lasaine@××××××××××.su>
2161 ---
2162 .../WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c | 1 -
2163 1 files changed, 0 insertions(+), 1 deletions(-)
2164
2165 diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c b/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2166 index a33680c..8f55917 100644
2167 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2168 +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Supplicant/wmxSDK_Sup_Impl.c
2169 @@ -47,7 +47,6 @@
2170 #include "NDnSAgent.h"
2171
2172
2173 -typedef unsigned char u8;
2174 #define TLS_IMPLEMENTATION Arm1
2175
2176 /* the supplicant calls the tls_ methods, so we make sure the declarations match to what it expects. */
2177 --
2178 1.7.4.1
2179
2180
2181
2182
2183 1.1 net-wireless/wimax/files/updates/0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch
2184
2185 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch?rev=1.1&view=markup
2186 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/wimax/files/updates/0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch?rev=1.1&content-type=text/plain
2187
2188 Index: 0010-OSAL-fix-OSAL_wcsmp-for-Linux-environments.patch
2189 ===================================================================
2190 From 1718d11005da4bd288aaf84ac3965dc490e16278 Mon Sep 17 00:00:00 2001
2191 From: Alexander Khryukin <alexander@×××××.ru>
2192 Date: Thu, 16 Dec 2010 09:57:58 -0800
2193 Subject: [PATCH 10/20] OSAL: fix OSAL_wcsmp() for Linux environments
2194
2195 Good day, Inaky. This is patch for wimaxd that allow connect to wimax
2196 network Yota from Carrick (part of connmand).
2197
2198 in InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c in
2199 function CmdConnectToNetwork() call to OSAL_wcscmp() with
2200 nspName="Yota" and nspsEx[0].NSPName="Yota" returns -1246756864
2201 ---
2202 .../Linux/OSAL/Primitives/wimax_osal_strings.c | 6 +++++-
2203 1 files changed, 5 insertions(+), 1 deletions(-)
2204
2205 diff --git a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_strings.c b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_strings.c
2206 index f97119a..6a71b11 100644
2207 --- a/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_strings.c
2208 +++ b/InfraStack/OSDependent/Linux/OSAL/Primitives/wimax_osal_strings.c
2209 @@ -1653,9 +1653,13 @@ int OSAL_CAPI_wmemcpy_s(OSAL_WIMAX_API_WSTRING dest, size_t sizeInWords, const O
2210 }
2211 // TODO::OSAL-WORK::IMPORTANT - OSAL_wcscmp, OSAL_wcslen - What happens when these methods are fed with ansi strings???
2212
2213 -int OSAL_wcscmp(const wchar_t * string1, const wchar_t * string2)
2214 +int OSAL_wcscmp(OSAL_WIMAX_API_WSTRING string1, OSAL_WIMAX_API_WSTRING string2)
2215 {
2216 +#ifdef NATIVE_LINUX
2217 + return strcmp(string1, string2);
2218 +#else
2219 return wcscmp(string1, string2);
2220 +#endif
2221 }
2222
2223
2224 --
2225 1.7.4.1