-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
base: main
Are you sure you want to change the base?
Conversation
…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]>
This commit links the hostap PR required for the nrf7002 driver. west.yml is updated Signed-off-by: Hanan Arshad <[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]>
This commit adds the second wlan in dts file for nrf70. Also adjusts the sockets count required for wpa supplicant sockets Signed-off-by: Hanan Arshad <[email protected]>
@krish2718 |
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Thanks, hopefully the tests will go through now. |
|
@@ -21,8 +28,20 @@ static int cmd_wpa_cli(const struct shell *sh, | |||
size_t argc, | |||
const char *argv[]) | |||
{ | |||
struct net_if *iface = net_if_get_first_wifi(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern is, if there are 2 virtual interfaces, then how to run wpa_cli
cmd on the second interface, since you get the iface
by net_if_get_first_wifi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate pr can be created to specify interface index in wpa cli.
This change is added to make the wpa cli compatible with new wpa supplicant changes as ctrl_conn is now associated with wpa_s object
I did some testing and here's my feedback. BTW, how are you testing this PR? Are you testing on a nRF7002DK? Have you tested a working STA + AP? I see that the right after flashing the second VIF fails to be initialized?
Earlier feedback is not implemented: #86618 (comment)
New issues
See attached patch with all fixes. (renamed as .patch isn't allowed in GH) Build with recovery disabled (as I mentioned earlier, this doesn't work):
We are quite close now, if you can submit the above fixes this PR can be merged for upcoming 4.2 (before RC1 on 27th June). |
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.