Convert the only remaining send_frame() users to send_mlme()
Since send_mlme() now has support for the no_encrypt argument it is possible to get rid of the remaining send_frame() uses. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
27cc06d073
commit
ce01804872
1 changed files with 10 additions and 12 deletions
|
@ -526,8 +526,7 @@ int hostapd_ctrl_iface_deauthenticate(struct hostapd_data *hapd,
|
||||||
if (pos) {
|
if (pos) {
|
||||||
struct ieee80211_mgmt mgmt;
|
struct ieee80211_mgmt mgmt;
|
||||||
int encrypt;
|
int encrypt;
|
||||||
if (!hapd->drv_priv || !hapd->driver->send_frame)
|
|
||||||
return -1;
|
|
||||||
pos += 6;
|
pos += 6;
|
||||||
encrypt = atoi(pos);
|
encrypt = atoi(pos);
|
||||||
os_memset(&mgmt, 0, sizeof(mgmt));
|
os_memset(&mgmt, 0, sizeof(mgmt));
|
||||||
|
@ -537,10 +536,10 @@ int hostapd_ctrl_iface_deauthenticate(struct hostapd_data *hapd,
|
||||||
os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
|
os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
|
||||||
os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
|
os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
|
||||||
mgmt.u.deauth.reason_code = host_to_le16(reason);
|
mgmt.u.deauth.reason_code = host_to_le16(reason);
|
||||||
if (hapd->driver->send_frame(hapd->drv_priv, (u8 *) &mgmt,
|
if (hostapd_drv_send_mlme(hapd, (u8 *) &mgmt,
|
||||||
IEEE80211_HDRLEN +
|
IEEE80211_HDRLEN +
|
||||||
sizeof(mgmt.u.deauth),
|
sizeof(mgmt.u.deauth),
|
||||||
encrypt) < 0)
|
0, NULL, 0, !encrypt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -589,8 +588,7 @@ int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
|
||||||
if (pos) {
|
if (pos) {
|
||||||
struct ieee80211_mgmt mgmt;
|
struct ieee80211_mgmt mgmt;
|
||||||
int encrypt;
|
int encrypt;
|
||||||
if (!hapd->drv_priv || !hapd->driver->send_frame)
|
|
||||||
return -1;
|
|
||||||
pos += 6;
|
pos += 6;
|
||||||
encrypt = atoi(pos);
|
encrypt = atoi(pos);
|
||||||
os_memset(&mgmt, 0, sizeof(mgmt));
|
os_memset(&mgmt, 0, sizeof(mgmt));
|
||||||
|
@ -600,10 +598,10 @@ int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
|
||||||
os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
|
os_memcpy(mgmt.sa, hapd->own_addr, ETH_ALEN);
|
||||||
os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
|
os_memcpy(mgmt.bssid, hapd->own_addr, ETH_ALEN);
|
||||||
mgmt.u.disassoc.reason_code = host_to_le16(reason);
|
mgmt.u.disassoc.reason_code = host_to_le16(reason);
|
||||||
if (hapd->driver->send_frame(hapd->drv_priv, (u8 *) &mgmt,
|
if (hostapd_drv_send_mlme(hapd, (u8 *) &mgmt,
|
||||||
IEEE80211_HDRLEN +
|
IEEE80211_HDRLEN +
|
||||||
sizeof(mgmt.u.deauth),
|
sizeof(mgmt.u.deauth),
|
||||||
encrypt) < 0)
|
0, NULL, 0, !encrypt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue