-
Notifications
You must be signed in to change notification settings - Fork 8.3k
soc: silabs: siwx91x: removed sscanf for nwp firmware version check #100168
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
Merged
kartben
merged 1 commit into
zephyrproject-rtos:main
from
Martinhoff-maker:cpp_minimla_sscanf_fix
Dec 1, 2025
+46
−28
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /* | ||
| * Copyright (c) 2025 Silicon Laboratories Inc. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /* This value needs to be updated when the Wiseconnect SDK (hal_silabs/wiseconnect) is updated | ||
| * Currently mapped to Wiseconnect SDK 3.5.2 | ||
| */ | ||
|
|
||
| #include <nwp_fw_version.h> | ||
|
|
||
| const sl_wifi_firmware_version_t siwx91x_nwp_fw_expected_version = { | ||
| .rom_id = 0x0B, | ||
| .major = 2, | ||
| .minor = 14, | ||
| .security_version = 5, | ||
| .patch_num = 2, | ||
| .customer_id = 0, | ||
| .build_num = 7, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking this because of it, but I'm still a bit confused by why you need this struct variable at all. Can't you just have stuff like:
And then in the version checking code you'd have stuff like
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I've done first. I don't have strong opinion between the 2 ways of doing this. I suggest to merge it like this and I will follow up with the hal change, or you can discuss about it with @jerome-pouiller.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern in the original PR was about the number of indirection layers to the real result (I wanted to drop either
expected_version, either the defines).In addition, I believe that exposing a structured data would make sense here (while the defines are only linked by the common prefix in their names).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jerome-pouiller if we did a direct comparison of two structs, that would indeed make a lot of sense. However, the code is doing component-by-component comparisons. Also:
Anyway, I don't want to get stuck on this issue, since it's more important to get the CI problems sorted out. We can sort out the rest in a follow-up PR like @Martinhoff-maker proposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern was redundancy between defines and
expected_versionvariable.Outside of that, I don't really mind.