Split hostapd_cleanup() into two parts
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
07bcdbb150
commit
ed53dec023
1 changed files with 20 additions and 14 deletions
|
@ -227,21 +227,9 @@ static int hostapd_broadcast_wep_set(struct hostapd_data *hapd)
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* hostapd_cleanup - Per-BSS cleanup (deinitialization)
|
|
||||||
* @hapd: Pointer to BSS data
|
|
||||||
*
|
|
||||||
* This function is used to free all per-BSS data structures and resources.
|
|
||||||
* This gets called in a loop for each BSS between calls to
|
|
||||||
* hostapd_cleanup_iface_pre() and hostapd_cleanup_iface() when an interface
|
|
||||||
* is deinitialized. Most of the modules that are initialized in
|
|
||||||
* hostapd_setup_bss() are deinitialized here.
|
|
||||||
*/
|
|
||||||
static void hostapd_cleanup(struct hostapd_data *hapd)
|
|
||||||
{
|
|
||||||
if (hapd->iface->ctrl_iface_deinit)
|
|
||||||
hapd->iface->ctrl_iface_deinit(hapd);
|
|
||||||
|
|
||||||
|
static void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
iapp_deinit(hapd->iapp);
|
iapp_deinit(hapd->iapp);
|
||||||
hapd->iapp = NULL;
|
hapd->iapp = NULL;
|
||||||
accounting_deinit(hapd);
|
accounting_deinit(hapd);
|
||||||
|
@ -277,6 +265,24 @@ static void hostapd_cleanup(struct hostapd_data *hapd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hostapd_cleanup - Per-BSS cleanup (deinitialization)
|
||||||
|
* @hapd: Pointer to BSS data
|
||||||
|
*
|
||||||
|
* This function is used to free all per-BSS data structures and resources.
|
||||||
|
* This gets called in a loop for each BSS between calls to
|
||||||
|
* hostapd_cleanup_iface_pre() and hostapd_cleanup_iface() when an interface
|
||||||
|
* is deinitialized. Most of the modules that are initialized in
|
||||||
|
* hostapd_setup_bss() are deinitialized here.
|
||||||
|
*/
|
||||||
|
static void hostapd_cleanup(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
if (hapd->iface->ctrl_iface_deinit)
|
||||||
|
hapd->iface->ctrl_iface_deinit(hapd);
|
||||||
|
hostapd_free_hapd_data(hapd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hostapd_cleanup_iface_pre - Preliminary per-interface cleanup
|
* hostapd_cleanup_iface_pre - Preliminary per-interface cleanup
|
||||||
* @iface: Pointer to interface data
|
* @iface: Pointer to interface data
|
||||||
|
|
Loading…
Reference in a new issue