Update wpa_supplicant channel list on FLUSH

Try to make sure the driver channel list state is synchronized with
wpa_supplicant whenever explicitly clearing state (e.g., between hwsim
test cases).

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-01-01 15:58:46 +02:00
parent d8dda601f0
commit 32bb47faa1
3 changed files with 13 additions and 6 deletions

View file

@ -3633,8 +3633,8 @@ static const char * reg_type_str(enum reg_type type)
}
static void wpa_supplicant_update_channel_list(
struct wpa_supplicant *wpa_s, struct channel_list_changed *info)
void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
struct channel_list_changed *info)
{
struct wpa_supplicant *ifs;
u8 dfs_domain;
@ -3648,10 +3648,13 @@ static void wpa_supplicant_update_channel_list(
for (ifs = wpa_s; ifs->parent && ifs != ifs->parent; ifs = ifs->parent)
;
wpa_msg(ifs, MSG_INFO, WPA_EVENT_REGDOM_CHANGE "init=%s type=%s%s%s",
reg_init_str(info->initiator), reg_type_str(info->type),
info->alpha2[0] ? " alpha2=" : "",
info->alpha2[0] ? info->alpha2 : "");
if (info) {
wpa_msg(ifs, MSG_INFO,
WPA_EVENT_REGDOM_CHANGE "init=%s type=%s%s%s",
reg_init_str(info->initiator), reg_type_str(info->type),
info->alpha2[0] ? " alpha2=" : "",
info->alpha2[0] ? info->alpha2 : "");
}
if (wpa_s->drv_priv == NULL)
return; /* Ignore event during drv initialization */