mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
netdev: Simplify netdev_auth_cb error logic
This commit is contained in:
parent
972d277363
commit
a14d78596d
21
src/netdev.c
21
src/netdev.c
@ -3240,25 +3240,22 @@ static void netdev_auth_cb(struct l_genl_msg *msg, void *user_data)
|
|||||||
|
|
||||||
l_debug("Error during auth: %d", err);
|
l_debug("Error during auth: %d", err);
|
||||||
|
|
||||||
if (!netdev->auth_cmd || err != -ENOENT) {
|
if (!netdev->auth_cmd || err != -ENOENT)
|
||||||
netdev_connect_failed(netdev,
|
goto failed;
|
||||||
NETDEV_RESULT_AUTHENTICATION_FAILED,
|
|
||||||
MMPDU_STATUS_CODE_UNSPECIFIED);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Kernel can't find the BSS in its cache, scan and retry */
|
/* Kernel can't find the BSS in its cache, scan and retry */
|
||||||
scan_msg = scan_build_trigger_scan_bss(netdev->index, netdev->wiphy,
|
scan_msg = scan_build_trigger_scan_bss(netdev->index, netdev->wiphy,
|
||||||
netdev->frequency,
|
netdev->frequency,
|
||||||
hs->ssid, hs->ssid_len);
|
hs->ssid, hs->ssid_len);
|
||||||
|
|
||||||
if (!l_genl_family_send(nl80211, scan_msg,
|
if (l_genl_family_send(nl80211, scan_msg,
|
||||||
netdev_scan_cb, netdev, NULL)) {
|
netdev_scan_cb, netdev, NULL) > 0)
|
||||||
l_genl_msg_unref(scan_msg);
|
return;
|
||||||
netdev_connect_failed(netdev,
|
|
||||||
NETDEV_RESULT_AUTHENTICATION_FAILED,
|
l_genl_msg_unref(scan_msg);
|
||||||
|
failed:
|
||||||
|
netdev_connect_failed(netdev, NETDEV_RESULT_AUTHENTICATION_FAILED,
|
||||||
MMPDU_STATUS_CODE_UNSPECIFIED);
|
MMPDU_STATUS_CODE_UNSPECIFIED);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void netdev_new_scan_results_event(struct l_genl_msg *msg,
|
static void netdev_new_scan_results_event(struct l_genl_msg *msg,
|
||||||
|
Loading…
Reference in New Issue
Block a user