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

Hostap module glue code #64500

Merged
merged 10 commits into from
Jan 26, 2024

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Oct 27, 2023

This provides interface glue code to hostap module in modules/hostap directory. Crypto support is disabled.
The example native_sim based example / testing wifi driver is still WIP and is sent in a separate PR after this one is merged.

@jukkar jukkar added In progress For PRs: is work in progress and should not be merged yet. For issues: Is being worked on area: Networking area: Wi-Fi Wi-Fi labels Oct 27, 2023
@zephyrbot zephyrbot added manifest manifest-hostap DNM This PR should not be merged (Do Not Merge) labels Oct 27, 2023
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 27, 2023

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hostap zephyrproject-rtos/hostap@7adaff2 zephyrproject-rtos/hostap@dee924c (main) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@jukkar
Copy link
Member Author

jukkar commented Nov 21, 2023

This update adds scanning support.

@jukkar
Copy link
Member Author

jukkar commented Dec 8, 2023

Added initial wifi connect support. The connection is initiated but something is still wrong as the connection status is not set properly.

@MaochenWang1
Copy link
Contributor

Hi @jukkar , I am from NXP wifi team, when will you merge these wpa-supplicant changes into Zephyr?

@jukkar
Copy link
Member Author

jukkar commented Jan 10, 2024

I am from NXP wifi team, when will you merge these wpa-supplicant changes into Zephyr?

We would like to get more feedback from people about the PR. But if everything looks ok (please give feedback here), I can certainly start to prepare a version that is suitable for merging. There is the related PR at zephyrproject-rtos/hostap#2 that has the hostap changes also waiting a review.

So I will most probably remove the native_sim wifi testing driver from this PR as it requires still more work and I can send it separately after the wpa_supplicant is merged.

@jukkar
Copy link
Member Author

jukkar commented Jan 11, 2024

Prepared a new version fixing CI. Also removed the native_sim wifi driver as it requires more work and can be submitted separately.

@jukkar jukkar force-pushed the hostap-add-mgmt-thread branch 4 times, most recently from c2e7644 to 1c6d8f2 Compare January 11, 2024 14:20
@jukkar jukkar marked this pull request as ready for review January 11, 2024 15:07
@jukkar jukkar removed In progress For PRs: is work in progress and should not be merged yet. For issues: Is being worked on DNM This PR should not be merged (Do Not Merge) labels Jan 11, 2024
@jukkar jukkar changed the title Hostap add mgmt thread Hostap module glue code Jan 11, 2024
@jukkar jukkar added the DNM This PR should not be merged (Do Not Merge) label Jan 11, 2024
@jukkar
Copy link
Member Author

jukkar commented Jan 11, 2024

I accidentally removed the DNM label as the corresponding hostap PR needs to be merged first, so adding it back.

modules/hostap/src/supp_main.c Outdated Show resolved Hide resolved
modules/hostap/src/supp_main.c Outdated Show resolved Hide resolved
modules/hostap/Kconfig Outdated Show resolved Hide resolved
modules/hostap/Kconfig Outdated Show resolved Hide resolved
@jukkar
Copy link
Member Author

jukkar commented Jan 15, 2024

@dleach02 (or someone from NXP), please take a look.

@jukkar
Copy link
Member Author

jukkar commented Jan 18, 2024

  • Removed commented out Kconfig options. They will be added properly later.

krish2718
krish2718 previously approved these changes Jan 23, 2024
dleach02
dleach02 previously approved these changes Jan 25, 2024
krish2718 and others added 10 commits January 26, 2024 09:03
Add new files from hostap to Zephyr build.
Add wifi mgmt thread that communicates with supplicant.

Signed-off-by: Chaitanya Tata <[email protected]>
Signed-off-by: Jukka Rissanen <[email protected]>
New hostap version available.

Signed-off-by: Jukka Rissanen <[email protected]>
There is no need to hide the wpa_supplicant interface
struct so add it directly to net_wifi_mgmt_offload struct.

Signed-off-by: Jukka Rissanen <[email protected]>
Changed the names of the API functions between wpa_supplicant
and Zephyr upper layers. For example replaced the z_ prefix
by zephyr_ as the z_ is only meant for internal kernel
functions.

Changed the wpa_supplicant startup so that we do not poll
but wait the network interface add event which then adds
the network interfaces to the supplicant.

Signed-off-by: Jukka Rissanen <[email protected]>
Tweaked the code to be more readable and align to
Zephyr coding style.

Signed-off-by: Jukka Rissanen <[email protected]>
If the DHCPv4 is disabled, then avoid linking warning about
missing DHCPv4 functions. Also include dhcpv4.h so that the
DHCPv4 function prototypes are found by the zephyr supplicant
driver.

Signed-off-by: Jukka Rissanen <[email protected]>
Zephyr requires that the name of the variable is not the
same as the struct as seen by this warning:

modules/hostap/src/supp_api.c:64:WARNING:
  Violation to rule 5.7 (Tag name should be unique)
  tag: wpa_supp_api_ctrl

Signed-off-by: Jukka Rissanen <[email protected]>
Zephyr compliance checker does not like macros that have control
structures like goto. So change the macro to align with this rule.
Also rename the macro and remove the __ prefix as it not needed.

Signed-off-by: Jukka Rissanen <[email protected]>
Compliance checker does not allow compile definitions without
a Kconfig option. So add dummy values for time being. These should
be removed at some point and replaced with properly namespaced
options.

Signed-off-by: Jukka Rissanen <[email protected]>
Some crypto Kconfig options were commented out, so remove them.
These will be re-introduced later when adding crypto support
properly.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar
Copy link
Member Author

jukkar commented Jan 26, 2024

manifest file changed as the hostap module was updated

@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Jan 26, 2024
@fabiobaltieri fabiobaltieri merged commit 64423e2 into zephyrproject-rtos:main Jan 26, 2024
22 of 23 checks passed
@jukkar jukkar deleted the hostap-add-mgmt-thread branch January 28, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants