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

hostapd: fix hostap enable fail during stress test #78826

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

GaofengZhangNXP
Copy link
Contributor

@GaofengZhangNXP GaofengZhangNXP commented Sep 23, 2024

1.everytime ap wpa3 sae enable command will increase the sae_passpharse list of config_bss, and sae_derive_pt will derive all sae pt in the sae_passpharse list, every sae derive pt spend 100ms.
2.with the time going, the sae_passpharse list has more sae, and the time to derive pt for sae will become long, sae_derive_pt will held cpu and doesn't sleep.
3.hostapd task prio is 3, and imu task is 3, hostapd task run before imu task, when the imu interrupt arrive and wake up the imu task, imu task can't run,
4.hostapd task is deriving pt for every sae in the sae_passpharse list. imu task can't run and sleep rwlock can't be release, sleep rwlock timeout is 3s, when derive pt spend over 3s, wlcmgr task waiting command resp on sleep rwlock will assert and hang.

@zephyrbot zephyrbot added the area: Wi-Fi Wi-Fi label Sep 23, 2024
@GaofengZhangNXP GaofengZhangNXP force-pushed the gaofeng_main_local2 branch 2 times, most recently from ca3efe5 to 40137c7 Compare September 23, 2024 08:40
1.everytime ap wpa3 sae enable command will increase the sae_passpharse
list of config_bss, and sae_derive_pt will derive all sae pt in the
sae_passpharse list, every sae derive pt spend 100ms.
2.with the time going, the sae_passpharse list has more sae, and the
time to derive pt for sae will become long, sae_derive_pt will held
cpu and doesn't sleep.
3.hostapd task prio is 3, and imu task is 3, hostapd task run before
imu task, when the imu interrupt arrive and wake up the imu task, imu
task can't run,
4.hostapd task is deriving pt for every sae in the sae_passpharse
list. imu task can't run and sleep rwlock can't be release, sleep
rwlock timeout is 3s, when derive pt spend over 3s, wlcmgr task
waiting command resp on sleep rwlock will assert and hang.

Signed-off-by: Gaofeng Zhang <[email protected]>
@GaofengZhangNXP GaofengZhangNXP changed the title zephyr: hostap: fix hostap enable fail during stress test hostap: fix hostap enable fail during stress test Sep 23, 2024
@GaofengZhangNXP GaofengZhangNXP changed the title hostap: fix hostap enable fail during stress test zephyr: fix hostap enable fail during stress test Sep 29, 2024
@GaofengZhangNXP GaofengZhangNXP changed the title zephyr: fix hostap enable fail during stress test hostapd: fix hostap enable fail during stress test Sep 29, 2024
Copy link
Collaborator

@krish2718 krish2718 left a comment

Choose a reason for hiding this comment

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

IIUC, the fix here is to reload the configuration?

@GaofengZhangNXP
Copy link
Contributor Author

GaofengZhangNXP commented Nov 13, 2024

IIUC, the fix here is to reload the configuration?

yes, need to reload hostapd config, if we doesn't clear old hostapd config, some parameter will be saved in first hostapd start and run some unnecessary steps and result in hostapd enable fail. for example, sae_passpharse list of config_bss will be save in first hostapd start, and will run sae_derive_pt for first sae_passpharse in next hostapd start.

@GaofengZhangNXP
Copy link
Contributor Author

@jukkar please help review the patch, if you have not any other suggestion, please help merge it, thanks very much.

@kartben kartben merged commit ae7e852 into zephyrproject-rtos:main Dec 12, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants