1/*
2 * hostapd / AP table
3 * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2003-2004, Instant802 Networks, Inc.
5 * Copyright (c) 2006, Devicescape Software, Inc.
6 *
7 * This software may be distributed under the terms of the BSD license.
8 * See README for more details.
9 */
10
11#ifndef AP_LIST_H
12#define AP_LIST_H
13
14struct ap_info {
15	/* Note: next/prev pointers are updated whenever a new beacon is
16	 * received because these are used to find the least recently used
17	 * entries. */
18	struct ap_info *next; /* next entry in AP list */
19	struct ap_info *prev; /* previous entry in AP list */
20	struct ap_info *hnext; /* next entry in hash table list */
21	u8 addr[6];
22	u8 supported_rates[WLAN_SUPP_RATES_MAX];
23	int erp; /* ERP Info or -1 if ERP info element not present */
24
25	int channel;
26
27	int ht_support;
28
29	struct os_reltime last_beacon;
30};
31
32struct ieee802_11_elems;
33struct hostapd_frame_info;
34
35void ap_list_process_beacon(struct hostapd_iface *iface,
36			    const struct ieee80211_mgmt *mgmt,
37			    struct ieee802_11_elems *elems,
38			    struct hostapd_frame_info *fi);
39#ifdef NEED_AP_MLME
40int ap_list_init(struct hostapd_iface *iface);
41void ap_list_deinit(struct hostapd_iface *iface);
42#else /* NEED_AP_MLME */
43static inline int ap_list_init(struct hostapd_iface *iface)
44{
45	return 0;
46}
47
48static inline void ap_list_deinit(struct hostapd_iface *iface)
49{
50}
51#endif /* NEED_AP_MLME */
52
53#endif /* AP_LIST_H */
54