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

WiFi: allow to use Zephyr native stack #47

Merged
merged 7 commits into from
Oct 15, 2024

Conversation

jerome-pouiller
Copy link
Contributor

This PR is associated to SiliconLabsSoftware/hal_silabs#8. However, hal_silabs changes are not required for the zephyr-silabs changes.

@jerome-pouiller
Copy link
Contributor Author

v2:

  • Fix errors reported by the CI

/*
* Copyright (c) 2024 Silicon Laboratories Inc.
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use Apache-2.0 for this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use Apache-2.0 for this?

That's indeed a fair question, and if it's not possible to use anything else (at least in the short term), seems like hal_silabs may be a better place for it? It'd be good to keep the code in zephyr-silabs upstreamable at least from a license perspective.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a Zephyr implementation that merely uses the Wiseconnect API, I can't think of anything that should block this from having a Zephyr friendly license, even if Wiseconnect iself hasn't been relicensed yet.

/*
* Copyright (c) 2024 Silicon Laboratories Inc.
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use Apache-2.0 for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad habits. I will fix that tomorrow.

/*
* Copyright (c) 2024 Silicon Laboratories Inc.
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use Apache-2.0 for this?

@jerome-pouiller
Copy link
Contributor Author

v3:

  • Fix License

WPA3 relies on 802.11w that was not enabled.

Signed-off-by: Jérôme Pouiller <[email protected]>
Zephyr only saves a pointer to the memory area provided to
net_if_set_link_addr(). So the MAC address has to be stored in a static
area (while it was stored in the stack).

Signed-off-by: Jérôme Pouiller <[email protected]>
siwx917_wifi.c is currently pretty large while a big part is in fact
only used to manage socket API. Split out the socket management and only
keep 802.11 management in siwx917_wifi.c.

This commit do not introduce any change in the code. The code is only
relocated.

Signed-off-by: Jérôme Pouiller <[email protected]>
We try to avoid #ifdef when possible, especially in .c files.

Signed-off-by: Jérôme Pouiller <[email protected]>
This new mode allows a better compatibility with Zephyr features.
Support for offloading is still supported since it can provide better
performances in some cases (power and memory consumption).

Signed-off-by: Jérôme Pouiller <[email protected]>
Since SiWx917 is able to use natice network stack, some NWP features are
not needed anymore.

This commit also try to keep WiFi features inside the "#ifdef
CONFIG_WIFI_SIWX917" statement.

Signed-off-by: Jérôme Pouiller <[email protected]>
Some #ifdef can be easily changed in IS_ENABLED().

Signed-off-by: Jérôme Pouiller <[email protected]>
@jhedberg jhedberg merged commit 5b9ea24 into SiliconLabsSoftware:main Oct 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants