RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi, We are implementing WPA2-Enterprise / IEEE 802.1X on an RW612-based product using Zephyr 4.3 and Hostap/wpa_supplicant. Initial authentication works correctly with both PEAP/MSCHAPv2 and EAP-TLS. EAP-TLS also works with a PSA/ELS-backed non-exportable private key. We see a problem specifically during Wi-Fi in-place reauthentication. Observed sequence: RADIUS Access-Accept → EAP success → 4-way handshake → AP retransmits Message 3 → Wi-Fi link is lost → device reconnects and authenticates successfully again Our current evidence suggests a possible ordering issue between transmission of the final EAPOL-Key response and installation of the new PTK. The PTK update appears able to proceed while the final EAPOL frame may still be queued for transmission. We tried to find a supported mechanism to guarantee: final EAPOL-Key frame transmission completed BEFORE new PTK installation However, we could not find an EAPOL TX-completion callback, TX queue drain/fence, or equivalent API in the RW612 Wi-Fi driver/firmware path. As a diagnostic experiment only, adding a 100 ms delay before PTK installation allowed several PEAP and EAP-TLS reauthentication attempts to complete without interruption. We do not consider a fixed delay to be a production solution. Could you please clarify: - Is there a supported API to know when an EAPOL data frame has actually been transmitted by the firmware? - Is there a TX queue flush/drain or key-install fence that should be used before updating PTK? - Is this a known limitation or known issue in the RW612 Wi-Fi driver/firmware? - Is there a newer driver or Wi-Fi firmware version that addresses this? Tested versions: RW612 driver: v1.3.r52.z_up.p11 Wi-Fi firmware: 18.99.6.p47 We can provide detailed traces and a vendor issue package if needed. Thanks. RW612 Re: RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi @sukrusinan, hope you are doing well.
To get a better understanding on your setup and case scenario, could you please share the following information?
Share the used base example for your application. Is it Zephyr Wi-Fi Shell?
Has this setup worked before as-is? If it has, could you please share which modifications were implemented?
Provide terminal logs from a failing authentication case.
What are you using as RADIUS server?
What AP model are you using?
Are you able to reproduce this behavior on Zephyr latest version (4.4.2)?
Please let us know the requested information. Re: RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi @RomanVR , Thanks for your reply. Please find the requested information below. 1. Base application This is a custom Zephyr application for an NXP RW612-based device. It is not based directly on the Zephyr Wi-Fi Shell sample. It uses: standard Zephyr Wi-Fi management APIs Hostap/wpa_supplicant the NXP RW612 Wi-Fi driver The standard Wi-Fi shell and wpa_cli are enabled only for diagnostics. 2. Has the setup worked before? Initial WPA2-Enterprise authentication works correctly with both: PEAP/MSCHAPv2 EAP-TLS Reboot and reconnect also work. The issue is specifically Wi-Fi in-place reauthentication. Seamless in-place reauthentication has not worked reliably with the current setup. In the failing case: initial authentication succeeds
-> RADIUS Access-Accept
-> EAP succeeds
-> in-place reauthentication is triggered
-> Wi-Fi link is lost
-> IPv4 is removed
-> device reconnects automatically
-> authentication and connectivity recover We consider this a FAIL because the network connection is interrupted during reauthentication. The issue has been reproduced with both PEAP/MSCHAPv2 and EAP-TLS. 3. Terminal logs Attached are sanitized terminal captures for: PEAP/MSCHAPv2 reauthentication failure EAP-TLS reauthentication failure The captures contain no credentials, keys, internal addresses, SSIDs, MAC addresses, or private certificate information. At the current log level, per-frame EAPOL TX completion and detailed PTK installation timing are not available. 4. RADIUS server FreeRADIUS running on Ubuntu. 5. Access point Ubiquiti UniFi U6 Pro using WPA2-Enterprise. 6. Zephyr 4.4.2 We have not yet performed a hardware test with Zephyr 4.4.2. We created an isolated checkout of the official v4.4.2 source. However, our current integration contains version-pinned Zephyr/Hostap adapters, and these patches do not apply cleanly to 4.4.2. Therefore, changing only ZEPHYR_BASE would not provide a valid comparison. The integration must first be ported to the 4.4.2 Hostap and NXP HAL revisions before we can perform a meaningful hardware A/B test. We have attached a short note with the exact result of this check. Current tested versions: Zephyr: 4.3.0 based
Hostap: 2.11
NXP Wi-Fi driver: v1.3.r52.z_up.p11
Wi-Fi firmware: 18.99.6.p47 We would also appreciate guidance on the following point: Does the RW612 Wi-Fi driver/firmware provide a supported mechanism to guarantee completion of an EAPOL-Key frame transmission before a subsequent PTK/key update? In particular, is there a supported: EAPOL/data TX completion callback, TX queue drain or flush, firmware synchronization/fence, or documented key-update ordering guarantee? We are trying to determine whether such a mechanism already exists in the RW612 stack or whether this behavior requires a driver/firmware correction. The attached logs only demonstrate the link interruption after successful in-place EAP authentication; they do not by themselves establish the internal firmware root cause. Best Regards Re: RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi @sukrusinan, thank you for sharing additional details.
The information provided helps understand the conditions under which the behavior occurs. Since the application is fully custom, it becomes complex for us to debug and analyze the problem, hence, it would be very helpful if you could confirm if this behavior can be reproduced in a simpler example and how to do it, in order to reproduce it on our side.
Additionally, in order to narrow down the root cause, could you please check or confirm whether the same application in RW612 reproduce the reported behavior with another access point?
To investigate further, if possible, could you please share the following logs:
AP (Ubiquiti) logs showing the reauthentication and 4-way-handshake exchange.
An independent over-the-air capture of a failing attempt with a sniffer.
This information would help us determine whether the RW612 stack’s EAPOL TX-completion or key-update ordering behavior should be evaluated further.
Re: RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi, Thanks for your suggestions. We have made some progress and can now reproduce the issue in a minimal Zephyr PEAP/MSCHAPv2 application on the same RW612 hardware, with the unrelated product services removed. Our setup: Zephyr 4.3.0 / Hostap 2.11 NXP Wi-Fi driver v1.3.r52.z_up.p11 Radio firmware 18.99.6.p47 UniFi U6 Pro / FreeRADIUS Initial PEAP authentication works correctly, including RADIUS Access-Accept, DHCP and ping. However, in-place reauthentication receives another Access-Accept and then drops the Wi-Fi link before eventually reconnecting. We investigated the timing between EAPOL-Key transmission and pairwise key installation. Using the minimal application, we performed an A/B/A/B test with continuous ICMP monitoring (250 ms intervals), starting before reauthentication. Configuration Ping replies Link interruption 0 ms delay, attempt 1 131/288 27.844 s 100 ms delay, attempt 1 288/288 None observed 0 ms delay, attempt 2 159/288 27.840 s 100 ms delay, attempt 2 288/288 None observed The 100 ms delay was introduced before the subsequent pairwise key-install request. This suggests a timing-sensitive interaction, but we don't consider a fixed delay a proper solution. We also collected UniFi AP-side EAPOL logs and an independent OTA capture from an earlier EAP-TLS reauthentication failure. The OTA capture shows M4 transmitted from the station to the AP (key-info 0x030a, replay counter 4). However, we cannot confirm whether the AP received or accepted it, and the sniffer's AP-side coverage is incomplete. We investigated the newer r54 driver with its matching firmware, but the port is currently blocked by Hostap scheduled-scan and ROC/cookie API incompatibilities, so we haven't tested it on hardware. Could you help clarify a few points? Is there a supported mechanism to ensure EAPOL-Key TX completion before installing the new pairwise key? Are there any known reauthentication or key-update issues with our current driver/firmware versions? Which RW612 driver, firmware and Zephyr/Hostap combination would you recommend? Is there an updated version or patch addressing this behavior? Are there firmware traces or callbacks available to verify EAPOL TX completion and key-installation status? Testing with another AP vendor is still pending. I've attached a ZIP containing the minimal application test results, AP-side EAPOL summaries, RADIUS events and independent OTA capture findings. The captures and AP logs are from separate test sessions, as described in the README. We can also share the minimal reproducer source and raw captures privately if needed. Our main goal is to identify a reliable fix for seamless Wi-Fi reauthentication. Re: RW612 WPA2-Enterprise reauthentication – EAPOL TX completion before PTK installation Hi @sukrusinan, sorry for the late reply.
Thank you for sharing the logs, after reviewing them, the following points are needed in order to narrow down the root cause of the authentication failure:
Test with a different AP: This will help determine if the reauthentication failure can be reproduced on a different AP, which would help isolate the watched behavior.
Synchronized OTA capture during the PEAP failure: The OTA excerpt you shared is from a separate EAP-TLS session and cannot be correlated with the PEAP AP log. This would help to analyze if the AP is rejecting the M4 due to being in an invalid format for the AP.
Minimal reproducer: Could you please share the steps to reproduce the behavior in a minimal Zephyr application? This would help to try to reproduce it on our end.
Regarding your questions:
It is suggested to always work on the latest Zephyr version and test on downstream repository (add link) for potential bug fixes not available on Zephyr main repository.
Regarding software mechanisms, we would still need to be able to determine if this behavior is present with a different AP. Therefore, while you are able to perform a test with a different AP vendor, please try enabling the following debug logs on your side, as it will provide a better insight on the STA side:
CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_DBG
CONFIG_WIFI_NM_WPA_SUPPLICANT_DEBUG_LEVEL
Please let us know your findings as per the requested tests.
View full article