From 2c70b7d0b4adbcfc8a9e178edea4503b61f23d2c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 19 Apr 2020 16:38:29 +0300 Subject: [PATCH] Do not open l2_packet(EAPOL) for receive unnecessarily If the driver supports control port for EAPOL RX, do not register l2_packet for RX to minimize unnecessary operation load. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 5703319d2..50478c11e 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -4777,7 +4777,9 @@ int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s) wpa_s->l2 = l2_packet_init(wpa_s->ifname, wpa_drv_get_mac_addr(wpa_s), ETH_P_EAPOL, - wpa_supplicant_rx_eapol, wpa_s, 0); + wpas_eapol_needs_l2_packet(wpa_s) ? + wpa_supplicant_rx_eapol : NULL, + wpa_s, 0); if (wpa_s->l2 == NULL) return -1;