diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index d78ea64c1..df26c7bce 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -76,6 +76,8 @@ extern "C" { #define WPA_EVENT_SIGNAL_CHANGE "CTRL-EVENT-SIGNAL-CHANGE " /** Regulatory domain channel */ #define WPA_EVENT_REGDOM_CHANGE "CTRL-EVENT-REGDOM-CHANGE " +/** Channel switch (followed by freq= and other channel parameters) */ +#define WPA_EVENT_CHANNEL_SWITCH "CTRL-EVENT-CHANNEL-SWITCH " /** IP subnet status change notification * diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 057f630b9..b7a3bc0e7 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3669,6 +3669,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, if (!data || !wpa_s->current_ssid) break; + wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_CHANNEL_SWITCH + "freq=%d ht_enabled=%d ch_offset=%d ch_width=%s cf1=%d cf2=%d", + data->ch_switch.freq, + data->ch_switch.ht_enabled, + data->ch_switch.ch_offset, + channel_width_to_string(data->ch_switch.ch_width), + data->ch_switch.cf1, + data->ch_switch.cf2); + wpa_s->assoc_freq = data->ch_switch.freq; wpa_s->current_ssid->frequency = data->ch_switch.freq;