Skip to content

[noup] l2_packet: Implement a direct function call option #95

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krish2718
Copy link
Collaborator

In Zephyr we can leverage using direct function call instead of socket send this gives us:

  • Faster time to send EAPoL OTA
  • Ability to handle M4 vs set_key race
  • Handle rekeying effectively in presence of traffic

In Zephyr we can leverage using direct function call instead of socket
send this gives us:

 * Faster time to send EAPoL OTA
 * Ability to handle M4 vs set_key race
 * Handle rekeying effectively in presence of traffic

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
@@ -2532,14 +2533,27 @@ int wpa_drv_hapd_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t d

wpa_printf(MSG_DEBUG, "hostapd: Send EAPOL frame (encrypt=%d)", encrypt);

/* Try to use driver operation for high-priority transmission */
dev_ops = get_dev_ops(if_ctx->dev_ctx);
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you add CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT related change inside l2_packet_send, then all the changes before l2_packet_send are not needed, right?

@@ -351,6 +351,15 @@ struct zep_wpa_supp_dev_ops {
int (*cancel_remain_on_channel)(void *priv);
int (*get_inact_sec)(void *if_priv, const u8 *addr);
void (*send_action_cancel_wait)(void *priv);

#ifdef CONFIG_NRF70_L2_PACKET
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#ifdef CONFIG_NRF70_L2_PACKET
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT

#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT
if (dev_ops && dev_ops->send_l2_packet) {
/* Get device private data from the interface context */
struct nrf_wifi_vif_ctx_zep *vif_ctx_zep = device->data;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why use nrf_wifi_vif_ctx_zep struct here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops, local change, will fix it. Thanks.

@MaochenWang1
Copy link
Collaborator

This change is only related to TX direction, what about eapol RX?

@krish2718
Copy link
Collaborator Author

This change is only related to TX direction, what about eapol RX?

Good point, let me see if I can do the same for RX too. Thanks.

return -1;
}

#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe protect the entire set of changes (i.e. starting from line 55) with CONFIG_WIFI_NM_WPA_SUPPLICANT_L2_PKT_DIRECT ?

(Same comment for changes in other functions too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants