mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 02:44:03 -05:00
wpa_s AP mode: Add notification functions for STA authorized
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
5b49c9d5ed
commit
d8a43924ec
@ -42,6 +42,7 @@
|
|||||||
#include "p2p_supplicant.h"
|
#include "p2p_supplicant.h"
|
||||||
#include "ap.h"
|
#include "ap.h"
|
||||||
#include "ap/sta_info.h"
|
#include "ap/sta_info.h"
|
||||||
|
#include "notify.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_WPS
|
#ifdef CONFIG_WPS
|
||||||
@ -243,6 +244,13 @@ static void ap_wps_event_cb(void *ctx, enum wps_event event,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void ap_sta_authorized_cb(void *ctx, const u8 *mac_addr,
|
||||||
|
int authorized)
|
||||||
|
{
|
||||||
|
wpas_notify_sta_authorized(ctx, mac_addr, authorized);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int ap_vendor_action_rx(void *ctx, const u8 *buf, size_t len, int freq)
|
static int ap_vendor_action_rx(void *ctx, const u8 *buf, size_t len, int freq)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
@ -411,6 +419,8 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
|
|||||||
hapd_iface->bss[i]->wps_reg_success_cb_ctx = wpa_s;
|
hapd_iface->bss[i]->wps_reg_success_cb_ctx = wpa_s;
|
||||||
hapd_iface->bss[i]->wps_event_cb = ap_wps_event_cb;
|
hapd_iface->bss[i]->wps_event_cb = ap_wps_event_cb;
|
||||||
hapd_iface->bss[i]->wps_event_cb_ctx = wpa_s;
|
hapd_iface->bss[i]->wps_event_cb_ctx = wpa_s;
|
||||||
|
hapd_iface->bss[i]->sta_authorized_cb = ap_sta_authorized_cb;
|
||||||
|
hapd_iface->bss[i]->sta_authorized_cb_ctx = wpa_s;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
hapd_iface->bss[i]->p2p = wpa_s->global->p2p;
|
hapd_iface->bss[i]->p2p = wpa_s->global->p2p;
|
||||||
hapd_iface->bss[i]->p2p_group = wpas_p2p_group_init(
|
hapd_iface->bss[i]->p2p_group = wpas_p2p_group_init(
|
||||||
|
@ -416,3 +416,25 @@ void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
||||||
|
static void wpas_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
|
||||||
|
const u8 *sta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant *wpa_s,
|
||||||
|
const u8 *sta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
|
||||||
|
const u8 *mac_addr, int authorized)
|
||||||
|
{
|
||||||
|
if (authorized)
|
||||||
|
wpas_notify_ap_sta_authorized(wpa_s, mac_addr);
|
||||||
|
else
|
||||||
|
wpas_notify_ap_sta_deauthorized(wpa_s, mac_addr);
|
||||||
|
}
|
||||||
|
@ -79,6 +79,8 @@ void wpas_notify_debug_show_keys_changed(struct wpa_global *global);
|
|||||||
void wpas_notify_suspend(struct wpa_global *global);
|
void wpas_notify_suspend(struct wpa_global *global);
|
||||||
void wpas_notify_resume(struct wpa_global *global);
|
void wpas_notify_resume(struct wpa_global *global);
|
||||||
|
|
||||||
|
void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
|
||||||
|
const u8 *mac_addr, int authorized);
|
||||||
void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
|
void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
|
||||||
const u8 *dev_addr, int new_device);
|
const u8 *dev_addr, int new_device);
|
||||||
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
|
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
|
||||||
|
Loading…
Reference in New Issue
Block a user