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

Add hostap configuration build tests #79973

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Oct 17, 2024

Add tests that try to catch various hostap configuration issues by enabling different config options.
There are several build issue fixes in this PR, I will send them separately as the tests themselves might take some time to be ready for merge.

@jukkar jukkar requested a review from krish2718 October 17, 2024 08:29
@jukkar jukkar mentioned this pull request Oct 17, 2024
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch from f86ca9b to 9b3ec6a Compare October 17, 2024 13:15
jukkar added a commit to jukkar/zephyr that referenced this pull request Oct 18, 2024
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch from 9b3ec6a to c510b0b Compare October 18, 2024 07:31
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 18, 2024

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

Name Old Revision New Revision Diff
hostap zephyrproject-rtos/hostap@ac59d28 zephyrproject-rtos/hostap@e481fe5 (main) zephyrproject-rtos/hostap@ac59d287..e481fe55

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

@zephyrbot zephyrbot added manifest manifest-hostap DNM This PR should not be merged (Do Not Merge) labels Oct 18, 2024
jukkar added a commit to jukkar/zephyr that referenced this pull request Oct 18, 2024
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch 2 times, most recently from dd2aba3 to 7d2e8de Compare October 18, 2024 15:03
jukkar added a commit to jukkar/zephyr that referenced this pull request Oct 18, 2024
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The CONFIG_IEEE8021X_EAPOL was in the Kconfig file twice so
remove the extra entry.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The supplicant_ap_status() is only available if
CONFIG_WIFI_NM_HOSTAPD_AP is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The functions in ip-addr.c are needed in more places than just
for hostapd so add it unconditionally to the build.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The P2P support needs EAPOL support in order to avoid a compilation
error about missing eap field in wpa_ssid struct.

modules/lib/hostap/wpa_supplicant/wpa_supplicant.c:5102:65:
 error: ‘struct wpa_ssid’ has no member named ‘eap’
 5102 |      eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap)) {

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The code was missing ")" when checking crypto support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Without this there is an error

modules/lib/hostap/src/crypto/fips_prf_internal.c:47: \
    undefined reference to `SHA1Transform'

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE is enabled, there
are lot of missing functions reported during linking.
Add missing C files to the compilation to fix this.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Both the supplicant_set_btwt() and supplicant_ap_bandwidth() are
not found in Zephyr sources so remove them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The "enum wpa_msg_type" was not found by default so add needed
include files to get the definitions.

modules/hostap/src/supp_main.h:61:57: warning: ‘enum wpa_msg_type’
   declared inside parameter list will not be visible outside of
   this definition or declaration
   61 | void wpa_supplicant_msg_send(void *ctx, int level,
                                     enum wpa_msg_type type,
                                     const char *txt,

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Even if the enum contains the same values, the values might
change if the wpa_supplicant sources change or Zephyr values
change. In order to avoid weird errors later and prevent the
following warning, add a conversion functions for the enums.

modules/hostap/src/supp_api.c:1172:23: warning: implicit conversion
from enumeration type 'enum mfp_options' to different enumeration
type 'enum wifi_mfp_options' [-Wenum-conversion]
                status->mfp = ssid->ieee80211w; /* Same mapping */

modules/hostap/src/supp_api.c:1190:30: warning: implicit conversion
from enumeration type 'enum wpas_mode' to different enumeration
type 'enum wifi_iface_mode' [-Wenum-conversion]
                status->iface_mode = ssid->mode;

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Try to compile test wifi with various configuration combinations.
This is trying to catch simple compilation issues in the PRs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
jukkar added a commit to jukkar/zephyr that referenced this pull request Oct 21, 2024
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch from 7d2e8de to f979f5e Compare October 21, 2024 10:33
@jukkar jukkar marked this pull request as ready for review October 21, 2024 12:01
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 21, 2024
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch from 79da804 to dae8fc0 Compare October 22, 2024 07:42
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Oct 22, 2024
@jukkar
Copy link
Member Author

jukkar commented Oct 22, 2024

Needed to pick a commit from #80098 to fix the compilation error about missing Kconfig symbol. This is a side effect of applying PRs in hostap repo that need stuff from zephyr repo to function but those zephyr PRs were not yet merged.

jukkar and others added 2 commits October 22, 2024 10:48
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
WPA control interface timeout is hardcoded to 10s, add a configuration
option to remove the hardcode, this is needed sometimes as a workaround
e.g., crypto taking too long to complete the request.

Work around for zephyrproject-rtos#79834, increase the default from 10 to 15s, in positive
case this will have no impact.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
@jukkar jukkar force-pushed the devel/wifi-supplicant-config-tests branch from dae8fc0 to b852e86 Compare October 22, 2024 07:49
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 22, 2024
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
…ed twice

The CONFIG_IEEE8021X_EAPOL was in the Kconfig file twice so
remove the extra entry.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
The supplicant_ap_status() is only available if
CONFIG_WIFI_NM_HOSTAPD_AP is enabled.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
The functions in ip-addr.c are needed in more places than just
for hostapd so add it unconditionally to the build.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
The P2P support needs EAPOL support in order to avoid a compilation
error about missing eap field in wpa_ssid struct.

modules/lib/hostap/wpa_supplicant/wpa_supplicant.c:5102:65:
 error: ‘struct wpa_ssid’ has no member named ‘eap’
 5102 |      eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap)) {

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
Without this there is an error

modules/lib/hostap/src/crypto/fips_prf_internal.c:47: \
    undefined reference to `SHA1Transform'

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
If CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE is enabled, there
are lot of missing functions reported during linking.
Add missing C files to the compilation to fix this.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
Both the supplicant_set_btwt() and supplicant_ap_bandwidth() are
not found in Zephyr sources so remove them.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
The "enum wpa_msg_type" was not found by default so add needed
include files to get the definitions.

modules/hostap/src/supp_main.h:61:57: warning: ‘enum wpa_msg_type’
   declared inside parameter list will not be visible outside of
   this definition or declaration
   61 | void wpa_supplicant_msg_send(void *ctx, int level,
                                     enum wpa_msg_type type,
                                     const char *txt,

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
Even if the enum contains the same values, the values might
change if the wpa_supplicant sources change or Zephyr values
change. In order to avoid weird errors later and prevent the
following warning, add a conversion functions for the enums.

modules/hostap/src/supp_api.c:1172:23: warning: implicit conversion
from enumeration type 'enum mfp_options' to different enumeration
type 'enum wifi_mfp_options' [-Wenum-conversion]
                status->mfp = ssid->ieee80211w; /* Same mapping */

modules/hostap/src/supp_api.c:1190:30: warning: implicit conversion
from enumeration type 'enum wpas_mode' to different enumeration
type 'enum wifi_iface_mode' [-Wenum-conversion]
                status->iface_mode = ssid->mode;

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 pushed a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
…mbinations

Try to compile test wifi with various configuration combinations.
This is trying to catch simple compilation issues in the PRs.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
krish2718 added a commit to krish2718/sdk-zephyr that referenced this pull request Oct 22, 2024
…imeout

WPA control interface timeout is hardcoded to 10s, add a configuration
option to remove the hardcode, this is needed sometimes as a workaround
e.g., crypto taking too long to complete the request.

Work around for #79834, increase the default from 10 to 15s, in positive
case this will have no impact.

Upstream PR: zephyrproject-rtos/zephyr#79973

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
@henrikbrixandersen henrikbrixandersen merged commit 78f5821 into zephyrproject-rtos:main Oct 23, 2024
25 of 26 checks passed
henrikbrixandersen pushed a commit that referenced this pull request Oct 23, 2024
This is related to work on #79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@jukkar jukkar deleted the devel/wifi-supplicant-config-tests branch October 23, 2024 15:51
rlubos pushed a commit to rlubos/zephyr that referenced this pull request Oct 29, 2024
This is related to work on zephyrproject-rtos#79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 3cf8b09)
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.

NRF7002DK: Compile Errors Encountered While Activating Wi-Fi AP Mode
6 participants