-
Notifications
You must be signed in to change notification settings - Fork 21
[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
base: main
Are you sure you want to change the base?
Conversation
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 |
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.
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 |
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.
#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; |
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.
why use nrf_wifi_vif_ctx_zep
struct here?
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.
oops, local change, will fix it. Thanks.
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 |
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.
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).
In Zephyr we can leverage using direct function call instead of socket send this gives us: