3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

netdev: Add additional debugs

This commit is contained in:
Denis Kenzior 2023-02-27 10:22:13 -06:00
parent 17120dfc3b
commit 5e0ff318e7

View File

@ -1370,6 +1370,8 @@ static void netdev_operstate_cb(int error, uint16_t type,
static void netdev_connect_ok(struct netdev *netdev) static void netdev_connect_ok(struct netdev *netdev)
{ {
l_debug("");
l_rtnl_set_linkmode_and_operstate(rtnl, netdev->index, l_rtnl_set_linkmode_and_operstate(rtnl, netdev->index,
IF_LINK_MODE_DORMANT, IF_OPER_UP, IF_LINK_MODE_DORMANT, IF_OPER_UP,
netdev_operstate_cb, netdev_operstate_cb,
@ -1469,7 +1471,14 @@ static void netdev_setting_keys_failed(struct netdev_handshake_state *nhs,
static void try_handshake_complete(struct netdev_handshake_state *nhs) static void try_handshake_complete(struct netdev_handshake_state *nhs)
{ {
l_debug("ptk_installed: %u, gtk_installed: %u, igtk_installed: %u",
nhs->ptk_installed,
nhs->gtk_installed,
nhs->igtk_installed);
if (nhs->ptk_installed && nhs->gtk_installed && nhs->igtk_installed) { if (nhs->ptk_installed && nhs->gtk_installed && nhs->igtk_installed) {
l_debug("nhs->complete: %u", nhs->complete);
if (nhs->complete) { if (nhs->complete) {
handshake_event(&nhs->super, handshake_event(&nhs->super,
HANDSHAKE_EVENT_REKEY_COMPLETE); HANDSHAKE_EVENT_REKEY_COMPLETE);
@ -1478,6 +1487,8 @@ static void try_handshake_complete(struct netdev_handshake_state *nhs)
nhs->complete = true; nhs->complete = true;
l_debug("Invoking handshake_event()");
if (handshake_event(&nhs->super, HANDSHAKE_EVENT_COMPLETE)) if (handshake_event(&nhs->super, HANDSHAKE_EVENT_COMPLETE))
return; return;
@ -1493,6 +1504,8 @@ static void netdev_set_station_cb(struct l_genl_msg *msg, void *user_data)
struct netdev *netdev = nhs->netdev; struct netdev *netdev = nhs->netdev;
int err; int err;
l_debug("");
nhs->set_station_cmd_id = 0; nhs->set_station_cmd_id = 0;
nhs->ptk_installed = true; nhs->ptk_installed = true;
@ -1523,6 +1536,7 @@ static void netdev_new_group_key_cb(struct l_genl_msg *msg, void *data)
struct netdev *netdev = nhs->netdev; struct netdev *netdev = nhs->netdev;
int err = l_genl_msg_get_error(msg); int err = l_genl_msg_get_error(msg);
l_debug("ifindex: %u, err: %d", netdev->index, err);
nhs->group_new_key_cmd_id = 0; nhs->group_new_key_cmd_id = 0;
if (err < 0) { if (err < 0) {
@ -1547,6 +1561,7 @@ static void netdev_new_group_management_key_cb(struct l_genl_msg *msg,
struct netdev *netdev = nhs->netdev; struct netdev *netdev = nhs->netdev;
int err = l_genl_msg_get_error(msg); int err = l_genl_msg_get_error(msg);
l_debug("ifindex: %u, err: %d", netdev->index, err);
nhs->group_management_new_key_cmd_id = 0; nhs->group_management_new_key_cmd_id = 0;
if (err < 0) { if (err < 0) {
@ -2413,6 +2428,8 @@ static int netdev_get_oci(void *user_data)
struct l_genl_msg *msg = struct l_genl_msg *msg =
l_genl_msg_new_sized(NL80211_CMD_GET_INTERFACE, 64); l_genl_msg_new_sized(NL80211_CMD_GET_INTERFACE, 64);
l_debug("");
l_genl_msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &netdev->index); l_genl_msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &netdev->index);
netdev->get_oci_cmd_id = l_genl_family_send(nl80211, msg, netdev->get_oci_cmd_id = l_genl_family_send(nl80211, msg,
@ -2433,6 +2450,8 @@ static void parse_request_ies(struct netdev *netdev, const uint8_t *ies,
const void *data; const void *data;
const uint8_t *rsnxe = NULL; const uint8_t *rsnxe = NULL;
l_debug("");
/* /*
* The driver may have modified the IEs we passed to CMD_CONNECT * The driver may have modified the IEs we passed to CMD_CONNECT
* before sending them out, the actual IE sent is reflected in the * before sending them out, the actual IE sent is reflected in the
@ -2735,6 +2754,8 @@ static void netdev_connect_event(struct l_genl_msg *msg, struct netdev *netdev)
if (netdev->ignore_connect_event) if (netdev->ignore_connect_event)
return; return;
l_debug("aborting and ignore_connect_event not set, proceed");
/* Work around mwifiex which sends a Connect Event prior to the Ack */ /* Work around mwifiex which sends a Connect Event prior to the Ack */
if (netdev->connect_cmd_id) if (netdev->connect_cmd_id)
netdev_driver_connected(netdev); netdev_driver_connected(netdev);
@ -2794,6 +2815,8 @@ static void netdev_connect_event(struct l_genl_msg *msg, struct netdev *netdev)
goto error; goto error;
} }
l_debug("expect_connect_failure not set, proceed");
if (netdev->owe_sm && status_code && *status_code == if (netdev->owe_sm && status_code && *status_code ==
MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) { MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
if (!netdev_retry_owe(netdev)) if (!netdev_retry_owe(netdev))
@ -2921,6 +2944,8 @@ process_resp_ies:
netdev_send_qos_map_set(netdev, qos_set, qos_len); netdev_send_qos_map_set(netdev, qos_set, qos_len);
} }
l_debug("Request / Response IEs parsed");
if (netdev->sm) { if (netdev->sm) {
if (!hs->chandef) { if (!hs->chandef) {
if (netdev_get_oci(netdev) < 0) if (netdev_get_oci(netdev) < 0)