]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Debug print association comeback event data
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 9 Feb 2022 18:43:53 +0000 (20:43 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 9 Feb 2022 18:43:53 +0000 (20:43 +0200)
This is helpful for understanding why an assocation attempt takes
unexpectedly long time to complete.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211_event.c

index 7ce138ea932b60f09bd1d2fd863cc5fba2de1882..fdd32679d1195105e449ffb38a7f82c5d185618b 100644 (file)
@@ -2896,6 +2896,17 @@ static void nl80211_frame_wait_cancel(struct wpa_driver_nl80211_data *drv,
 }
 
 
+static void nl80211_assoc_comeback(struct wpa_driver_nl80211_data *drv,
+                                  struct nlattr *mac, struct nlattr *timeout)
+{
+       if (!mac || !timeout)
+               return;
+       wpa_printf(MSG_DEBUG, "nl80211: Association comeback requested by "
+                  MACSTR " (timeout: %u ms)",
+                  MAC2STR((u8 *) nla_data(mac)), nla_get_u32(timeout));
+}
+
+
 static void do_process_drv_event(struct i802_bss *bss, int cmd,
                                 struct nlattr **tb)
 {
@@ -3145,6 +3156,10 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
        case NL80211_CMD_FRAME_WAIT_CANCEL:
                nl80211_frame_wait_cancel(drv, tb[NL80211_ATTR_COOKIE]);
                break;
+       case NL80211_CMD_ASSOC_COMEBACK:
+               nl80211_assoc_comeback(drv, tb[NL80211_ATTR_MAC],
+                                      tb[NL80211_ATTR_TIMEOUT]);
+               break;
        default:
                wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: Ignored unknown event "
                        "(cmd=%d)", cmd);