From ccaabeaa036c74d3f93635ab53409a44b3a295b2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 5 Jan 2020 18:32:10 +0200 Subject: [PATCH] driver: Remove unused send_ether() driver op This was used only for FT RRB sending with driver_test.c and driver_test.c was removed more than five years ago, so there is no point in continuing to maintain this driver op. Signed-off-by: Jouni Malinen --- src/ap/wpa_auth_glue.c | 8 +------- src/drivers/driver.h | 13 ------------- src/drivers/driver_none.c | 8 -------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index dbe6a8c88..c523f20f3 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -639,10 +639,6 @@ static int hostapd_wpa_auth_send_ether(void *ctx, const u8 *dst, u16 proto, } #endif /* CONFIG_IEEE80211R_AP */ - if (hapd->driver && hapd->driver->send_ether) - return hapd->driver->send_ether(hapd->drv_priv, dst, - hapd->own_addr, proto, - data, data_len); if (hapd->l2 == NULL) return -1; @@ -1398,9 +1394,7 @@ int hostapd_setup_wpa(struct hostapd_data *hapd) hapd->conf->iface; hapd->l2 = l2_packet_init(ft_iface, NULL, ETH_P_RRB, hostapd_rrb_receive, hapd, 1); - if (hapd->l2 == NULL && - (hapd->driver == NULL || - hapd->driver->send_ether == NULL)) { + if (!hapd->l2) { wpa_printf(MSG_ERROR, "Failed to open l2_packet " "interface"); return -1; diff --git a/src/drivers/driver.h b/src/drivers/driver.h index f1027c08e..08c82a0fb 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -3114,19 +3114,6 @@ struct wpa_driver_ops { */ int (*commit)(void *priv); - /** - * send_ether - Send an ethernet packet (AP only) - * @priv: private driver interface data - * @dst: Destination MAC address - * @src: Source MAC address - * @proto: Ethertype - * @data: EAPOL packet starting with IEEE 802.1X header - * @data_len: Length of the EAPOL packet in octets - * Returns: 0 on success, -1 on failure - */ - int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto, - const u8 *data, size_t data_len); - /** * set_radius_acl_auth - Notification of RADIUS ACL change * @priv: Private driver interface data diff --git a/src/drivers/driver_none.c b/src/drivers/driver_none.c index 6ff3eae6c..ccd2d9da7 100644 --- a/src/drivers/driver_none.c +++ b/src/drivers/driver_none.c @@ -43,13 +43,6 @@ static void none_driver_hapd_deinit(void *priv) } -static int none_driver_send_ether(void *priv, const u8 *dst, const u8 *src, - u16 proto, const u8 *data, size_t data_len) -{ - return 0; -} - - static void * none_driver_init(void *ctx, const char *ifname) { struct none_driver_data *drv; @@ -79,7 +72,6 @@ const struct wpa_driver_ops wpa_driver_none_ops = { .desc = "no driver (RADIUS server/WPS ER)", .hapd_init = none_driver_hapd_init, .hapd_deinit = none_driver_hapd_deinit, - .send_ether = none_driver_send_ether, .init = none_driver_init, .deinit = none_driver_deinit, };