ubus: support readiness notifications
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
05396ebd93
commit
5c72ebc915
3 changed files with 17 additions and 0 deletions
|
@ -2676,6 +2676,8 @@ dfs_offload:
|
|||
#endif /* CONFIG_FST */
|
||||
|
||||
hostapd_set_state(iface, HAPD_IFACE_ENABLED);
|
||||
// TODO: log everything in `hostapd_set_state` directly
|
||||
hostapd_ubus_notify_readiness(hapd);
|
||||
hostapd_owe_update_trans(iface);
|
||||
airtime_policy_update_init(iface);
|
||||
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_ENABLED);
|
||||
|
|
|
@ -1855,6 +1855,16 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *
|
|||
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_readiness(struct hostapd_data *hapd)
|
||||
{
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, "readiness", b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
const char *auth_alg)
|
||||
{
|
||||
|
|
|
@ -70,6 +70,7 @@ int hostapd_ubus_notify_bss_transition_query(
|
|||
const u8 *candidate_list, u16 candidate_list_len);
|
||||
void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
const char *auth_alg);
|
||||
void hostapd_ubus_notify_readiness(struct hostapd_data *hapd);
|
||||
|
||||
#else
|
||||
|
||||
|
@ -112,6 +113,10 @@ static inline void hostapd_ubus_notify(struct hostapd_data *hapd, const char *ty
|
|||
{
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_notify_readiness(struct hostapd_data *hapd)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
const u8 *addr, u8 token,
|
||||
u8 rep_mode,
|
||||
|
|
Loading…
Reference in a new issue