-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: wifi: nrf7002: Add support for multiple virtual interfaces #91916
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
Conversation
@krish2718 |
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Thanks, hopefully the tests will go through now. |
|
6c6bbe4
to
8b1f3b9
Compare
@MaochenWang1 I have done local testing including |
837d57a
to
c6bbd69
Compare
c6bbd69
to
2e2d2eb
Compare
2e2d2eb
to
8763d12
Compare
…VIFs) Description: The nRF7002 firmware supports two virtual interfaces (VIFs) that can operate in different modes (e.g., AP and STA). However, the existing Zephyr driver only utilizes a single VIF, preventing full multi-interface support. This commit extends the nRF7002 driver to support multiple VIFs by making the following modifications: * The driver already contains an array of vif_ctx_zep, but only the first item was being used. Now, a second Ethernet device is registered using vif_ctx_zep[1], enabling multi-VIF operation. * Introduced vif_ctx_cnt to keep track of active interfaces and manage their state effectively. * Ensured that FMAC (Firmware MAC) is initialized only once, avoiding redundant initializations when multiple VIFs are present. * The UMAC control commands previously did not associate responses with the issuing VIF. A queue is now introduced to track the originating VIF for each command and correctly route the response event to the corresponding interface. Signed-off-by: Hanan Arshad <[email protected]> Signed-off-by: Chaitanya Tata <[email protected]>
This commit links the hostap PR required for the nrf7002 driver. west.yml is updated Signed-off-by: Hanan Arshad <[email protected]> Signed-off-by: Chaitanya Tata <[email protected]>
Update WPA supplicant functions to pass the control channel (socket) as a parameter instead of relying on a global socket. This change aligns with the PR 80 modifications in hostap repo and ensures that each Virtual Interface (VIF) uses its dedicated control channel for communication. Signed-off-by: Hanan Arshad <[email protected]> Signed-off-by: Chaitanya Tata <[email protected]>
Add second virtual interface by default to the DTS. Signed-off-by: Chaitanya Tata <[email protected]>
In case STA + AP mode is enabled, then adjust the defaults to accomodate the second interface. Signed-off-by: Chaitanya Tata <[email protected]>
To handle the dual mode usage (STA + AP) increase the heap and stack size. Signed-off-by: Chaitanya Tata <[email protected]>
If the usage mode has AP, then automatically enable AP mode. Signed-off-by: Chaitanya Tata <[email protected]>
Move the VIF initialization to top to do it for both VIFs, this fixes a crash when scanning on the 2nd VIF. Signed-off-by: Chaitanya Tata <[email protected]>
Fixes second interface bring up failure. Signed-off-by: Chaitanya Tata <[email protected]>
For hostapd also use per-interface control connection like we do for supplicant. Signed-off-by: Chaitanya Tata <[email protected]>
Now that we support multiple VIFs, need to add argument for the interface for any command. Signed-off-by: Chaitanya Tata <[email protected]>
8763d12
to
e88d4df
Compare
|
Description:
The nRF7002 firmware supports two virtual interfaces (VIFs) that can operate in different modes (e.g., AP and STA). However, the existing Zephyr driver only utilizes a single VIF, preventing full multi-interface support.
This PR extends the nRF7002 driver to support multiple VIFs by making the following modifications:
Testing:
Verified that two virtual interfaces can be registered and operate simultaneously.
Tested AP mode on one VIF and STA mode on another VIF concurrently.
Ensured that UMAC command responses are correctly matched to their respective VIFs.
Dependencies:
This PR depends on the corresponding hostap PR, which introduces multiple control channels in WPA supplicant to handle separate interfaces.