hostapd: Fix interface enabling/disabling and DFS
The 'started' state was tracked incorrectly. It also broke DFS as it was using hostapd_enable/disable_iface() functions. Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
This commit is contained in:
parent
1cba9bea96
commit
68d628accd
1 changed files with 7 additions and 1 deletions
|
@ -243,6 +243,13 @@ static int hostapd_broadcast_wep_set(struct hostapd_data *hapd)
|
||||||
|
|
||||||
static void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
static void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
|
if (!hapd->started) {
|
||||||
|
wpa_printf(MSG_ERROR, "%s: Interface %s wasn't started",
|
||||||
|
__func__, hapd->conf->iface);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hapd->started = 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
||||||
iapp_deinit(hapd->iapp);
|
iapp_deinit(hapd->iapp);
|
||||||
hapd->iapp = NULL;
|
hapd->iapp = NULL;
|
||||||
|
@ -306,7 +313,6 @@ static void hostapd_cleanup(struct hostapd_data *hapd)
|
||||||
hapd->iface->interfaces->ctrl_iface_deinit)
|
hapd->iface->interfaces->ctrl_iface_deinit)
|
||||||
hapd->iface->interfaces->ctrl_iface_deinit(hapd);
|
hapd->iface->interfaces->ctrl_iface_deinit(hapd);
|
||||||
hostapd_free_hapd_data(hapd);
|
hostapd_free_hapd_data(hapd);
|
||||||
hapd->started = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue