Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] zephy: Implement AP connected Stations events
Browse files Browse the repository at this point in the history
These events notify the Wi-Fi management about Station connection and
disconnection.

Implements SHEL-2345.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
  • Loading branch information
krish2718 committed Jan 2, 2024
1 parent 8590cd4 commit eb64718
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ap/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include "vlan.h"
#include "wps_hostapd.h"

#ifdef CONFIG_ZEPHYR
#include <supp_events.h>
#endif /* CONFIG_ZEPHYR */

static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
struct sta_info *sta);
static void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx);
Expand Down Expand Up @@ -1268,6 +1272,11 @@ void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
u8 addr[ETH_ALEN];
u8 ip_addr_buf[4];
#endif /* CONFIG_P2P */
#ifdef CONFIG_ZEPHYR
enum net_event_wifi_cmd event = authorized ?
NET_EVENT_WIFI_CMD_AP_STA_CONNECTED :
NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED;
#endif /* CONFIG_ZEPHYR */

if (!!authorized == !!(sta->flags & WLAN_STA_AUTHORIZED))
return;
Expand Down Expand Up @@ -1335,6 +1344,11 @@ void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
AP_STA_DISCONNECTED "%s", buf);
}

#ifdef CONFIG_ZEPHYR
send_wifi_mgmt_ap_sta_event(hapd->iface->owner, event,
sta);
#endif /* CONFIG_ZEPHYR */

#ifdef CONFIG_FST
if (hapd->iface->fst) {
if (authorized)
Expand Down

0 comments on commit eb64718

Please sign in to comment.