]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Simplify hapd_send_eapol() with monitor interface
authorJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 10:08:58 +0000 (12:08 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 10:08:58 +0000 (12:08 +0200)
Call nl80211_send_monitor() directly instead of going through
wpa_driver_nl80211_send_frame() for the case where monitor interface is
used for AP mode management purposes. drv->use_monitor has to be 1 in
this code path, so wpa_driver_nl80211_send_frame() was calling
nl80211_send_monitor() unconditionally for this code path and that extra
function call can be removed here to simplify the implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index 998b3948b4e3f954f430189b6cde6525a7c377c8..87656147b4761114d80ab36c83716e69cc18b57d 100644 (file)
@@ -5190,8 +5190,7 @@ static int wpa_driver_nl80211_hapd_send_eapol(
        pos += 2;
        memcpy(pos, data, data_len);
 
-       res = wpa_driver_nl80211_send_frame(bss, (u8 *) hdr, len, encrypt, 0,
-                                           0, 0, 0, 0, NULL, 0);
+       res = nl80211_send_monitor(drv, hdr, len, encrypt, 0);
        if (res < 0) {
                wpa_printf(MSG_ERROR, "i802_send_eapol - packet len: %lu - "
                           "failed: %d (%s)",