Lines Matching refs:bss

39 	struct dl_list bss;  member
45 static void bss_free(struct bgscan_learn_bss *bss) in bss_free() argument
47 os_free(bss->neigh); in bss_free()
48 os_free(bss); in bss_free()
68 static void bgscan_learn_add_neighbor(struct bgscan_learn_bss *bss, in bgscan_learn_add_neighbor() argument
73 if (os_memcmp(bss->bssid, bssid, ETH_ALEN) == 0) in bgscan_learn_add_neighbor()
75 if (bssid_in_array(bss->neigh, bss->num_neigh, bssid)) in bgscan_learn_add_neighbor()
78 n = os_realloc_array(bss->neigh, bss->num_neigh + 1, ETH_ALEN); in bgscan_learn_add_neighbor()
82 os_memcpy(n + bss->num_neigh * ETH_ALEN, bssid, ETH_ALEN); in bgscan_learn_add_neighbor()
83 bss->neigh = n; in bgscan_learn_add_neighbor()
84 bss->num_neigh++; in bgscan_learn_add_neighbor()
91 struct bgscan_learn_bss *bss; in bgscan_learn_get_bss() local
93 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) { in bgscan_learn_get_bss()
94 if (os_memcmp(bss->bssid, bssid, ETH_ALEN) == 0) in bgscan_learn_get_bss()
95 return bss; in bgscan_learn_get_bss()
105 struct bgscan_learn_bss *bss; in bgscan_learn_load() local
127 bss = os_zalloc(sizeof(*bss)); in bgscan_learn_load()
128 if (!bss) in bgscan_learn_load()
130 if (hwaddr_aton(buf + 4, bss->bssid) < 0) { in bgscan_learn_load()
131 bss_free(bss); in bgscan_learn_load()
134 bss->freq = atoi(buf + 4 + 18); in bgscan_learn_load()
135 dl_list_add(&data->bss, &bss->list); in bgscan_learn_load()
138 MAC2STR(bss->bssid), bss->freq); in bgscan_learn_load()
146 bss = bgscan_learn_get_bss(data, addr); in bgscan_learn_load()
147 if (bss == NULL) in bgscan_learn_load()
152 bgscan_learn_add_neighbor(bss, addr); in bgscan_learn_load()
164 struct bgscan_learn_bss *bss; in bgscan_learn_save() local
177 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) { in bgscan_learn_save()
179 MAC2STR(bss->bssid), bss->freq); in bgscan_learn_save()
182 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) { in bgscan_learn_save()
184 for (i = 0; i < bss->num_neigh; i++) { in bgscan_learn_save()
186 MAC2STR(bss->bssid), in bgscan_learn_save()
187 MAC2STR(bss->neigh + i * ETH_ALEN)); in bgscan_learn_save()
214 struct bgscan_learn_bss *bss; in bgscan_learn_get_freqs() local
219 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) { in bgscan_learn_get_freqs()
220 if (in_array(freqs, bss->freq)) in bgscan_learn_get_freqs()
226 freqs[*count] = bss->freq; in bgscan_learn_get_freqs()
392 dl_list_init(&data->bss); in bgscan_learn_init()
450 struct bgscan_learn_bss *bss, *n; in bgscan_learn_deinit() local
457 dl_list_for_each_safe(bss, n, &data->bss, struct bgscan_learn_bss, in bgscan_learn_deinit()
459 dl_list_del(&bss->list); in bgscan_learn_deinit()
460 bss_free(bss); in bgscan_learn_deinit()
468 struct wpa_scan_res *bss) in bgscan_learn_bss_match() argument
472 ie = wpa_scan_get_ie(bss, WLAN_EID_SSID); in bgscan_learn_bss_match()
515 struct bgscan_learn_bss *bss; in bgscan_learn_notify_scan() local
520 bss = bgscan_learn_get_bss(data, res->bssid); in bgscan_learn_notify_scan()
521 if (bss && bss->freq != res->freq) { in bgscan_learn_notify_scan()
524 MAC2STR(res->bssid), bss->freq, res->freq); in bgscan_learn_notify_scan()
525 bss->freq = res->freq; in bgscan_learn_notify_scan()
526 } else if (!bss) { in bgscan_learn_notify_scan()
529 bss = os_zalloc(sizeof(*bss)); in bgscan_learn_notify_scan()
530 if (!bss) in bgscan_learn_notify_scan()
532 os_memcpy(bss->bssid, res->bssid, ETH_ALEN); in bgscan_learn_notify_scan()
533 bss->freq = res->freq; in bgscan_learn_notify_scan()
534 dl_list_add(&data->bss, &bss->list); in bgscan_learn_notify_scan()
539 bgscan_learn_add_neighbor(bss, addr); in bgscan_learn_notify_scan()