Bug in WICED/internal/waf.c

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I rather think that wiced_dct_write_wifi_config_section should write the WIFI section, not the DCT section... As a GIT-style diff this is the fix:

diff --git a/WICED/internal/waf.c b/WICED/internal/waf.c

index 72e37bc..12b07b8 100644

--- a/WICED/internal/waf.c

+++ b/WICED/internal/waf.c

@@ -163,7 +163,7 @@ wiced_result_t wiced_dct_read_wifi_config_section( platform_dct_wifi_config_t* w

wiced_result_t wiced_dct_write_wifi_config_section( const platform_dct_wifi_config_t* wifi_config_dct )

{

-    return wiced_dct_write( wifi_config_dct, DCT_SECURITY_SECTION, 0, sizeof( *wifi_config_dct ) );

+    return wiced_dct_write( wifi_config_dct, DCT_WIFI_CONFIG_SECTION, 0, sizeof( *wifi_config_dct ) );

}

I found it in 3.1.2, so it's probably been there for ages.

0 Likes
6 Replies
Anonymous
Not applicable

Hi,

Your fix looks make sense to me.

The same fix is required for 3.3.1.

Hope someone from Broadcom can review and merge it.

0 Likes
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

I believe the DCT_SECURITY_SECTION is being used since we are writing to config section that needs to be secured with in DCT.

0 Likes
Anonymous
Not applicable

I don't get it.

So wiced_dct_read_wifi_config_section() read from DCT_WIFI_CONFIG_SECTION

and wiced_dct_write_wifi_config_section() write to DCT_SECURITY_SECTION.

How can it work?

0 Likes
Anonymous
Not applicable

Vik86, go and look at the corresponding read function. Then perhaps you'd like to reconsider your answer.

0 Likes

Andy, with in waf.c you are right the sections might be placed wrong, this is used within bootloader since its related to wiced application framework. But the api's that you need to refer are in

include/wiced_framework.h

wiced_dct_read_lock

wiced_dct_read_unlock

wiced_dct_write

here you have the option to point to any section of dct to read/write.

0 Likes
Anonymous
Not applicable

I don't have a problem any more. the code on MY machine has been fixed. But you've published the source, and I rather thought it would help others using your chips if the fix made its way back into the next version of the SDK, so that nobody else has the problem in future.