From b3525dc1729030b0a51f787f89dd9a879930d23a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 3 Jan 2020 13:22:32 +0200 Subject: [PATCH] P2P Manager: Use send_mlme() instead of send_frame() for Deauthentication send_frame() is documented to be used for "testing use only" and as such, it should not have used here for a normal production functionality. Replace this with use of send_mlme() which is already used for sending Deauthentication frames in other cases. Signed-off-by: Jouni Malinen --- src/ap/ctrl_iface_ap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index 9fd1b81a2..73238f2c5 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -462,9 +462,6 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, int ret; u8 *pos; - if (!hapd->drv_priv || !hapd->driver->send_frame) - return -1; - mgmt = os_zalloc(sizeof(*mgmt) + 100); if (mgmt == NULL) return -1; @@ -498,8 +495,7 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, pos += 2; *pos++ = minor_reason_code; - ret = hapd->driver->send_frame(hapd->drv_priv, (u8 *) mgmt, - pos - (u8 *) mgmt, 1); + ret = hostapd_drv_send_mlme(hapd, mgmt, pos - (u8 *) mgmt, 0); os_free(mgmt); return ret < 0 ? -1 : 0;