Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs] wifi removing warnings for 917SoC #26051

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifdef RSI_WITH_OS
/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "StackMacros.h"
#include "stack_macros.h"
#include "task.h"
#include "timers.h"

Expand Down
8 changes: 4 additions & 4 deletions examples/platform/silabs/SiWx917/SiWx917/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,14 +491,14 @@ static void wfx_rsi_do_join(void)
void wfx_rsi_task(void * arg)
{
EventBits_t flags;
int32_t status = 0;
int32_t status;
TickType_t last_dhcp_poll, now;
struct netif * sta_netif;
(void) arg;
uint32_t rsi_status = wfx_rsi_init();
if (rsi_status != RSI_SUCCESS)
status = wfx_rsi_init();
if (status != RSI_SUCCESS)
{
SILABS_LOG("%s: error: wfx_rsi_init with status: %02x", __func__, rsi_status);
SILABS_LOG("%s: error: wfx_rsi_init with status: %02x", __func__, status);
return;
}
wfx_lwip_start();
Expand Down
1 change: 1 addition & 0 deletions examples/platform/silabs/SiWx917/SiWx917/wfx_rsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t * ap);
int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info);
int32_t wfx_rsi_reset_count();
int32_t wfx_rsi_disconnect();
int32_t wfx_rsi_init_platform();
#define SILABS_LOG(...) efr32Log(__VA_ARGS__);

#ifdef __cplusplus
Expand Down
10 changes: 5 additions & 5 deletions examples/platform/silabs/SiWx917/device/src/startup_RS1xxxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ __attribute__((section(".co_stack"))) unsigned long pulStack[STACK_SIZE];
#define WEAK __attribute__((weak))

/*----------Declaration of the default fault handlers-------------------------*/
// #ifndef __START
// extern void _start(void) __attribute__((noreturn)); /* Pre Main (C library entry point) */
// #else
// extern int __START(void) __attribute__((noreturn)); /* main entry point */
// #endif
#ifndef __START
extern void _start(void) __attribute__((noreturn)); /* Pre Main (C library entry point) */
#else
extern int __START(void) __attribute__((noreturn)); /* main entry point */
#endif

/* System exception vector handler */
__attribute__((used)) void WEAK Reset_Handler(void);
Expand Down
15 changes: 1 addition & 14 deletions src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ static inline Spake2p_Context * to_inner_spake2p_context(Spake2pOpaqueContext *
CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitInternal(void)
{
CHIP_ERROR error = CHIP_NO_ERROR;
int result = 0;

Spake2p_Context * context = to_inner_spake2p_context(&mSpake2pContext);

Expand All @@ -864,11 +863,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::InitInternal(void)
G = curve_G;

return error;

exit:
_log_mbedTLS_error(result);
Clear();
return error;
}

void Spake2p_P256_SHA256_HKDF_HMAC::Clear()
Expand Down Expand Up @@ -926,20 +920,18 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::MacVerify(const uint8_t * key, size_t
CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FELoad(const uint8_t * in, size_t in_len, void * fe)
{
CHIP_ERROR error = CHIP_NO_ERROR;
int result = 0;

uECC_word_t tmp[2 * NUM_ECC_WORDS] = { 0 };
uECC_vli_bytesToNative(tmp, in, NUM_ECC_BYTES);

uECC_vli_mmod((uECC_word_t *) fe, tmp, curve_n);

exit:
_log_mbedTLS_error(result);
return error;
}

CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEWrite(const void * fe, uint8_t * out, size_t out_len)
{
(void) out_len;
silabs-srishylam marked this conversation as resolved.
Show resolved Hide resolved
uECC_vli_nativeToBytes(out, NUM_ECC_BYTES, (const unsigned int *) fe);

return CHIP_NO_ERROR;
Expand Down Expand Up @@ -967,12 +959,9 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEGenerate(void * fe)
CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::FEMul(void * fer, const void * fe1, const void * fe2)
{
CHIP_ERROR error = CHIP_NO_ERROR;
int result = 0;

uECC_vli_modMult((uECC_word_t *) fer, (const uECC_word_t *) fe1, (const uECC_word_t *) fe2, (const uECC_word_t *) curve_n);

exit:
_log_mbedTLS_error(result);
return error;
}

Expand Down Expand Up @@ -1018,7 +1007,6 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointAddMul(void * R, const void * P1,
uECC_word_t R1[2 * NUM_ECC_WORDS];
uECC_word_t R2[2 * NUM_ECC_WORDS];
uECC_word_t z[NUM_ECC_WORDS];
uint8_t ret = UECC_SUCCESS;

if (EccPoint_mult_safer(R1, (const uECC_word_t *) P1, (const uECC_word_t *) fe1) != UECC_SUCCESS)
{
Expand Down Expand Up @@ -1490,7 +1478,6 @@ CHIP_ERROR ExtractPubkeyFromX509Cert(const ByteSpan & certificate, Crypto::P256P
CHIP_ERROR error = CHIP_NO_ERROR;
mbedtls_x509_crt mbed_cert;
mbedtls_uecc_keypair * keypair = nullptr;
size_t pubkey_size = 0;

mbedtls_x509_crt_init(&mbed_cert);

Expand Down
2 changes: 2 additions & 0 deletions src/platform/silabs/SiWx917/bluetooth/wfx_sl_ble_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#ifndef WFX_SL_BLE_INIT
#define WFX_SL_BLE_INIT
#ifndef RSI_BLE_ENABLE
#define RSI_BLE_ENABLE (1)
#endif // RSI_BLE_ENABLE

// BLE include file to refer BLE APIs
#include "FreeRTOS.h"
Expand Down
8 changes: 0 additions & 8 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,7 @@ template("siwx917_sdk") {
cflags += [
"-Wno-maybe-uninitialized",
"-Wno-shadow",
"-Wno-empty-body",
"-Wno-cpp",
"-Wno-missing-braces",
"-Wno-sign-compare",
"-Wno-error",
silabs-srishylam marked this conversation as resolved.
Show resolved Hide resolved
"-Wno-unknown-warning-option",
"-Wno-unused-variable",
"-Wno-implicit-function-declaration",
"-Wno-unused-function",
]

if (defined(invoker.defines)) {
Expand Down