FST: Clean up fst_group_update_ie()

None of the callers passed in cleaning_up == TRUE, so drop that unused
code path.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-07-17 16:59:09 +03:00 committed by Jouni Malinen
parent 2bb51eddad
commit f5f1cc9307
3 changed files with 12 additions and 19 deletions

View file

@ -95,7 +95,7 @@ struct fst_iface * fst_attach(const char *ifname, const u8 *own_addr,
} }
fst_group_attach_iface(group, iface); fst_group_attach_iface(group, iface);
fst_group_update_ie(group, FALSE); fst_group_update_ie(group);
foreach_fst_ctrl_call(on_iface_added, iface); foreach_fst_ctrl_call(on_iface_added, iface);
@ -117,7 +117,7 @@ void fst_detach(struct fst_iface *iface)
foreach_fst_ctrl_call(on_iface_removed, iface); foreach_fst_ctrl_call(on_iface_removed, iface);
fst_group_detach_iface(group, iface); fst_group_detach_iface(group, iface);
fst_iface_delete(iface); fst_iface_delete(iface);
fst_group_update_ie(group, FALSE); fst_group_update_ie(group);
fst_group_delete_if_empty(group); fst_group_delete_if_empty(group);
} }
@ -194,7 +194,7 @@ void fst_notify_peer_connected(struct fst_iface *iface, const u8 *addr)
return; return;
#ifndef HOSTAPD #ifndef HOSTAPD
fst_group_update_ie(fst_iface_get_group(iface), FALSE); fst_group_update_ie(fst_iface_get_group(iface));
#endif /* HOSTAPD */ #endif /* HOSTAPD */
fst_printf_iface(iface, MSG_DEBUG, MACSTR " became connected", fst_printf_iface(iface, MSG_DEBUG, MACSTR " became connected",
@ -210,7 +210,7 @@ void fst_notify_peer_disconnected(struct fst_iface *iface, const u8 *addr)
return; return;
#ifndef HOSTAPD #ifndef HOSTAPD
fst_group_update_ie(fst_iface_get_group(iface), FALSE); fst_group_update_ie(fst_iface_get_group(iface));
#endif /* HOSTAPD */ #endif /* HOSTAPD */
fst_printf_iface(iface, MSG_DEBUG, MACSTR " became disconnected", fst_printf_iface(iface, MSG_DEBUG, MACSTR " became disconnected",

View file

@ -444,25 +444,18 @@ Boolean fst_group_delete_if_empty(struct fst_group *group)
} }
void fst_group_update_ie(struct fst_group *g, Boolean cleaning_up) void fst_group_update_ie(struct fst_group *g)
{ {
struct fst_iface *i; struct fst_iface *i;
foreach_fst_group_iface(g, i) { foreach_fst_group_iface(g, i) {
if (!cleaning_up) { struct wpabuf *mbie = fst_group_create_mb_ie(g, i);
struct wpabuf *mbie = fst_group_create_mb_ie(g, i);
if (!mbie) if (!mbie)
fst_printf_iface(i, MSG_WARNING, fst_printf_iface(i, MSG_WARNING, "cannot create MB IE");
"cannot create MB IE");
fst_iface_attach_mbie(i, mbie); fst_iface_attach_mbie(i, mbie);
fst_iface_set_ies(i, mbie); fst_iface_set_ies(i, mbie);
fst_printf_iface(i, MSG_DEBUG, fst_printf_iface(i, MSG_DEBUG, "multi-band IE set to %p", mbie);
"multi-band IE set to %p", mbie);
} else {
fst_iface_attach_mbie(i, NULL);
fst_iface_set_ies(i, NULL);
}
} }
} }

View file

@ -27,7 +27,7 @@ void fst_group_attach_iface(struct fst_group *g, struct fst_iface *i);
void fst_group_detach_iface(struct fst_group *g, struct fst_iface *i); void fst_group_detach_iface(struct fst_group *g, struct fst_iface *i);
void fst_group_delete(struct fst_group *g); void fst_group_delete(struct fst_group *g);
void fst_group_update_ie(struct fst_group *g, Boolean cleaning_up); void fst_group_update_ie(struct fst_group *g);
static inline Boolean fst_group_has_ifaces(struct fst_group *g) static inline Boolean fst_group_has_ifaces(struct fst_group *g)
{ {