driver: Add no_encrypt argument to send_mlme()
This is in preparation of being able to remove the separate send_frame() callback. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
3710027463
commit
665a3007fb
6 changed files with 15 additions and 10 deletions
|
@ -700,7 +700,7 @@ int hostapd_drv_send_mlme(struct hostapd_data *hapd,
|
|||
if (!hapd->driver || !hapd->driver->send_mlme || !hapd->drv_priv)
|
||||
return 0;
|
||||
return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack, 0,
|
||||
csa_offs, csa_offs_len);
|
||||
csa_offs, csa_offs_len, no_encrypt);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2609,11 +2609,13 @@ struct wpa_driver_ops {
|
|||
* driver decide
|
||||
* @csa_offs: Array of CSA offsets or %NULL
|
||||
* @csa_offs_len: Number of elements in csa_offs
|
||||
* @no_encrypt: Do not encrypt frame even if appropriate key exists
|
||||
* (used only for testing purposes)
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
|
||||
int noack, unsigned int freq, const u16 *csa_offs,
|
||||
size_t csa_offs_len);
|
||||
size_t csa_offs_len, int no_encrypt);
|
||||
|
||||
/**
|
||||
* update_ft_ies - Update FT (IEEE 802.11r) IEs
|
||||
|
|
|
@ -1960,7 +1960,8 @@ static int atheros_set_ap(void *priv, struct wpa_driver_ap_params *params)
|
|||
|
||||
static int atheros_send_mgmt(void *priv, const u8 *frm, size_t data_len,
|
||||
int noack, unsigned int freq,
|
||||
const u16 *csa_offs, size_t csa_offs_len)
|
||||
const u16 *csa_offs, size_t csa_offs_len,
|
||||
int no_encrypt)
|
||||
{
|
||||
struct atheros_driver_data *drv = priv;
|
||||
u8 buf[1510];
|
||||
|
|
|
@ -263,7 +263,8 @@ static int hostap_init_sockets(struct hostap_driver_data *drv, u8 *own_addr)
|
|||
|
||||
static int hostap_send_mlme(void *priv, const u8 *msg, size_t len, int noack,
|
||||
unsigned int freq,
|
||||
const u16 *csa_offs, size_t csa_offs_len)
|
||||
const u16 *csa_offs, size_t csa_offs_len,
|
||||
int no_encrypt)
|
||||
{
|
||||
struct hostap_driver_data *drv = priv;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) msg;
|
||||
|
@ -312,7 +313,7 @@ static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data,
|
|||
pos += 2;
|
||||
memcpy(pos, data, data_len);
|
||||
|
||||
res = hostap_send_mlme(drv, (u8 *) hdr, len, 0, 0, NULL, 0);
|
||||
res = hostap_send_mlme(drv, (u8 *) hdr, len, 0, 0, NULL, 0, 0);
|
||||
if (res < 0) {
|
||||
wpa_printf(MSG_ERROR, "hostap_send_eapol - packet len: %lu - "
|
||||
"failed: %d (%s)",
|
||||
|
@ -1051,7 +1052,7 @@ static int hostap_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
|
|||
memcpy(mgmt.bssid, own_addr, ETH_ALEN);
|
||||
mgmt.u.deauth.reason_code = host_to_le16(reason);
|
||||
return hostap_send_mlme(drv, (u8 *) &mgmt, IEEE80211_HDRLEN +
|
||||
sizeof(mgmt.u.deauth), 0, 0, NULL, 0);
|
||||
sizeof(mgmt.u.deauth), 0, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1089,7 +1090,7 @@ static int hostap_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
|
|||
memcpy(mgmt.bssid, own_addr, ETH_ALEN);
|
||||
mgmt.u.disassoc.reason_code = host_to_le16(reason);
|
||||
return hostap_send_mlme(drv, (u8 *) &mgmt, IEEE80211_HDRLEN +
|
||||
sizeof(mgmt.u.disassoc), 0, 0, NULL, 0);
|
||||
sizeof(mgmt.u.disassoc), 0, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1169,7 +1170,7 @@ static void wpa_driver_hostap_poll_client(void *priv, const u8 *own_addr,
|
|||
os_memcpy(hdr.IEEE80211_BSSID_FROMDS, own_addr, ETH_ALEN);
|
||||
os_memcpy(hdr.IEEE80211_SA_FROMDS, own_addr, ETH_ALEN);
|
||||
|
||||
hostap_send_mlme(priv, (u8 *)&hdr, sizeof(hdr), 0, 0, NULL, 0);
|
||||
hostap_send_mlme(priv, (u8 *) &hdr, sizeof(hdr), 0, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8751,7 +8751,8 @@ static int driver_nl80211_if_remove(void *priv, enum wpa_driver_if_type type,
|
|||
static int driver_nl80211_send_mlme(void *priv, const u8 *data,
|
||||
size_t data_len, int noack,
|
||||
unsigned int freq,
|
||||
const u16 *csa_offs, size_t csa_offs_len)
|
||||
const u16 *csa_offs, size_t csa_offs_len,
|
||||
int no_encrypt)
|
||||
{
|
||||
struct i802_bss *bss = priv;
|
||||
return wpa_driver_nl80211_send_mlme(bss, data, data_len, noack,
|
||||
|
|
|
@ -304,7 +304,7 @@ static inline int wpa_drv_send_mlme(struct wpa_supplicant *wpa_s,
|
|||
if (wpa_s->driver->send_mlme)
|
||||
return wpa_s->driver->send_mlme(wpa_s->drv_priv,
|
||||
data, data_len, noack,
|
||||
freq, NULL, 0);
|
||||
freq, NULL, 0, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue