hostapd: Wait for channel list update after country code change
If hostapd is requested to set the country code and the previous country code differs from the new one, the channel list information from the driver may change. This change may not be instant, so wait for an EVENT_CHANNEL_LIST_CHANGED event before continuing interface setup with fetching of the channel list information. This fixes issues where the selected channel is not available based on the previous regulatory data and update through CRDA takes some time. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ae134e1d2b
commit
f0793bf191
6 changed files with 119 additions and 1 deletions
|
@ -242,4 +242,11 @@ static inline int hostapd_drv_get_survey(struct hostapd_data *hapd,
|
|||
return hapd->driver->get_survey(hapd->drv_priv, freq);
|
||||
}
|
||||
|
||||
static inline int hostapd_get_country(struct hostapd_data *hapd, char *alpha2)
|
||||
{
|
||||
if (hapd->driver == NULL || hapd->driver->get_country == NULL)
|
||||
return -1;
|
||||
return hapd->driver->get_country(hapd->drv_priv, alpha2);
|
||||
}
|
||||
|
||||
#endif /* AP_DRV_OPS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue