mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 10:51:27 +00:00
84 lines
2.7 KiB
Diff
84 lines
2.7 KiB
Diff
From ed93959f61e103703d04b85351eed7a1c4fe644b Mon Sep 17 00:00:00 2001
|
|
From: Karthikeyan Kathirvel <kathirve@codeaurora.org>
|
|
Date: Fri, 28 Aug 2020 14:16:10 +0530
|
|
Subject: [PATCH] hostapd: Fixed compilation warnings
|
|
|
|
Below warnings are fixed
|
|
|
|
Uninitialized and redefined macro warnings has been fixed
|
|
|
|
../src/crypto/sha1-internal.c:152:0: error: "R3" redefined [-Werror]
|
|
#define R3(v,w,x,y,z,i) \
|
|
^
|
|
In file included from qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-5.2.0_uClibc-1.0.14_eabi/include/signal.h:358:0,
|
|
from qsdk/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/hostapd-supplicant-full/hostapd-2021-12-13/src/utils/includes.h:26,
|
|
from ../src/crypto/sha1-internal.c:9:
|
|
qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-5.2.0_uClibc-1.0.14_eabi/include/sys/ucontext.h:49:0:
|
|
note: this is the location of the previous definition
|
|
#define R3 R3
|
|
|
|
Signed-off-by: Karthikeyan Kathirvel <kathirve@codeaurora.org>
|
|
---
|
|
src/ap/ieee802_11.c | 2 +-
|
|
src/ap/wpa_auth.c | 4 ++++
|
|
src/rsn_supp/wpa.c | 2 +-
|
|
3 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/drivers/driver_nl80211.c
|
|
+++ b/src/drivers/driver_nl80211.c
|
|
@@ -4859,7 +4859,7 @@ static int wpa_driver_nl80211_sta_add(vo
|
|
|
|
if (params->he_capab) {
|
|
wpa_hexdump(MSG_DEBUG, " * he_capab",
|
|
- params->he_capab, params->he_capab_len);
|
|
+ (u8 *) params->he_capab, params->he_capab_len);
|
|
if (nla_put(msg, NL80211_ATTR_HE_CAPABILITY,
|
|
params->he_capab_len, params->he_capab))
|
|
goto fail;
|
|
--- a/src/tls/tlsv1_client_ocsp.c
|
|
+++ b/src/tls/tlsv1_client_ocsp.c
|
|
@@ -322,7 +322,7 @@ tls_process_ocsp_responses(struct tlsv1_
|
|
{
|
|
struct asn1_hdr hdr;
|
|
const u8 *pos, *end;
|
|
- enum tls_ocsp_result res;
|
|
+ enum tls_ocsp_result res = TLS_OCSP_NO_RESPONSE;
|
|
|
|
pos = resp;
|
|
end = resp + len;
|
|
--- a/src/crypto/sha1-internal.c
|
|
+++ b/src/crypto/sha1-internal.c
|
|
@@ -141,17 +141,32 @@ A million repetitions of "a"
|
|
block->l[(i + 8) & 15] ^ block->l[(i + 2) & 15] ^ block->l[i & 15], 1))
|
|
|
|
/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
|
|
+#ifdef R0
|
|
+#undef R0
|
|
+#endif
|
|
#define R0(v,w,x,y,z,i) \
|
|
z += ((w & (x ^ y)) ^ y) + blk0(i) + 0x5A827999 + rol(v, 5); \
|
|
w = rol(w, 30);
|
|
+#ifdef R1
|
|
+#undef R1
|
|
+#endif
|
|
#define R1(v,w,x,y,z,i) \
|
|
z += ((w & (x ^ y)) ^ y) + blk(i) + 0x5A827999 + rol(v, 5); \
|
|
w = rol(w, 30);
|
|
+#ifdef R2
|
|
+#undef R2
|
|
+#endif
|
|
#define R2(v,w,x,y,z,i) \
|
|
z += (w ^ x ^ y) + blk(i) + 0x6ED9EBA1 + rol(v, 5); w = rol(w, 30);
|
|
+#ifdef R3
|
|
+#undef R3
|
|
+#endif
|
|
#define R3(v,w,x,y,z,i) \
|
|
z += (((w | x) & y) | (w & x)) + blk(i) + 0x8F1BBCDC + rol(v, 5); \
|
|
w = rol(w, 30);
|
|
+#ifdef R4
|
|
+#undef R4
|
|
+#endif
|
|
#define R4(v,w,x,y,z,i) \
|
|
z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \
|
|
w=rol(w, 30);
|