nl80211: Add custom ack handler arguments to send_and_recv()

This is a preliminary patch for using extack cookies for TX control port
handling. Custom ack handler arguments for send_and_recv() and friends
is introduced therefore. This commit does not actually use the provided
values, i.e., that will be added in a separate commit.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
This commit is contained in:
Markus Theil 2020-06-10 10:32:56 +02:00 committed by Jouni Malinen
parent 73ea1ad7f2
commit f7c657b79f
4 changed files with 157 additions and 121 deletions

View file

@ -352,7 +352,9 @@ static void nl80211_nlmsg_clear(struct nl_msg *msg)
static int send_and_recv(struct nl80211_global *global,
struct nl_sock *nl_handle, struct nl_msg *msg,
int (*valid_handler)(struct nl_msg *, void *),
void *valid_data)
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *),
void *ack_data)
{
struct nl_cb *cb;
int err = -ENOMEM, opt;
@ -430,10 +432,13 @@ static int send_and_recv(struct nl80211_global *global,
int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv,
struct nl_msg *msg,
int (*valid_handler)(struct nl_msg *, void *),
void *valid_data)
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *),
void *ack_data)
{
return send_and_recv(drv->global, drv->global->nl, msg,
valid_handler, valid_data);
valid_handler, valid_data,
ack_handler_custom, ack_data);
}
@ -447,7 +452,10 @@ static int send_and_recv_msgs_owner(struct wpa_driver_nl80211_data *drv,
struct nl_sock *handle, int set_owner,
int (*valid_handler)(struct nl_msg *,
void *),
void *valid_data)
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *,
void *),
void *ack_data)
{
/* Control port over nl80211 needs the flags and attributes below.
*
@ -469,7 +477,8 @@ static int send_and_recv_msgs_owner(struct wpa_driver_nl80211_data *drv,
return -1;
return send_and_recv(drv->global, handle ? handle : drv->global->nl,
msg, valid_handler, valid_data);
msg, valid_handler, valid_data,
ack_handler_custom, ack_data);
}
@ -537,7 +546,8 @@ static int nl_get_multicast_id(struct nl80211_global *global,
return -1;
}
ret = send_and_recv(global, global->nl, msg, family_handler, &res);
ret = send_and_recv(global, global->nl, msg, family_handler, &res,
NULL, NULL);
if (ret == 0)
ret = res.id;
return ret;
@ -654,7 +664,8 @@ int nl80211_get_wiphy_index(struct i802_bss *bss)
if (!(msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_GET_INTERFACE)))
return -1;
if (send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data) == 0)
if (send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data,
NULL, NULL) == 0)
return data.wiphy_idx;
return -1;
}
@ -671,7 +682,8 @@ static enum nl80211_iftype nl80211_get_ifmode(struct i802_bss *bss)
if (!(msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_GET_INTERFACE)))
return NL80211_IFTYPE_UNSPECIFIED;
if (send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data) == 0)
if (send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data,
NULL, NULL) == 0)
return data.nlmode;
return NL80211_IFTYPE_UNSPECIFIED;
}
@ -687,7 +699,8 @@ static int nl80211_get_macaddr(struct i802_bss *bss)
if (!(msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_GET_INTERFACE)))
return -1;
return send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data);
return send_and_recv_msgs(bss->drv, msg, netdev_info_handler, &data,
NULL, NULL);
}
@ -707,7 +720,8 @@ static int nl80211_register_beacons(struct wpa_driver_nl80211_data *drv,
return -1;
}
ret = send_and_recv(drv->global, w->nl_beacons, msg, NULL, NULL);
ret = send_and_recv(drv->global, w->nl_beacons, msg, NULL, NULL,
NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Register beacons command "
"failed: ret=%d (%s)",
@ -1403,7 +1417,7 @@ try_again:
os_memset(&arg, 0, sizeof(arg));
arg.drv = drv;
ret = send_and_recv_msgs(drv, msg, nl80211_get_assoc_freq_handler,
&arg);
&arg, NULL, NULL);
if (ret == -EAGAIN) {
count++;
if (count >= 10) {
@ -1437,7 +1451,7 @@ try_again:
os_memset(&arg, 0, sizeof(arg));
arg.drv = drv;
ret = send_and_recv_msgs(drv, msg, nl80211_get_assoc_freq_handler,
&arg);
&arg, NULL, NULL);
if (ret == -EAGAIN) {
count++;
if (count >= 10) {
@ -1540,7 +1554,7 @@ int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv,
return -ENOBUFS;
}
return send_and_recv_msgs(drv, msg, get_link_signal, sig);
return send_and_recv_msgs(drv, msg, get_link_signal, sig, NULL, NULL);
}
@ -1597,7 +1611,8 @@ int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv,
sig_change->frequency = drv->assoc_freq;
msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_GET_SURVEY);
return send_and_recv_msgs(drv, msg, get_link_noise, sig_change);
return send_and_recv_msgs(drv, msg, get_link_noise, sig_change,
NULL, NULL);
}
@ -1661,7 +1676,7 @@ static int nl80211_channel_info(void *priv, struct wpa_channel_info *ci)
struct nl_msg *msg;
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_INTERFACE);
return send_and_recv_msgs(drv, msg, get_channel_info, ci);
return send_and_recv_msgs(drv, msg, get_channel_info, ci, NULL, NULL);
}
@ -1710,7 +1725,7 @@ static int wpa_driver_nl80211_set_country(void *priv, const char *alpha2_arg)
nlmsg_free(msg);
return -EINVAL;
}
if (send_and_recv_msgs(drv, msg, NULL, NULL))
if (send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL))
return -EINVAL;
return 0;
}
@ -1746,7 +1761,8 @@ static int wpa_driver_nl80211_get_country(void *priv, char *alpha2)
nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_REG);
alpha2[0] = '\0';
ret = send_and_recv_msgs(drv, msg, nl80211_get_country, alpha2);
ret = send_and_recv_msgs(drv, msg, nl80211_get_country, alpha2,
NULL, NULL);
if (!alpha2[0])
ret = -1;
@ -2189,7 +2205,8 @@ static int nl80211_register_frame(struct i802_bss *bss,
return -1;
}
ret = send_and_recv(drv->global, nl_handle, msg, NULL, NULL);
ret = send_and_recv(drv->global, nl_handle, msg, NULL, NULL,
NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Register frame command "
"failed (type=%u): ret=%d (%s)",
@ -2429,7 +2446,8 @@ static int nl80211_register_spurious_class3(struct i802_bss *bss)
int ret;
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_UNEXPECTED_FRAME);
ret = send_and_recv(bss->drv->global, bss->nl_mgmt, msg, NULL, NULL);
ret = send_and_recv(bss->drv->global, bss->nl_mgmt, msg, NULL, NULL,
NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Register spurious class3 "
"failed: ret=%d (%s)",
@ -2583,7 +2601,7 @@ static void nl80211_del_p2pdev(struct i802_bss *bss)
int ret;
msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_DEL_INTERFACE);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG, "nl80211: Delete P2P Device %s (0x%llx): %s",
bss->ifname, (long long unsigned int) bss->wdev_id,
@ -2598,7 +2616,7 @@ static int nl80211_set_p2pdev(struct i802_bss *bss, int start)
msg = nl80211_cmd_msg(bss, 0, start ? NL80211_CMD_START_P2P_DEVICE :
NL80211_CMD_STOP_P2P_DEVICE);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG, "nl80211: %s P2P Device %s (0x%llx): %s",
start ? "Start" : "Stop",
@ -2669,7 +2687,8 @@ static void qca_vendor_test(struct wpa_driver_nl80211_data *drv)
}
nla_nest_end(msg, params);
ret = send_and_recv_msgs(drv, msg, qca_vendor_test_cmd_handler, drv);
ret = send_and_recv_msgs(drv, msg, qca_vendor_test_cmd_handler, drv,
NULL, NULL);
wpa_printf(MSG_DEBUG,
"nl80211: QCA vendor test command returned %d (%s)",
ret, strerror(-ret));
@ -2794,7 +2813,7 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss)
drv->ifindex);
nl80211_put_wiphy_data_ap(bss);
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -3056,7 +3075,7 @@ static int issue_key_mgmt_set_key(struct wpa_driver_nl80211_data *drv,
nlmsg_free(msg);
return -1;
}
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1);
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"nl80211: Key management set key failed: ret=%d (%s)",
@ -3096,7 +3115,7 @@ static int nl80211_set_pmk(struct wpa_driver_nl80211_data *drv,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1);
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Set PMK failed: ret=%d (%s)",
ret, strerror(-ret));
@ -3262,7 +3281,8 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
goto fail;
}
ret = send_and_recv_msgs(drv, msg, NULL, key ? (void *) -1 : NULL);
ret = send_and_recv_msgs(drv, msg, NULL, key ? (void *) -1 : NULL,
NULL, NULL);
if ((ret == -ENOENT || ret == -ENOLINK) && alg == WPA_ALG_NONE)
ret = 0;
if (ret)
@ -3324,7 +3344,7 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
goto fail;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG,
"nl80211: set_key default failed; err=%d %s",
@ -3448,9 +3468,10 @@ int wpa_driver_nl80211_mlme(struct wpa_driver_nl80211_data *drv,
}
if (nl_connect)
ret = send_and_recv(drv->global, nl_connect, msg, NULL, NULL);
ret = send_and_recv(drv->global, nl_connect, msg, NULL, NULL,
NULL, NULL);
else
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_dbg(drv->ctx, MSG_DEBUG,
"nl80211: MLME command failed: reason=%u ret=%d (%s)",
@ -3698,7 +3719,7 @@ retry:
goto fail;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_dbg(drv->ctx, MSG_DEBUG,
@ -3976,7 +3997,7 @@ static int nl80211_set_bss(struct i802_bss *bss, int cts, int preamble,
return -ENOBUFS;
}
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -4020,7 +4041,7 @@ static int wpa_driver_nl80211_set_acl(void *priv,
}
nlmsg_free(acl);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Failed to set MAC ACL: %d (%s)",
ret, strerror(-ret));
@ -4072,7 +4093,7 @@ static int nl80211_set_mesh_config(void *priv,
return ret;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_ERROR,
"nl80211: Mesh config set failed: %d (%s)",
@ -4197,7 +4218,7 @@ static int nl80211_set_multicast_to_unicast(struct i802_bss *bss,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
switch (ret) {
case 0:
@ -4486,7 +4507,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
#endif /* CONFIG_IEEE80211AX */
ret = send_and_recv_msgs_owner(drv, msg, get_connect_handle(bss), 1,
NULL, NULL);
NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
ret, strerror(-ret));
@ -4655,7 +4676,7 @@ static int nl80211_set_channel(struct i802_bss *bss,
return -1;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret == 0) {
bss->freq = freq->freq;
return 0;
@ -4933,7 +4954,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
nla_nest_end(msg, wme);
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: NL80211_CMD_%s_STATION "
@ -5005,7 +5026,7 @@ static int wpa_driver_nl80211_sta_remove(struct i802_bss *bss, const u8 *addr,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG, "nl80211: sta_remove -> DEL_STATION %s " MACSTR
" --> %d (%s)",
bss->ifname, MAC2STR(addr), ret, strerror(-ret));
@ -5036,7 +5057,7 @@ void nl80211_remove_iface(struct wpa_driver_nl80211_data *drv, int ifidx)
}
msg = nl80211_ifindex_msg(drv, ifidx, 0, NL80211_CMD_DEL_INTERFACE);
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)
if (send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL) == 0)
return;
wpa_printf(MSG_ERROR, "Failed to remove interface (ifidx=%d)", ifidx);
}
@ -5116,7 +5137,7 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
if (nla_put_flag(msg, NL80211_ATTR_IFACE_SOCKET_OWNER))
goto fail;
ret = send_and_recv_msgs(drv, msg, handler, arg);
ret = send_and_recv_msgs(drv, msg, handler, arg, NULL, NULL);
msg = NULL;
if (ret) {
fail:
@ -5291,7 +5312,7 @@ static int nl80211_tx_control_port(void *priv, const u8 *dest,
return -ENOBUFS;
}
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG,
"nl80211: tx_control_port failed: ret=%d (%s)",
@ -5447,7 +5468,7 @@ static int wpa_driver_nl80211_sta_set_flags(void *priv, const u8 *addr,
if (nla_put(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd))
goto fail;
return send_and_recv_msgs(bss->drv, msg, NULL, NULL);
return send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
fail:
nlmsg_free(msg);
return -ENOBUFS;
@ -5469,7 +5490,7 @@ static int driver_nl80211_sta_set_airtime_weight(void *priv, const u8 *addr,
nla_put_u16(msg, NL80211_ATTR_AIRTIME_WEIGHT, weight))
goto fail;
return send_and_recv_msgs(bss->drv, msg, NULL, NULL);
return send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
fail:
nlmsg_free(msg);
return -ENOBUFS;
@ -5515,7 +5536,7 @@ static int nl80211_leave_ibss(struct wpa_driver_nl80211_data *drv,
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_LEAVE_IBSS);
ret = send_and_recv_msgs_owner(drv, msg,
get_connect_handle(drv->first_bss), 1,
NULL, NULL);
NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Leave IBSS failed: ret=%d "
"(%s)", ret, strerror(-ret));
@ -5649,7 +5670,7 @@ retry:
ret = send_and_recv_msgs_owner(drv, msg,
get_connect_handle(drv->first_bss), 1,
NULL, NULL);
NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS failed: ret=%d (%s)",
@ -6051,7 +6072,7 @@ skip_auth_type:
goto fail;
ret = send_and_recv_msgs_owner(drv, msg, nl_connect, 1, NULL,
(void *) -1);
(void *) -1, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: MLME connect failed: ret=%d "
@ -6167,7 +6188,7 @@ static int wpa_driver_nl80211_associate(
ret = send_and_recv_msgs_owner(drv, msg,
get_connect_handle(drv->first_bss), 1,
NULL, NULL);
NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_dbg(drv->ctx, MSG_DEBUG,
@ -6198,7 +6219,7 @@ static int nl80211_set_mode(struct wpa_driver_nl80211_data *drv,
if (!msg || nla_put_u32(msg, NL80211_ATTR_IFTYPE, mode))
goto fail;
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (!ret)
return 0;
@ -6459,7 +6480,7 @@ static int wpa_driver_nl80211_set_supp_port(void *priv, int authorized)
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (!ret)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Failed to set STA flag: %d (%s)",
@ -6524,7 +6545,7 @@ static int i802_get_seqnum(const char *iface, void *priv, const u8 *addr,
memset(seq, 0, 6);
return send_and_recv_msgs(drv, msg, get_key_handler, seq);
return send_and_recv_msgs(drv, msg, get_key_handler, seq, NULL, NULL);
}
@ -6547,7 +6568,7 @@ static int i802_set_rts(void *priv, int rts)
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (!ret)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Failed to set RTS threshold %d: "
@ -6575,7 +6596,7 @@ static int i802_set_frag(void *priv, int frag)
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (!ret)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Failed to set fragmentation threshold "
@ -6597,7 +6618,7 @@ static int i802_flush(void *priv)
* XXX: FIX! this needs to flush all VLANs too
*/
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_STATION);
res = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
res = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
if (res) {
wpa_printf(MSG_DEBUG, "nl80211: Station flush failed: ret=%d "
"(%s)", res, strerror(-res));
@ -6806,7 +6827,8 @@ static int i802_read_sta_data(struct i802_bss *bss,
return -ENOBUFS;
}
return send_and_recv_msgs(bss->drv, msg, get_sta_handler, data);
return send_and_recv_msgs(bss->drv, msg, get_sta_handler, data,
NULL, NULL);
}
@ -6863,7 +6885,7 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
nla_nest_end(msg, txq);
res = send_and_recv_msgs(drv, msg, NULL, NULL);
res = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG,
"nl80211: TX queue param set: queue=%d aifs=%d cw_min=%d cw_max=%d burst_time=%d --> res=%d",
queue, aifs, cw_min, cw_max, burst_time, res);
@ -6896,7 +6918,7 @@ static int i802_set_sta_vlan(struct i802_bss *bss, const u8 *addr,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret < 0) {
wpa_printf(MSG_ERROR, "nl80211: NL80211_ATTR_STA_VLAN (addr="
MACSTR " ifname=%s vlan_id=%d) failed: %d (%s)",
@ -7743,7 +7765,7 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
goto fail;
cookie = 0;
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie);
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Frame command failed: ret=%d "
@ -7850,7 +7872,7 @@ static void nl80211_frame_wait_cancel(struct i802_bss *bss, u64 cookie)
return;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: wait cancel failed: ret=%d "
"(%s)", ret, strerror(-ret));
@ -7898,7 +7920,7 @@ static int wpa_driver_nl80211_remain_on_channel(void *priv, unsigned int freq,
}
cookie = 0;
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie);
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie, NULL, NULL);
if (ret == 0) {
wpa_printf(MSG_DEBUG, "nl80211: Remain-on-channel cookie "
"0x%llx for freq=%u MHz duration=%u",
@ -7938,7 +7960,7 @@ static int wpa_driver_nl80211_cancel_remain_on_channel(void *priv)
return -1;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret == 0)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Failed to cancel remain-on-channel: "
@ -8035,7 +8057,7 @@ static int nl80211_disable_11b_rates(struct wpa_driver_nl80211_data *drv,
nla_nest_end(msg, bands);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Set TX rates failed: ret=%d "
"(%s)", ret, strerror(-ret));
@ -8132,7 +8154,7 @@ static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis)
}
nla_nest_end(msg, cqm);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -8170,7 +8192,7 @@ static int nl80211_get_channel_width(struct wpa_driver_nl80211_data *drv,
struct nl_msg *msg;
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_INTERFACE);
return send_and_recv_msgs(drv, msg, get_channel_width, sig);
return send_and_recv_msgs(drv, msg, get_channel_width, sig, NULL, NULL);
}
@ -8368,7 +8390,7 @@ static int nl80211_pmkid(struct i802_bss *bss, int cmd,
return -ENOBUFS;
}
return send_and_recv_msgs(bss->drv, msg, NULL, (void *) -1);
return send_and_recv_msgs(bss->drv, msg, NULL, (void *) -1, NULL, NULL);
}
@ -8433,7 +8455,7 @@ static int nl80211_flush_pmkid(void *priv)
msg = nl80211_bss_msg(bss, 0, NL80211_CMD_FLUSH_PMKSA);
if (!msg)
return -ENOBUFS;
return send_and_recv_msgs(bss->drv, msg, NULL, NULL);
return send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
}
@ -8598,7 +8620,7 @@ static int wpa_driver_nl80211_get_survey(void *priv, unsigned int freq)
do {
wpa_printf(MSG_DEBUG, "nl80211: Fetch survey data");
err = send_and_recv_msgs(drv, msg, survey_handler,
survey_results);
survey_results, NULL, NULL);
} while (err > 0);
if (err)
@ -8638,7 +8660,7 @@ static void nl80211_set_rekey_info(void *priv, const u8 *kek, size_t kek_len,
nla_nest_end(msg, replay_nested);
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1);
ret = send_and_recv_msgs(drv, msg, NULL, (void *) -1, NULL, NULL);
if (ret == -EOPNOTSUPP) {
wpa_printf(MSG_DEBUG,
"nl80211: Driver does not support rekey offload");
@ -8705,7 +8727,7 @@ static void nl80211_poll_client(void *priv, const u8 *own_addr, const u8 *addr,
return;
}
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie);
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie, NULL, NULL);
if (ret < 0) {
wpa_printf(MSG_DEBUG, "nl80211: Client probe request for "
MACSTR " failed: ret=%d (%s)",
@ -8731,7 +8753,7 @@ static int nl80211_set_power_save(struct i802_bss *bss, int enabled)
return -ENOBUFS;
}
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL);
ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL);
if (ret < 0) {
wpa_printf(MSG_DEBUG,
"nl80211: Setting PS state %s failed: %d (%s)",
@ -8791,7 +8813,7 @@ static int nl80211_start_radar_detection(void *priv,
return -1;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret == 0)
return 0;
wpa_printf(MSG_DEBUG, "nl80211: Failed to start radar detection: "
@ -8838,7 +8860,7 @@ static int nl80211_send_tdls_mgmt(void *priv, const u8 *dst, u8 action_code,
nla_put(msg, NL80211_ATTR_IE, len, buf))
goto fail;
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
fail:
nlmsg_free(msg);
@ -8888,7 +8910,7 @@ static int nl80211_tdls_oper(void *priv, enum tdls_oper oper, const u8 *peer)
return -ENOBUFS;
}
res = send_and_recv_msgs(drv, msg, NULL, NULL);
res = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
wpa_printf(MSG_DEBUG, "nl80211: TDLS_OPER: oper=%d mac=" MACSTR
" --> res=%d (%s)", nl80211_oper, MAC2STR(peer), res,
strerror(-res));
@ -8922,7 +8944,7 @@ nl80211_tdls_enable_channel_switch(void *priv, const u8 *addr, u8 oper_class,
return ret;
}
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -8948,7 +8970,7 @@ nl80211_tdls_disable_channel_switch(void *priv, const u8 *addr)
return -ENOBUFS;
}
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
#endif /* CONFIG TDLS */
@ -9091,7 +9113,7 @@ static int wpa_driver_nl80211_update_ft_ies(void *priv, const u8 *md,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: update_ft_ies failed "
"err=%d (%s)", ret, strerror(-ret));
@ -9119,7 +9141,7 @@ static int nl80211_update_dh_ie(void *priv, const u8 *peer_mac,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"nl80211: update_dh_ie failed err=%d (%s)",
@ -9324,7 +9346,7 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen)
nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_REG) &&
nla_put_u32(msg, NL80211_ATTR_WIPHY, drv->wiphy_idx) == 0) {
if (send_and_recv_msgs(drv, msg, nl80211_get_country,
alpha2) == 0 &&
alpha2, NULL, NULL) == 0 &&
alpha2[0]) {
res = os_snprintf(pos, end - pos, "country=%s\n",
alpha2);
@ -9475,7 +9497,7 @@ static int nl80211_switch_channel(void *priv, struct csa_settings *settings)
goto fail;
nla_nest_end(msg, beacon_csa);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: switch_channel failed err=%d (%s)",
ret, strerror(-ret));
@ -9516,7 +9538,7 @@ static int nl80211_add_ts(void *priv, u8 tsid, const u8 *addr,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: add_ts failed err=%d (%s)",
ret, strerror(-ret));
@ -9543,7 +9565,7 @@ static int nl80211_del_ts(void *priv, u8 tsid, const u8 *addr)
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: del_ts failed err=%d (%s)",
ret, strerror(-ret));
@ -9628,7 +9650,8 @@ static int nl80211_vendor_cmd(void *priv, unsigned int vendor_id,
* of send_and_recv_msgs(). */
ret = send_and_recv_msgs_owner(drv, msg,
get_connect_handle(bss), 0,
cmd_reply_handler, buf);
cmd_reply_handler, buf,
NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: command failed err=%d",
ret);
@ -9643,7 +9666,8 @@ static int nl80211_vendor_cmd(void *priv, unsigned int vendor_id,
nla_put(msg, NL80211_ATTR_VENDOR_DATA, data_len, data)))
goto fail;
ret = send_and_recv_msgs(drv, msg, vendor_reply_handler, buf);
ret = send_and_recv_msgs(drv, msg, vendor_reply_handler, buf,
NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: vendor command failed err=%d",
ret);
@ -9672,7 +9696,7 @@ static int nl80211_set_qos_map(void *priv, const u8 *qos_map_set,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: Setting QoS Map failed");
@ -9707,7 +9731,8 @@ static int nl80211_get_wowlan(void *priv)
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_WOWLAN);
ret = send_and_recv_msgs(drv, msg, get_wowlan_handler, &wowlan_enabled);
ret = send_and_recv_msgs(drv, msg, get_wowlan_handler, &wowlan_enabled,
NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Getting wowlan status failed");
return 0;
@ -9754,7 +9779,7 @@ static int nl80211_set_wowlan(void *priv,
nla_nest_end(msg, wowlan_triggers);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret)
wpa_printf(MSG_DEBUG, "nl80211: Setting wowlan failed");
@ -9793,7 +9818,7 @@ static int nl80211_roaming(void *priv, int allowed, const u8 *bssid)
}
nla_nest_end(msg, params);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -9821,7 +9846,7 @@ static int nl80211_disable_fils(void *priv, int disable)
}
nla_nest_end(msg, params);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -9877,7 +9902,7 @@ static int nl80211_set_bssid_blacklist(void *priv, unsigned int num_bssid,
nla_nest_end(msg, nlbssids);
nla_nest_end(msg, params);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
fail:
nlmsg_free(msg);
@ -9915,7 +9940,7 @@ static int nl80211_add_sta_node(void *priv, const u8 *addr, u16 auth_alg)
}
nla_nest_end(msg, params);
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
#endif /* CONFIG_DRIVER_NL80211_QCA */
@ -10084,7 +10109,7 @@ static int nl80211_join_mesh(struct i802_bss *bss,
goto fail;
ret = send_and_recv_msgs_owner(drv, msg, get_connect_handle(bss), 1,
NULL, NULL);
NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: mesh join failed: ret=%d (%s)",
@ -10142,7 +10167,7 @@ static int wpa_driver_nl80211_leave_mesh(void *priv)
wpa_printf(MSG_DEBUG, "nl80211: mesh leave (ifindex=%d)", drv->ifindex);
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_LEAVE_MESH);
ret = send_and_recv_msgs_owner(drv, msg, get_connect_handle(bss), 0,
NULL, NULL);
NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: mesh leave failed: ret=%d (%s)",
ret, strerror(-ret));
@ -10176,7 +10201,7 @@ static int nl80211_probe_mesh_link(void *priv, const u8 *addr, const u8 *eth,
return -ENOBUFS;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: mesh link probe to " MACSTR
" failed: ret=%d (%s)",
@ -10588,7 +10613,7 @@ static int wpa_driver_do_acs(void *priv, struct drv_acs_params *params)
params->hw_mode, params->ht_enabled, params->ht40_enabled,
params->vht_enabled, params->ch_width, params->edmg_enabled);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"nl80211: Failed to invoke driver ACS function: %s",
@ -10635,7 +10660,7 @@ static int nl80211_set_band(void *priv, enum set_band band)
}
nla_nest_end(msg, data);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"nl80211: Driver setband function failed: %s",
@ -10768,7 +10793,8 @@ static int nl80211_get_pref_freq_list(void *priv,
nla_nest_end(msg, params);
os_memset(freq_list, 0, *num * sizeof(freq_list[0]));
ret = send_and_recv_msgs(drv, msg, preferred_freq_info_handler, &param);
ret = send_and_recv_msgs(drv, msg, preferred_freq_info_handler, &param,
NULL, NULL);
if (ret) {
wpa_printf(MSG_ERROR,
"%s: err in send_and_recv_msgs", __func__);
@ -10820,7 +10846,7 @@ static int nl80211_set_prob_oper_freq(void *priv, unsigned int freq)
}
nla_nest_end(msg, params);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_ERROR, "%s: err in send_and_recv_msgs",
@ -10876,7 +10902,7 @@ static int nl80211_p2p_lo_start(void *priv, unsigned int freq,
goto fail;
nla_nest_end(msg, container);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG,
@ -10911,7 +10937,7 @@ static int nl80211_p2p_lo_stop(void *priv)
return -1;
}
return send_and_recv_msgs(drv, msg, NULL, NULL);
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
}
@ -10950,7 +10976,7 @@ static int nl80211_set_tdls_mode(void *priv, int tdls_external_control)
nla_nest_end(msg, params);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_ERROR,
@ -11143,7 +11169,7 @@ nl80211_get_bss_transition_status(void *priv, struct wpa_bss_trans_info *params)
ret = send_and_recv_msgs(drv, msg,
nl80211_get_bss_transition_status_handler,
info);
info, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_ERROR,
@ -11196,7 +11222,7 @@ static int nl80211_ignore_assoc_disallow(void *priv, int ignore_disallow)
nla_nest_end(msg, attr);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_ERROR,
@ -11399,7 +11425,7 @@ static int nl80211_update_connection_params(
nl80211_put_fils_connect_params(drv, params, msg))
goto fail;
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret)
wpa_dbg(drv->ctx, MSG_DEBUG,
@ -11442,7 +11468,7 @@ static int nl80211_send_external_auth_status(void *priv,
(params->bssid &&
nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, params->bssid)))
goto fail;
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG,
@ -11482,7 +11508,7 @@ static int nl80211_set_4addr_mode(void *priv, const char *bridge_ifname,
bss->added_if_into_bridge = 0;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (!ret) {
if (bridge_ifname[0] && val &&

View file

@ -231,7 +231,9 @@ struct nl_msg * nl80211_drv_msg(struct wpa_driver_nl80211_data *drv, int flags,
struct nl_msg * nl80211_bss_msg(struct i802_bss *bss, int flags, uint8_t cmd);
int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv, struct nl_msg *msg,
int (*valid_handler)(struct nl_msg *, void *),
void *valid_data);
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *),
void *ack_data);
struct nl_sock * get_connect_handle(struct i802_bss *bss);
int nl80211_create_iface(struct wpa_driver_nl80211_data *drv,
const char *ifname, enum nl80211_iftype iftype,

View file

@ -49,7 +49,8 @@ static u32 get_nl80211_protocol_features(struct wpa_driver_nl80211_data *drv)
return 0;
}
if (send_and_recv_msgs(drv, msg, protocol_feature_handler, &feat) == 0)
if (send_and_recv_msgs(drv, msg, protocol_feature_handler, &feat,
NULL, NULL) == 0)
return feat;
return 0;
@ -1052,7 +1053,7 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
return -1;
}
if (send_and_recv_msgs(drv, msg, wiphy_info_handler, info))
if (send_and_recv_msgs(drv, msg, wiphy_info_handler, info, NULL, NULL))
return -1;
if (info->auth_supported)
@ -1158,7 +1159,8 @@ static void qca_nl80211_check_dfs_capa(struct wpa_driver_nl80211_data *drv)
return;
}
ret = send_and_recv_msgs(drv, msg, dfs_info_handler, &dfs_capability);
ret = send_and_recv_msgs(drv, msg, dfs_info_handler, &dfs_capability,
NULL, NULL);
if (!ret && dfs_capability)
drv->capa.flags |= WPA_DRIVER_FLAGS_DFS_OFFLOAD;
}
@ -1245,7 +1247,8 @@ static void qca_nl80211_get_features(struct wpa_driver_nl80211_data *drv)
os_memset(&info, 0, sizeof(info));
info.capa = &drv->capa;
ret = send_and_recv_msgs(drv, msg, features_info_handler, &info);
ret = send_and_recv_msgs(drv, msg, features_info_handler, &info,
NULL, NULL);
if (ret || !info.flags)
return;
@ -2327,7 +2330,8 @@ static int nl80211_set_regulatory_flags(struct wpa_driver_nl80211_data *drv,
}
}
return send_and_recv_msgs(drv, msg, nl80211_get_reg, results);
return send_and_recv_msgs(drv, msg, nl80211_get_reg, results,
NULL, NULL);
}
@ -2416,7 +2420,8 @@ nl80211_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags,
return NULL;
}
if (send_and_recv_msgs(drv, msg, phy_info_handler, &result) == 0) {
if (send_and_recv_msgs(drv, msg, phy_info_handler, &result,
NULL, NULL) == 0) {
struct hostapd_hw_modes *modes;
nl80211_set_regulatory_flags(drv, &result);

View file

@ -82,7 +82,8 @@ static int nl80211_get_noise_for_scan_results(
os_memset(info, 0, sizeof(*info));
msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_GET_SURVEY);
return send_and_recv_msgs(drv, msg, get_noise_for_scan_results, info);
return send_and_recv_msgs(drv, msg, get_noise_for_scan_results, info,
NULL, NULL);
}
@ -94,7 +95,7 @@ static int nl80211_abort_scan(struct i802_bss *bss)
wpa_printf(MSG_DEBUG, "nl80211: Abort scan");
msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_ABORT_SCAN);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Abort scan failed: ret=%d (%s)",
ret, strerror(-ret));
@ -125,7 +126,7 @@ static int nl80211_abort_vendor_scan(struct wpa_driver_nl80211_data *drv,
nla_nest_end(msg, params);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_INFO,
@ -365,7 +366,7 @@ int wpa_driver_nl80211_scan(struct i802_bss *bss,
goto fail;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Scan trigger failed: ret=%d "
@ -618,7 +619,7 @@ int wpa_driver_nl80211_sched_scan(void *priv,
params->sched_scan_start_delay))
goto fail;
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
/* TODO: if we get an error here, we should fall back to normal scan */
@ -655,7 +656,7 @@ int wpa_driver_nl80211_stop_sched_scan(void *priv)
#endif /* ANDROID */
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_STOP_SCHED_SCAN);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"nl80211: Sched scan stop failed: ret=%d (%s)",
@ -944,7 +945,7 @@ try_again:
arg.drv = drv;
arg.res = res;
ret = send_and_recv_msgs(drv, msg, bss_info_handler, &arg);
ret = send_and_recv_msgs(drv, msg, bss_info_handler, &arg, NULL, NULL);
if (ret == -EAGAIN) {
count++;
if (count >= 10) {
@ -1028,7 +1029,8 @@ void nl80211_dump_scan(struct wpa_driver_nl80211_data *drv)
ctx.idx = 0;
msg = nl80211_cmd_msg(drv->first_bss, NLM_F_DUMP, NL80211_CMD_GET_SCAN);
if (msg)
send_and_recv_msgs(drv, msg, nl80211_dump_scan_handler, &ctx);
send_and_recv_msgs(drv, msg, nl80211_dump_scan_handler, &ctx,
NULL, NULL);
}
@ -1221,7 +1223,8 @@ int wpa_driver_nl80211_vendor_scan(struct i802_bss *bss,
nla_nest_end(msg, attr);
ret = send_and_recv_msgs(drv, msg, scan_cookie_handler, &cookie);
ret = send_and_recv_msgs(drv, msg, scan_cookie_handler, &cookie,
NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_DEBUG,
@ -1284,7 +1287,7 @@ int nl80211_set_default_scan_ies(void *priv, const u8 *ies, size_t ies_len)
nla_nest_end(msg, attr);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
msg = NULL;
if (ret) {
wpa_printf(MSG_ERROR,