Get rid of direct hostapd_for_each_interface() calls
src/ap/*.c must not call functions in hostapd or wpa_supplicant directories directly, so avoid this by using a callback function pointer.
This commit is contained in:
parent
70db2ab308
commit
1b56c26c40
5 changed files with 15 additions and 27 deletions
|
@ -228,6 +228,10 @@ struct hostapd_iface {
|
|||
|
||||
int (*ctrl_iface_init)(struct hostapd_data *hapd);
|
||||
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
|
||||
|
||||
int (*for_each_interface)(struct hapd_interfaces *interfaces,
|
||||
int (*cb)(struct hostapd_iface *iface,
|
||||
void *ctx), void *ctx);
|
||||
};
|
||||
|
||||
/* hostapd.c */
|
||||
|
@ -242,11 +246,6 @@ void hostapd_interface_deinit(struct hostapd_iface *iface);
|
|||
void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
int reassoc);
|
||||
|
||||
/* main.c */
|
||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||
int (*cb)(struct hostapd_iface *iface,
|
||||
void *ctx), void *ctx);
|
||||
|
||||
/* utils.c */
|
||||
int hostapd_register_probereq_cb(struct hostapd_data *hapd,
|
||||
void (*cb)(void *ctx, const u8 *sa,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue