10 #define WPA_BSS_QUAL_INVALID BIT(0)
11 #define WPA_BSS_NOISE_INVALID BIT(1)
12 #define WPA_BSS_LEVEL_INVALID BIT(2)
13 #define WPA_BSS_LEVEL_DBM BIT(3)
14 #define WPA_BSS_AUTHENTICATED BIT(4)
15 #define WPA_BSS_ASSOCIATED BIT(5)
16 #define WPA_BSS_ANQP_FETCH_TRIED BIT(6)
25 #ifdef CONFIG_INTERWORKING
26 struct wpabuf *capability_list;
28 struct wpabuf *network_auth_type;
29 struct wpabuf *roaming_consortium;
30 struct wpabuf *ip_addr_type_availability;
33 struct wpabuf *domain_name;
36 struct wpabuf *hs20_capability_list;
37 struct wpabuf *hs20_operator_friendly_name;
38 struct wpabuf *hs20_wan_metrics;
39 struct wpabuf *hs20_connection_capability;
40 struct wpabuf *hs20_operating_class;
41 struct wpabuf *hs20_osu_providers_list;
123 unsigned int idf,
unsigned int idl);
137 static inline int bss_is_dmg(
const struct wpa_bss *bss)
139 return bss->
freq > 45000;
142 static inline void wpa_bss_update_level(
struct wpa_bss *bss,
int new_level)
144 if (bss != NULL && new_level < 0)
145 bss->
level = new_level;
unsigned int scan_miss_count
Number of counts without seeing this BSS.
Definition: bss.h:60
void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, struct wpa_scan_res *res, struct os_reltime *fetch_time)
Update a BSS table entry based on a scan result.
Definition: bss.c:629
u16 caps
Capability information field in host byte order.
Definition: bss.h:78
void wpa_bss_deinit(struct wpa_supplicant *wpa_s)
Deinitialize BSS table.
Definition: bss.c:875
struct wpa_bss * wpa_bss_get(struct wpa_supplicant *wpa_s, const u8 *bssid, const u8 *ssid, size_t ssid_len)
Fetch a BSS table entry based on BSSID and SSID.
Definition: bss.c:234
struct wpa_bss * wpa_bss_get_id(struct wpa_supplicant *wpa_s, unsigned int id)
Fetch a BSS table entry based on identifier.
Definition: bss.c:958
void wpa_bss_update_start(struct wpa_supplicant *wpa_s)
Start a BSS table update from scan results.
Definition: bss.c:610
u8 bssid[ETH_ALEN]
BSSID.
Definition: bss.h:66
unsigned int last_update_idx
Index of the last scan update.
Definition: bss.h:62
unsigned int flags
Information flags about the BSS/IBSS (WPA_BSS_*)
Definition: bss.h:64
int qual
Signal quality.
Definition: bss.h:80
const u8 * wpa_bss_get_vendor_ie(const struct wpa_bss *bss, u32 vendor_type)
Fetch a vendor information element from a BSS entry.
Definition: bss.c:1029
struct wpabuf * wpa_bss_get_vendor_ie_multi_beacon(const struct wpa_bss *bss, u32 vendor_type)
Fetch vendor IE data from a BSS entry.
Definition: bss.c:1140
u16 beacon_int
Beacon interval in TUs (host byte order)
Definition: bss.h:76
Scan result for an BSS/IBSS.
Definition: driver.h:253
size_t ssid_len
Length of SSID.
Definition: bss.h:72
struct wpa_bss_anqp * wpa_bss_anqp_alloc(void)
Allocate ANQP data structure for a BSS entry.
Definition: bss.c:53
struct dl_list list_id
List entry for struct wpa_supplicant::bss_id.
Definition: bss.h:56
struct wpa_bss * wpa_bss_get_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid)
Fetch a BSS table entry based on BSSID.
Definition: bss.c:887
ANQP data for a BSS entry (struct wpa_bss)
Definition: bss.h:22
int wpa_bss_get_max_rate(const struct wpa_bss *bss)
Get maximum legacy TX rate supported in a BSS.
Definition: bss.c:1177
struct wpabuf * wpa_bss_get_vendor_ie_multi(const struct wpa_bss *bss, u32 vendor_type)
Fetch vendor IE data from a BSS entry.
Definition: bss.c:1096
struct wpa_bss * wpa_bss_get_bssid_latest(struct wpa_supplicant *wpa_s, const u8 *bssid)
Fetch the latest BSS table entry based on BSSID.
Definition: bss.c:912
int wpa_bss_get_bit_rates(const struct wpa_bss *bss, u8 **rates)
Get legacy TX rates supported in a BSS.
Definition: bss.c:1208
struct wpa_bss_anqp * anqp
ANQP data.
Definition: bss.h:94
int freq
Frequency of the channel in MHz (e.g., 2412 = channel 1)
Definition: bss.h:74
u8 ssid[SSID_MAX_LEN]
SSID.
Definition: bss.h:70
const u8 * wpa_bss_get_ie(const struct wpa_bss *bss, u8 ie)
Fetch a specified information element from a BSS entry.
Definition: bss.c:1001
int level
Signal level.
Definition: bss.h:84
Doubly-linked list.
Definition: list.h:12
int wpa_bss_init(struct wpa_supplicant *wpa_s)
Initialize BSS table.
Definition: bss.c:842
void wpa_bss_flush(struct wpa_supplicant *wpa_s)
Flush all unused BSS entries.
Definition: bss.c:854
void wpa_bss_update_end(struct wpa_supplicant *wpa_s, struct scan_info *info, int new_scan)
End a BSS table update from scan results.
Definition: bss.c:777
size_t beacon_ie_len
Length of the following Beacon IE field in octets.
Definition: bss.h:98
unsigned int users
Number of BSS entries referring to this ANQP data instance.
Definition: bss.h:24
BSS table.
Definition: bss.h:52
int wpa_bss_anqp_unshare_alloc(struct wpa_bss *bss)
Unshare ANQP data (if shared) in a BSS entry.
Definition: bss.c:110
size_t ie_len
Length of the following IE field in octets (from Probe Response)
Definition: bss.h:96
struct wpa_bss * wpa_bss_get_p2p_dev_addr(struct wpa_supplicant *wpa_s, const u8 *dev_addr)
Fetch a BSS table entry based on P2P Device Addr.
Definition: bss.c:936
struct dl_list list
List entry for struct wpa_supplicant::bss.
Definition: bss.h:54
u64 tsf
Timestamp of last Beacon/Probe Response frame.
Definition: bss.h:86
u8 hessid[ETH_ALEN]
HESSID.
Definition: bss.h:68
int noise
Noise level.
Definition: bss.h:82
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
int snr
Signal-to-noise ratio in dB.
Definition: bss.h:92
struct wpa_bss * wpa_bss_get_id_range(struct wpa_supplicant *wpa_s, unsigned int idf, unsigned int idl)
Fetch a BSS table entry based on identifier range.
Definition: bss.c:980
struct os_reltime last_update
Time of the last update (i.e., Beacon or Probe Response RX)
Definition: bss.h:88
void wpa_bss_flush_by_age(struct wpa_supplicant *wpa_s, int age)
Flush old BSS entries.
Definition: bss.c:811
unsigned int id
Unique identifier for this BSS entry.
Definition: bss.h:58
unsigned int est_throughput
Estimated throughput in kbps.
Definition: bss.h:90
const u8 * wpa_bss_get_vendor_ie_beacon(const struct wpa_bss *bss, u32 vendor_type)
Fetch a vendor information from a BSS entry.
Definition: bss.c:1061
Definition: interworking.c:333