]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
IBSS RSN: Use send_mlme() instead of send_frame() for Authentication frames
authorJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 10:21:36 +0000 (12:21 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 10:21:36 +0000 (12:21 +0200)
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 Authentication frames in number of other cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ibss_rsn.c

index 36c0aff17374b196c888cec9f9577034bc01d68a..48dd66b126a844a6ceac48ebdc56e266d23db05d 100644 (file)
@@ -487,9 +487,6 @@ static int ibss_rsn_send_auth(struct ibss_rsn *ibss_rsn, const u8 *da, int seq)
        const size_t auth_length = IEEE80211_HDRLEN + sizeof(auth.u.auth);
        struct wpa_supplicant *wpa_s = ibss_rsn->wpa_s;
 
-       if (wpa_s->driver->send_frame == NULL)
-               return -1;
-
        os_memset(&auth, 0, sizeof(auth));
 
        auth.frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
@@ -505,8 +502,7 @@ static int ibss_rsn_send_auth(struct ibss_rsn *ibss_rsn, const u8 *da, int seq)
        wpa_printf(MSG_DEBUG, "RSN: IBSS TX Auth frame (SEQ %d) to " MACSTR,
                   seq, MAC2STR(da));
 
-       return wpa_s->driver->send_frame(wpa_s->drv_priv, (u8 *) &auth,
-                                        auth_length, 0);
+       return wpa_drv_send_mlme(wpa_s, (u8 *) &auth, auth_length, 0, 0);
 }