Cumulative patch from commit 37fd0be2d3ca50c9035e67041328099356a46860
37fd0be Add CTRL-EVENT-CHANNEL-SWITCH event to indicate channel changes
1574fa1 GAS: Fix double-free on an error path
d6e93d3 GAS: Remove unused gas_query_cancel()
ae2b482 GAS: Check protected/unprotected drop after action code check
9c21b2b GAS: Report GAS-QUERY-DONE event on initial req TX failure
e6804fe OpenSSL: Update to match the modified DH_get0_key() API
fc1e2c0 D-Bus: Make the CurrentAuthMode property getter more robust
82b9ec3 D-Bus: Add DeviceFoundProperties signal for discovered peers
4976618 mesh: Mark wpa_state COMPLETED when mesh join has been performed
b94fff1 wpa_supplicant: Configurable EAP fragment size in AP mode
617593c Assign vendor specific elements for early HE testing
4874b78 PAE: Use big endian version in current_peer_id.mn to be more consistent
ce256b4 PAE: Use sci->port more consistently
2f13e54 wired: Silence sparse warning on redefinition of IFNAMSIZ
82ffcba Move extern declarations for ext_password backends into a header file
affdd33 Move extern declarations for autoscan modules into a header file
9eece21 Move extern declarations for bgscan modules into a header file
39ab6a5 Move extern declarations for driver ops into a header file
4775471 nl80211: Mark wpa_driver_nl80211_get_macaddr() static
ebae413 Fix a debug print in p2p_manager_disconnect()
f367c08 Mark internal functions static
582121b OpenSSL: Silence sparse warnings in fips186_2_prf()
451e094 dhcp_snoop: Silence a sparse warning
bbae0f0 ndisc_snoop: Include ndisc_snoop.h to check prototypes
99a716a TNCS: Mark functions static
799a7ed PAE: Mark ieee802_1x_kay_deinit_data_key() static
4e7f5a4 PAE: Use be16/be32 instead of u16/u32 for spartse
ac36b13 TNCC: Mark functions static
fad6485 radiotap: Silence sparse warnings about byte order swapping
94c4d78 FST: Make fst_action_names static
82c734c FST: Fix byte order of couple of fields on big endian hosts
0dbe22b Mark wpas_data_test_rx() static
4d8d710 Fix byte order for CONFIG_VHT_OVERRIDES parameters
3787c91 OpenSSL: Pull in header files to check function prototypes
39cdd3a FST: Mark wpa_supplicant callback functions get_peer_{first,next} static
6013bbe TDLS: Declare tdls_testing as extern in a header file
0e672b8 trace: Define externs in a header file
6527b52 Undefine __bitwise before defining it for sparse
468b7b1 Fix hostapd_sta_add() call to use NULL as the pointer instead of 0
0558bec MBO: Mark verify_channel() static
9e080bf WNM: Use NULL instead of 0 as the pointer return value
Change-Id: Ia18f0c09fafb7bf0a3a91cd72dc81c370c2644ac
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/utils/common.h b/src/utils/common.h
index d19927b..197e4d1 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -419,6 +419,7 @@
*/
#ifdef __CHECKER__
#define __force __attribute__((force))
+#undef __bitwise
#define __bitwise __attribute__((bitwise))
#else
#define __force
diff --git a/src/utils/ext_password.c b/src/utils/ext_password.c
index 0613119..5615bd7 100644
--- a/src/utils/ext_password.c
+++ b/src/utils/ext_password.c
@@ -16,10 +16,6 @@
#include "ext_password_i.h"
-#ifdef CONFIG_EXT_PASSWORD_TEST
-extern struct ext_password_backend ext_password_test;
-#endif /* CONFIG_EXT_PASSWORD_TEST */
-
static const struct ext_password_backend *backends[] = {
#ifdef CONFIG_EXT_PASSWORD_TEST
&ext_password_test,
diff --git a/src/utils/ext_password_i.h b/src/utils/ext_password_i.h
index 043e731..948eaf5 100644
--- a/src/utils/ext_password_i.h
+++ b/src/utils/ext_password_i.h
@@ -20,4 +20,10 @@
struct wpabuf * ext_password_alloc(size_t len);
+/* Available ext_password backends */
+
+#ifdef CONFIG_EXT_PASSWORD_TEST
+extern const struct ext_password_backend ext_password_test;
+#endif /* CONFIG_EXT_PASSWORD_TEST */
+
#endif /* EXT_PASSWORD_I_H */
diff --git a/src/utils/module_tests.h b/src/utils/module_tests.h
new file mode 100644
index 0000000..3bfe4ad
--- /dev/null
+++ b/src/utils/module_tests.h
@@ -0,0 +1,20 @@
+/*
+ * Module tests
+ * Copyright (c) 2014-2015, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef MODULE_TESTS_H
+#define MODULE_TESTS_H
+
+int wpas_module_tests(void);
+int hapd_module_tests(void);
+
+int utils_module_tests(void);
+int wps_module_tests(void);
+int common_module_tests(void);
+int crypto_module_tests(void);
+
+#endif /* MODULE_TESTS_H */
diff --git a/src/utils/os.h b/src/utils/os.h
index 9e496fb..e8f0b79 100644
--- a/src/utils/os.h
+++ b/src/utils/os.h
@@ -657,6 +657,10 @@
#if defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS)
#define TEST_FAIL() testing_test_fail()
int testing_test_fail(void);
+extern char wpa_trace_fail_func[256];
+extern unsigned int wpa_trace_fail_after;
+extern char wpa_trace_test_fail_func[256];
+extern unsigned int wpa_trace_test_fail_after;
#else
#define TEST_FAIL() 0
#endif
diff --git a/src/utils/platform.h b/src/utils/platform.h
index 46cfe78..813987e 100644
--- a/src/utils/platform.h
+++ b/src/utils/platform.h
@@ -15,7 +15,7 @@
\
__ptr->__val; \
})
-#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((uint16_t *)(p)))
-#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((uint32_t *)(p)))
+#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((le16 *)(p)))
+#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((le32 *)(p)))
#endif /* PLATFORM_H */
diff --git a/src/utils/radiotap.c b/src/utils/radiotap.c
index c9a5023..71996eb 100644
--- a/src/utils/radiotap.c
+++ b/src/utils/radiotap.c
@@ -13,8 +13,8 @@
*
* See COPYING for more details.
*/
-#include "radiotap_iter.h"
#include "platform.h"
+#include "radiotap_iter.h"
/* function prototypes and related defs are in radiotap_iter.h */
diff --git a/src/utils/radiotap.h b/src/utils/radiotap.h
index 0572e7c..460af23 100644
--- a/src/utils/radiotap.h
+++ b/src/utils/radiotap.h
@@ -65,12 +65,12 @@
* new fields does not count.
*/
uint8_t it_pad;
- uint16_t it_len; /* length of the whole
+ le16 it_len; /* length of the whole
* header in bytes, including
* it_version, it_pad,
* it_len, and data fields.
*/
- uint32_t it_present; /* A bitmap telling which
+ le32 it_present; /* A bitmap telling which
* fields are present. Set bit 31
* (0x80000000) to extend the
* bitmap by another 32 bits.
diff --git a/src/utils/radiotap_iter.h b/src/utils/radiotap_iter.h
index b768c85..6ea07e3 100644
--- a/src/utils/radiotap_iter.h
+++ b/src/utils/radiotap_iter.h
@@ -67,7 +67,7 @@
const struct ieee80211_radiotap_namespace *current_namespace;
unsigned char *_arg, *_next_ns_data;
- uint32_t *_next_bitmap;
+ le32 *_next_bitmap;
unsigned char *this_arg;
#ifdef RADIOTAP_SUPPORT_OVERRIDES
diff --git a/src/utils/utils_module_tests.c b/src/utils/utils_module_tests.c
index 41511b9..abdb79c 100644
--- a/src/utils/utils_module_tests.c
+++ b/src/utils/utils_module_tests.c
@@ -16,6 +16,7 @@
#include "utils/base64.h"
#include "utils/ip_addr.h"
#include "utils/eloop.h"
+#include "utils/module_tests.h"
struct printf_test_data {