18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/*
28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hostapd / Station table
31f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Copyright (c) 2002-2011, Jouni Malinen <j@w1.fi>
48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt *
5c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license.
6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details.
78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */
88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef STA_INFO_H
108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define STA_INFO_H
118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* STA flags */
138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_AUTH BIT(0)
148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_ASSOC BIT(1)
158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_AUTHORIZED BIT(5)
168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_PENDING_POLL BIT(6) /* pending activity poll not ACKed */
178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_SHORT_PREAMBLE BIT(7)
188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_PREAUTH BIT(8)
198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_WMM BIT(9)
208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_MFP BIT(10)
218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_HT BIT(11)
228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_WPS BIT(12)
238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_MAYBE_WPS BIT(13)
248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_WDS BIT(14)
258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_ASSOC_REQ_OK BIT(15)
261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WLAN_STA_WPS2 BIT(16)
2704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WLAN_STA_GAS BIT(17)
2861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WLAN_STA_VHT BIT(18)
29fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define WLAN_STA_WNM_SLEEP_MODE BIT(19)
30bd14a57187b024f49f5b9ace55ef457d8d04650aDmitry Shmidt#define WLAN_STA_VHT_OPMODE_ENABLED BIT(20)
311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WLAN_STA_PENDING_DISASSOC_CB BIT(29)
321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_STA_NONERP BIT(31)
348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Maximum number of supported rates (from both Supported Rates and Extended
368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Supported Rates IEs). */
378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WLAN_SUPP_RATES_MAX 32
388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct sta_info {
418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct sta_info *next; /* next entry in sta list */
428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct sta_info *hnext; /* next entry in hash table list */
438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u8 addr[6];
448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u16 aid; /* STA's unique AID (1 .. 2007) or 0 if not yet assigned */
458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u32 flags; /* Bitfield of WLAN_STA_* */
468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u16 capability;
478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u16 listen_interval; /* or beacon_int for APs */
488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u8 supported_rates[WLAN_SUPP_RATES_MAX];
498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int supported_rates_len;
501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt	u8 qosinfo; /* Valid when WLAN_STA_WMM is set */
518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int nonerp_set:1;
538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int no_short_slot_time_set:1;
548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int no_short_preamble_set:1;
558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int no_ht_gf_set:1;
568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int no_ht_set:1;
577832adbbd72a1b784b7fb74a71a5d4085b0cb0d3Dmitry Shmidt	unsigned int ht40_intolerant_set:1;
588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int ht_20mhz_set:1;
598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned int no_p2p_set:1;
60051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt	unsigned int qos_map_enabled:1;
61f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	unsigned int remediation:1;
62f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	unsigned int hs20_deauth_requested:1;
639ead16e203b81d44a2d84eadc2901ceeb7daf805Dmitry Shmidt	unsigned int session_timeout_set:1;
648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u16 auth_alg;
668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	enum {
68b6e9aaf735990dc64cdb6efccc03d076768eabf3Dmitry Shmidt		STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE,
69b6e9aaf735990dc64cdb6efccc03d076768eabf3Dmitry Shmidt		STA_DISASSOC_FROM_CLI
708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	} timeout_next;
718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt	u16 deauth_reason;
731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt	u16 disassoc_reason;
741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt
758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	/* IEEE 802.1X related data */
768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct eapol_state_machine *eapol_sm;
778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u32 acct_session_id_hi;
798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u32 acct_session_id_lo;
80fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt	struct os_reltime acct_session_start;
818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int acct_session_started;
828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int acct_terminate_cause; /* Acct-Terminate-Cause */
838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int acct_interim_interval; /* Acct-Interim-Interval */
848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned long last_rx_bytes;
868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	unsigned long last_tx_bytes;
878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u32 acct_input_gigawords; /* Acct-Input-Gigawords */
888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u32 acct_output_gigawords; /* Acct-Output-Gigawords */
898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u8 *challenge; /* IEEE 802.11 Shared Key Authentication Challenge */
918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct wpa_state_machine *wpa_sm;
938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct rsn_preauth_interface *preauth_iface;
948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct hostapd_ssid *ssid; /* SSID selection based on (Re)AssocReq */
968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct hostapd_ssid *ssid_probe; /* SSID selection based on ProbeReq */
978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int vlan_id;
99d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt	 /* PSKs from RADIUS authentication server */
100d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt	struct hostapd_sta_wpa_psk_short *psk;
1018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
10261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt	char *identity; /* User-Name from RADIUS */
10361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt	char *radius_cui; /* Chargeable-User-Identity from RADIUS */
10461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt
1058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct ieee80211_ht_capabilities *ht_capabilities;
10661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt	struct ieee80211_vht_capabilities *vht_capabilities;
107bd14a57187b024f49f5b9ace55ef457d8d04650aDmitry Shmidt	u8 vht_opmode;
1088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifdef CONFIG_IEEE80211W
1108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int sa_query_count; /* number of pending SA Query requests;
1118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			     * 0 = no SA Query in progress */
1128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	int sa_query_timed_out;
1138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	u8 *sa_query_trans_id; /* buffer of WLAN_SA_QUERY_TR_ID_LEN *
1148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				* sa_query_count octets of pending SA Query
1158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				* transaction identifiers */
11604f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt	struct os_reltime sa_query_start;
1178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* CONFIG_IEEE80211W */
1188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
11904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#ifdef CONFIG_INTERWORKING
12004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define GAS_DIALOG_MAX 8 /* Max concurrent dialog number */
12104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt	struct gas_dialog_info *gas_dialog;
12204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt	u8 gas_dialog_next;
12304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#endif /* CONFIG_INTERWORKING */
12404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt
1258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct wpabuf *wps_ie; /* WPS IE from (Re)Association Request */
1268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	struct wpabuf *p2p_ie; /* P2P IE from (Re)Association Request */
127d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt	struct wpabuf *hs20_ie; /* HS 2.0 IE from (Re)Association Request */
128f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	u8 remediation_method;
129f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	char *remediation_url; /* HS 2.0 Subscription Remediation Server URL */
130f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	struct wpabuf *hs20_deauth_req;
131f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	char *hs20_session_info_url;
132f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt	int hs20_disassoc_timer;
133d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt
13404f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt	struct os_reltime connected_time;
135d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt
136d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt#ifdef CONFIG_SAE
137a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt	struct sae_data *sae;
138d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt#endif /* CONFIG_SAE */
1399ead16e203b81d44a2d84eadc2901ceeb7daf805Dmitry Shmidt
1409ead16e203b81d44a2d84eadc2901ceeb7daf805Dmitry Shmidt	u32 session_timeout; /* valid only if session_timeout_set == 1 */
1418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt};
1428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Default value for maximum station inactivity. After AP_MAX_INACTIVITY has
1458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * passed since last received frame from the station, a nullfunc data frame is
1468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sent to the station. If this frame is not acknowledged and no other frames
1478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * have been received, the station will be disassociated after
1481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * AP_DISASSOC_DELAY seconds. Similarly, the station will be deauthenticated
1498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * after AP_DEAUTH_DELAY seconds has passed after disassociation. */
1508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_MAX_INACTIVITY (5 * 60)
1518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_DISASSOC_DELAY (1)
1528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_DEAUTH_DELAY (1)
1538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Number of seconds to keep STA entry with Authenticated flag after it has
1548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * been disassociated. */
1558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_MAX_INACTIVITY_AFTER_DISASSOC (1 * 30)
1568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Number of seconds to keep STA entry after it has been deauthenticated. */
1578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_MAX_INACTIVITY_AFTER_DEAUTH (1 * 5)
1588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_data;
1618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_for_each_sta(struct hostapd_data *hapd,
1638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		    int (*cb)(struct hostapd_data *hapd, struct sta_info *sta,
1648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			      void *ctx),
1658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		    void *ctx);
1668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta);
167391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtstruct sta_info * ap_get_sta_p2p(struct hostapd_data *hapd, const u8 *addr);
1688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta);
1698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta);
1708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid hostapd_free_stas(struct hostapd_data *hapd);
1718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_handle_timer(void *eloop_ctx, void *timeout_ctx);
1725460547a121207cf7a99eac45e05fcdd83be3161Dmitry Shmidtvoid ap_sta_replenish_timeout(struct hostapd_data *hapd, struct sta_info *sta,
1735460547a121207cf7a99eac45e05fcdd83be3161Dmitry Shmidt			      u32 session_timeout);
1748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta,
1758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			    u32 session_timeout);
1768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_no_session_timeout(struct hostapd_data *hapd,
1778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			       struct sta_info *sta);
178f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidtvoid ap_sta_session_warning_timeout(struct hostapd_data *hapd,
179f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt				    struct sta_info *sta, int warning_time);
1808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct sta_info * ap_sta_add(struct hostapd_data *hapd, const u8 *addr);
1818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta,
1828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			 u16 reason);
1838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
1848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			   u16 reason);
18504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#ifdef CONFIG_WPS
18604949598a23f501be6eec21697465fd46a28840aDmitry Shmidtint ap_sta_wps_cancel(struct hostapd_data *hapd,
18704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt		      struct sta_info *sta, void *ctx);
18804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#endif /* CONFIG_WPS */
1898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta,
1908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		     int old_vlanid);
1918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
1928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
1938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta);
1948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_disconnect(struct hostapd_data *hapd, struct sta_info *sta,
1958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		       const u8 *addr, u16 reason);
1968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
1978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid ap_sta_set_authorized(struct hostapd_data *hapd,
1988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			   struct sta_info *sta, int authorized);
1998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline int ap_sta_is_authorized(struct sta_info *sta)
2008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{
2018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt	return sta->flags & WLAN_STA_AUTHORIZED;
2028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}
2038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
2041f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid ap_sta_deauth_cb(struct hostapd_data *hapd, struct sta_info *sta);
2051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid ap_sta_disassoc_cb(struct hostapd_data *hapd, struct sta_info *sta);
2061f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt
207fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidtint ap_sta_flags_txt(u32 flags, char *buf, size_t buflen);
208fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt
2098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* STA_INFO_H */
210