diff options
author | Shan Palanisamy <shanp@qca.qualcomm.com> | 2012-02-16 19:47:14 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-02-16 19:47:14 +0200 |
commit | ed53dec02315d0221c9e02473a9d1201a5948a56 (patch) | |
tree | 8d1c3c4d7e77734b7ecc169c43fd9e26ab06a200 | |
parent | 07bcdbb150bfd41acb271198e1babe5a9df93204 (diff) | |
download | external_wpa_supplicant_8_ti-ed53dec02315d0221c9e02473a9d1201a5948a56.zip external_wpa_supplicant_8_ti-ed53dec02315d0221c9e02473a9d1201a5948a56.tar.gz external_wpa_supplicant_8_ti-ed53dec02315d0221c9e02473a9d1201a5948a56.tar.bz2 |
Split hostapd_cleanup() into two parts
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r-- | src/ap/hostapd.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 6efc52d..21a7358 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -227,21 +227,9 @@ static int hostapd_broadcast_wep_set(struct hostapd_data *hapd) 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); hapd->iapp = NULL; accounting_deinit(hapd); @@ -278,6 +266,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 * @iface: Pointer to interface data * |