Remove flags parameter from send_mgmt_frame() driver op

This was not documented properly and was not really used nor would it be
suitable to be used in generic way as it was implemented. It is better
to just remove the parameter since there does not seem to be any
reasonable use for it.
This commit is contained in:
Jouni Malinen 2009-04-09 19:42:19 +03:00 committed by Jouni Malinen
parent 5b7b85f669
commit 8342130269
10 changed files with 26 additions and 31 deletions

View file

@ -1249,8 +1249,7 @@ struct wpa_driver_ops {
int (*hapd_set_ssid)(const char *ifname, void *priv, const u8 *buf,
int len);
int (*hapd_set_countermeasures)(void *priv, int enabled);
int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
int flags);
int (*send_mgmt_frame)(void *priv, const void *msg, size_t len);
int (*sta_add)(const char *ifname, void *priv,
struct hostapd_sta_add_params *params);
int (*get_inact_sec)(void *priv, const u8 *addr);

View file

@ -293,8 +293,7 @@ static int hostap_init_sockets(struct hostap_driver_data *drv)
}
static int hostap_send_mgmt_frame(void *priv, const void *msg, size_t len,
int flags)
static int hostap_send_mgmt_frame(void *priv, const void *msg, size_t len)
{
struct hostap_driver_data *drv = priv;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) msg;
@ -302,7 +301,7 @@ static int hostap_send_mgmt_frame(void *priv, const void *msg, size_t len,
/* Request TX callback */
hdr->frame_control |= host_to_le16(BIT(1));
res = send(drv->sock, msg, len, flags);
res = send(drv->sock, msg, len, 0);
hdr->frame_control &= ~host_to_le16(BIT(1));
return res;
@ -342,7 +341,7 @@ static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data,
pos += 2;
memcpy(pos, data, data_len);
res = hostap_send_mgmt_frame(drv, (u8 *) hdr, len, 0);
res = hostap_send_mgmt_frame(drv, (u8 *) hdr, len);
free(hdr);
if (res < 0) {
@ -1147,7 +1146,7 @@ static int hostap_sta_deauth(void *priv, const u8 *addr, int reason)
memcpy(mgmt.bssid, drv->hapd->own_addr, ETH_ALEN);
mgmt.u.deauth.reason_code = host_to_le16(reason);
return hostap_send_mgmt_frame(drv, &mgmt, IEEE80211_HDRLEN +
sizeof(mgmt.u.deauth), 0);
sizeof(mgmt.u.deauth));
}
@ -1164,7 +1163,7 @@ static int hostap_sta_disassoc(void *priv, const u8 *addr, int reason)
memcpy(mgmt.bssid, drv->hapd->own_addr, ETH_ALEN);
mgmt.u.disassoc.reason_code = host_to_le16(reason);
return hostap_send_mgmt_frame(drv, &mgmt, IEEE80211_HDRLEN +
sizeof(mgmt.u.disassoc), 0);
sizeof(mgmt.u.disassoc));
}

View file

@ -3039,7 +3039,7 @@ static int i802_set_rate_sets(void *priv, int *supp_rates, int *basic_rates,
static int i802_send_frame(void *priv, const void *data, size_t len,
int encrypt, int flags)
int encrypt)
{
__u8 rtap_hdr[] = {
0x00, 0x00, /* radiotap version */
@ -3074,11 +3074,10 @@ static int i802_send_frame(void *priv, const void *data, size_t len,
if (encrypt)
rtap_hdr[8] |= IEEE80211_RADIOTAP_F_WEP;
return sendmsg(drv->monitor_sock, &msg, flags);
return sendmsg(drv->monitor_sock, &msg, 0);
}
static int i802_send_mgmt_frame(void *priv, const void *data, size_t len,
int flags)
static int i802_send_mgmt_frame(void *priv, const void *data, size_t len)
{
struct ieee80211_mgmt *mgmt;
int do_not_encrypt = 0;
@ -3102,7 +3101,7 @@ static int i802_send_mgmt_frame(void *priv, const void *data, size_t len,
do_not_encrypt = 1;
}
return i802_send_frame(priv, data, len, !do_not_encrypt, flags);
return i802_send_frame(priv, data, len, !do_not_encrypt);
}
/* Set kernel driver on given frequency (MHz) */
@ -3364,7 +3363,7 @@ static int i802_send_eapol(void *priv, const u8 *addr, const u8 *data,
pos += 2;
memcpy(pos, data, data_len);
res = i802_send_frame(drv, (u8 *) hdr, len, encrypt, 0);
res = i802_send_frame(drv, (u8 *) hdr, len, encrypt);
free(hdr);
if (res < 0) {
@ -4945,7 +4944,7 @@ static int i802_sta_deauth(void *priv, const u8 *addr, int reason)
memcpy(mgmt.bssid, drv->hapd->own_addr, ETH_ALEN);
mgmt.u.deauth.reason_code = host_to_le16(reason);
return i802_send_mgmt_frame(drv, &mgmt, IEEE80211_HDRLEN +
sizeof(mgmt.u.deauth), 0);
sizeof(mgmt.u.deauth));
}
@ -4961,8 +4960,8 @@ static int i802_sta_disassoc(void *priv, const u8 *addr, int reason)
memcpy(mgmt.sa, drv->hapd->own_addr, ETH_ALEN);
memcpy(mgmt.bssid, drv->hapd->own_addr, ETH_ALEN);
mgmt.u.disassoc.reason_code = host_to_le16(reason);
return i802_send_mgmt_frame(drv, &mgmt, IEEE80211_HDRLEN +
sizeof(mgmt.u.disassoc), 0);
return i802_send_mgmt_frame(drv, &mgmt, IEEE80211_HDRLEN +
sizeof(mgmt.u.disassoc));
}

View file

@ -297,8 +297,7 @@ static int test_driver_send_ether(void *priv, const u8 *dst, const u8 *src,
}
static int test_driver_send_mgmt_frame(void *priv, const void *buf,
size_t len, int flags)
static int test_driver_send_mgmt_frame(void *priv, const void *buf, size_t len)
{
struct test_driver_data *drv = priv;
struct msghdr msg;