nl80211: Report link specific association failures from the kernel
If a link specific error occured, mark the offending link within the association parameters. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
6ba9b9440b
commit
4a1cd7f545
2 changed files with 17 additions and 1 deletions
|
@ -949,6 +949,7 @@ struct wpa_driver_mld_params {
|
||||||
const u8 *bssid;
|
const u8 *bssid;
|
||||||
const u8 *ies;
|
const u8 *ies;
|
||||||
size_t ies_len;
|
size_t ies_len;
|
||||||
|
int error;
|
||||||
} mld_links[MAX_NUM_MLD_LINKS];
|
} mld_links[MAX_NUM_MLD_LINKS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7260,6 +7260,7 @@ static int wpa_driver_nl80211_associate(
|
||||||
{
|
{
|
||||||
struct i802_bss *bss = priv;
|
struct i802_bss *bss = priv;
|
||||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||||
|
struct nl80211_err_info err_info;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct nl_msg *msg;
|
struct nl_msg *msg;
|
||||||
|
|
||||||
|
@ -7319,13 +7320,27 @@ static int wpa_driver_nl80211_associate(
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = send_and_recv_msgs_connect_handle(drv, msg, drv->first_bss, 1,
|
ret = send_and_recv_msgs_connect_handle(drv, msg, drv->first_bss, 1,
|
||||||
NULL);
|
&err_info);
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wpa_dbg(drv->ctx, MSG_DEBUG,
|
wpa_dbg(drv->ctx, MSG_DEBUG,
|
||||||
"nl80211: MLME command failed (assoc): ret=%d (%s)",
|
"nl80211: MLME command failed (assoc): ret=%d (%s)",
|
||||||
ret, strerror(-ret));
|
ret, strerror(-ret));
|
||||||
nl80211_dump_scan(drv);
|
nl80211_dump_scan(drv);
|
||||||
|
|
||||||
|
/* Mark failed link within params */
|
||||||
|
if (err_info.link_id >= 0) {
|
||||||
|
if (err_info.link_id >= MAX_NUM_MLD_LINKS ||
|
||||||
|
!(params->mld_params.valid_links &
|
||||||
|
BIT(err_info.link_id))) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"nl80211: Invalid errorred link_id %d",
|
||||||
|
err_info.link_id);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
params->mld_params.mld_links[err_info.link_id].error =
|
||||||
|
ret;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"nl80211: Association request send successfully");
|
"nl80211: Association request send successfully");
|
||||||
|
|
Loading…
Add table
Reference in a new issue