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 <quic_adisi@quicinc.com>
This commit is contained in:
Aditya Kumar Singh 2024-08-07 09:48:36 +05:30 committed by Jouni Malinen
parent bd8a1f5ff5
commit de2ee083e7

View file

@ -1204,9 +1204,6 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
int chan_offset = 0; int chan_offset = 0;
int ifidx; int ifidx;
wpa_printf(MSG_DEBUG, "nl80211: Channel switch%s event",
finished ? "" : " started");
if (!freq) if (!freq)
return; return;
@ -1218,6 +1215,9 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
return; return;
} }
wpa_printf(MSG_DEBUG, "nl80211: Channel switch%s event for %s",
finished ? "" : " started", bss->ifname);
if (type) { if (type) {
enum nl80211_channel_type ch_type = nla_get_u32(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) if (cf2)
data.ch_switch.cf2 = nla_get_u32(cf2); data.ch_switch.cf2 = nla_get_u32(cf2);
if (link) if (link) {
data.ch_switch.link_id = nla_get_u8(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; data.ch_switch.link_id = NL80211_DRV_LINK_ID_NA;
}
if (finished) { if (finished) {
if (data.ch_switch.link_id != NL80211_DRV_LINK_ID_NA) { if (data.ch_switch.link_id != NL80211_DRV_LINK_ID_NA) {