From de2ee083e797db28467c60de454bb6d6f518f32c Mon Sep 17 00:00:00 2001 From: Aditya Kumar Singh Date: Wed, 7 Aug 2024 09:48:36 +0530 Subject: [PATCH] nl80211: Add ifname and link ID debug prints in mlme_event_ch_switch() This makes it easier to debug AP MLD behavior. Signed-off-by: Aditya Kumar Singh --- src/drivers/driver_nl80211_event.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 642b327d1..abe90e984 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -1204,9 +1204,6 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, int chan_offset = 0; int ifidx; - wpa_printf(MSG_DEBUG, "nl80211: Channel switch%s event", - finished ? "" : " started"); - if (!freq) return; @@ -1218,6 +1215,9 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, return; } + wpa_printf(MSG_DEBUG, "nl80211: Channel switch%s event for %s", + finished ? "" : " started", bss->ifname); + if (type) { enum nl80211_channel_type ch_type = nla_get_u32(type); @@ -1260,10 +1260,13 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, if (cf2) data.ch_switch.cf2 = nla_get_u32(cf2); - if (link) + if (link) { data.ch_switch.link_id = nla_get_u8(link); - else + wpa_printf(MSG_DEBUG, "nl80211: Link ID: %d", + data.ch_switch.link_id); + } else { data.ch_switch.link_id = NL80211_DRV_LINK_ID_NA; + } if (finished) { if (data.ch_switch.link_id != NL80211_DRV_LINK_ID_NA) {