Add CTRL-EVENT-CHANNEL-SWITCH event to indicate channel changes
This provides information of the channel switch to wpa_supplicant control interface monitors. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e9f2d54f44
commit
37fd0be2d3
2 changed files with 11 additions and 0 deletions
|
@ -76,6 +76,8 @@ extern "C" {
|
||||||
#define WPA_EVENT_SIGNAL_CHANGE "CTRL-EVENT-SIGNAL-CHANGE "
|
#define WPA_EVENT_SIGNAL_CHANGE "CTRL-EVENT-SIGNAL-CHANGE "
|
||||||
/** Regulatory domain channel */
|
/** Regulatory domain channel */
|
||||||
#define WPA_EVENT_REGDOM_CHANGE "CTRL-EVENT-REGDOM-CHANGE "
|
#define WPA_EVENT_REGDOM_CHANGE "CTRL-EVENT-REGDOM-CHANGE "
|
||||||
|
/** Channel switch (followed by freq=<MHz> and other channel parameters) */
|
||||||
|
#define WPA_EVENT_CHANNEL_SWITCH "CTRL-EVENT-CHANNEL-SWITCH "
|
||||||
|
|
||||||
/** IP subnet status change notification
|
/** IP subnet status change notification
|
||||||
*
|
*
|
||||||
|
|
|
@ -3669,6 +3669,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
if (!data || !wpa_s->current_ssid)
|
if (!data || !wpa_s->current_ssid)
|
||||||
break;
|
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->assoc_freq = data->ch_switch.freq;
|
||||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue