AP: Add callback for STA authorized transitions
Add a callback for station's authorized transitions to allow wpa_supplicant to emit events in DBus. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
6905dcb1e0
commit
0661eed204
2 changed files with 8 additions and 0 deletions
|
@ -141,6 +141,10 @@ struct hostapd_data {
|
||||||
union wps_event_data *data);
|
union wps_event_data *data);
|
||||||
void *wps_event_cb_ctx;
|
void *wps_event_cb_ctx;
|
||||||
|
|
||||||
|
void (*sta_authorized_cb)(void *ctx, const u8 *mac_addr,
|
||||||
|
int authorized);
|
||||||
|
void *sta_authorized_cb_ctx;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct p2p_data *p2p;
|
struct p2p_data *p2p;
|
||||||
struct p2p_group *p2p_group;
|
struct p2p_group *p2p_group;
|
||||||
|
|
|
@ -763,6 +763,10 @@ void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
sta->flags |= WLAN_STA_AUTHORIZED;
|
sta->flags |= WLAN_STA_AUTHORIZED;
|
||||||
else
|
else
|
||||||
sta->flags &= ~WLAN_STA_AUTHORIZED;
|
sta->flags &= ~WLAN_STA_AUTHORIZED;
|
||||||
|
|
||||||
|
if (hapd->sta_authorized_cb)
|
||||||
|
hapd->sta_authorized_cb(hapd->sta_authorized_cb_ctx,
|
||||||
|
sta->addr, authorized);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue