-
Notifications
You must be signed in to change notification settings - Fork 10
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
Introduce SiWx917 Wifi driver #30
Conversation
6eb7be5
to
320ff53
Compare
I fixed the compliance with the CI. v2:
|
boards/silabs/radio_boards/siwx917_rb4338a/siwx917_rb4338a_defconfig
Outdated
Show resolved
Hide resolved
320ff53
to
d987833
Compare
v3:
|
d987833
to
d5e703b
Compare
v4:
|
@jerome-pouiller are you still planning to make some updates to this one, or should we just merge it? Until now I've left it to the PR author to merge once it's been approved. |
Nevermind - I realized we need to sort out the HAL PR first and once it's merged update the |
Btw, I suppose we may want the same kind of automation as upstream has wrt module tree PR references in west.yml, i.e. that we get a summary as a PR comment here as well as a "Do Not Merge" label which then prevents merging by mistake. |
v4:
|
70cd49e
to
acd5b85
Compare
v5:
|
acd5b85
to
9494dc7
Compare
v6:
|
9494dc7
to
8f15ec0
Compare
.github/workflows/build.yml
Outdated
@@ -44,3 +44,4 @@ jobs: | |||
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out" | |||
fi | |||
west twister --test sample.basic.helloworld -p siwx917_rb4338a -v --inline-logs $EXTRA_TWISTER_FLAGS | |||
west twister -T ../zephyr/samples -s sample.net.wifi -p siwx917_rb4338a -v --inline-logs -K $EXTRA_TWISTER_FLAGS |
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.
I don't think you need the -T ../zephyr/samples
part (the line above doesn't have it either), and let's be consistent with using either --test
or -s
but not mix of them.
.github/workflows/upstream-build.yml
Outdated
@@ -57,3 +57,4 @@ jobs: | |||
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out" | |||
fi | |||
west twister -T ../zephyr/samples -s sample.basic.helloworld -p siwx917_rb4338a -v --inline-logs $EXTRA_TWISTER_FLAGS | |||
west twister -T ../zephyr/samples -s sample.net.wifi -p siwx917_rb4338a -v --inline-logs -K $EXTRA_TWISTER_FLAGS |
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.
The -T ../zephyr/samples
is likely unnecessary, but that can be fixed separately as the line above also has the same issue.
* FIXME: Allow to configure size of buffer | ||
*/ | ||
uint8_t __aligned(4) siwx917_coprocessor_stack[10 * 1024]; | ||
static Z_DECL_ALIGN(struct _isr_list) Z_GENERIC_SECTION(.intList) __used __isr_siwx917_coprocessor_stack_irq = { |
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.
Can this be split into multiple lines? Compliance is failing due to the long line.
8f15ec0
to
d5cd3e1
Compare
v7:
|
drivers/wifi/siwx917/Kconfig.siwx917
Outdated
|
||
if WIFI_SIWX917 | ||
|
||
# WiseConnect create threads with realtime priority. Default (10kHz) clock tick |
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.
I've looked at implementing the OS timer using sleeptimer backed by sysrtc. This would tick at 1024 Hz, which is the same as FreeRTOS does in Wiseconnect. Is there a reason you needed to reduce it all the way to 100?
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.
I wrote that before you fixed the clock issues. I have just run some tests and it seems not true anymore.
d5cd3e1
to
6b69557
Compare
v8:
|
With WiseConnect 3.3, Network co-processor (aka NWP aka TA) needs an area of the M4 processor to store its stack. This is only required if the NWP is used (WiFi and Bluetooth). However, since NWP is likely to be used, this patch declare this area unconditionally. Note this requirement could be relaxed in the future versions of WiseConnect. Signed-off-by: Jérôme Pouiller <[email protected]>
6b69557
to
6ba907b
Compare
v9:
|
Introduce an empty shell to store upcoming driver for SiWG917 WiFi. Note we want to be able to use zephyr/samples/net/wifi. However, since we working in downstream, we can't add boards/siwx917_rb4338a.overlay. So, this patch enable WiFi on siwx917_rb4338a by default. Signed-off-by: Jérôme Pouiller <[email protected]>
iface_status() is a mandatory function to be recognized as a true WiFi driver by Zephyr framework. Signed-off-by: Jérôme Pouiller <[email protected]>
@jerome-pouiller do you want to try to fix the remaining compliance issues? Those will reoccur if/when this is submitted upstream, since we run the exact same checks, however there does exist the possibility for an override if there's a good justification. This will slow down the merge process however, so it's worth consider to just try to comply anyway. |
Scan feature has been tested using samples/net/wifi with the command "wifi scan". Signed-off-by: Jérôme Pouiller <[email protected]>
This patch as been successfully tested in unencrypted, WPA2 and WPA3-transitional (= SAE without mandatory MFP). I have had some issues with networks requiring MFP. This patch does not implement EAP and WEP authentication. This mainly because Zephyr does not describe the API to pass the credential. This patch does not support static IP configuration. However DHCPv4 works properly. On IPv6, I have not been able to configure IPv6 using SLAAC (it is not clear if WiseConnect 3.3 provide the feature). Signed-off-by: Jérôme Pouiller <[email protected]>
This implementation allows to take advantage of the specific features provided by the 917 (power consumption, speed, validation...). Some notable features are not available with this interface: - It seems Zephyr does not provide API to offload multicast membership management. User should be to directly call WiseConnect APIs - Support for ICMP frames is difficult. Note that WiseConnect automatically answer to ping request. It is just not possible to send ping requests and receive ping responses. - Zephyr and WiseConnect both support TLS offloading. However this patch does not implement it. - Reentrancy in the WiseConnect side is uncertain. This implementation has been tested with samples/net/wifi/ (which relies on subsys/net/lib/shell). Signed-off-by: Jérôme Pouiller <[email protected]>
Zephyr recv API requires to able to call the callback() asynchronously. This implementation is more intrusive than I would like. Especially, simultaneous access to fields fds_* does not seems bullet proof. Unfortunately, with the use of callbacks, the risk of deadlocks looks greater than the risk of data corruption. Signed-off-by: Jérôme Pouiller <[email protected]>
RSSI is easy to report. Signed-off-by: Jérôme Pouiller <[email protected]>
Board siwx917_rb4338a now supports WiFi. Let's ensure nobody is broken it. Signed-off-by: Jérôme Pouiller <[email protected]>
6ba907b
to
97e6df8
Compare
v10:
|
Downgrade ClangFormat errors to warnings. Signed-off-by: Johan Hedberg <[email protected]>
No description provided.