Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:bss

39 	struct dl_list bss;
45 static void bss_free(struct bgscan_learn_bss *bss)
47 os_free(bss->neigh);
48 os_free(bss);
68 static void bgscan_learn_add_neighbor(struct bgscan_learn_bss *bss,
73 if (os_memcmp(bss->bssid, bssid, ETH_ALEN) == 0)
75 if (bssid_in_array(bss->neigh, bss->num_neigh, bssid))
78 n = os_realloc(bss->neigh, (bss->num_neigh + 1) * ETH_ALEN);
82 os_memcpy(n + bss->num_neigh * ETH_ALEN, bssid, ETH_ALEN);
83 bss->neigh = n;
84 bss->num_neigh++;
91 struct bgscan_learn_bss *bss;
93 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) {
94 if (os_memcmp(bss->bssid, bssid, ETH_ALEN) == 0)
95 return bss;
105 struct bgscan_learn_bss *bss;
126 if (os_strncmp(buf, "BSS ", 4) == 0) {
127 bss = os_zalloc(sizeof(*bss));
128 if (!bss)
130 if (hwaddr_aton(buf + 4, bss->bssid) < 0) {
131 bss_free(bss);
134 bss->freq = atoi(buf + 4 + 18);
135 dl_list_add(&data->bss, &bss->list);
136 wpa_printf(MSG_DEBUG, "bgscan learn: Loaded BSS "
138 MAC2STR(bss->bssid), bss->freq);
146 bss = bgscan_learn_get_bss(data, addr);
147 if (bss == NULL)
152 bgscan_learn_add_neighbor(bss, addr);
164 struct bgscan_learn_bss *bss;
177 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) {
178 fprintf(f, "BSS " MACSTR " %d\n",
179 MAC2STR(bss->bssid), bss->freq);
182 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) {
184 for (i = 0; i < bss->num_neigh; i++) {
186 MAC2STR(bss->bssid),
187 MAC2STR(bss->neigh + i * ETH_ALEN));
214 struct bgscan_learn_bss *bss;
219 dl_list_for_each(bss, &data->bss, struct bgscan_learn_bss, list) {
220 if (in_array(freqs, bss->freq))
226 freqs[*count] = bss->freq;
387 dl_list_init(&data->bss);
437 struct bgscan_learn_bss *bss, *n;
444 dl_list_for_each_safe(bss, n, &data->bss, struct bgscan_learn_bss,
446 dl_list_del(&bss->list);
447 bss_free(bss);
455 struct wpa_scan_res *bss)
459 ie = wpa_scan_get_ie(bss, WLAN_EID_SSID);
502 struct bgscan_learn_bss *bss;
507 bss = bgscan_learn_get_bss(data, res->bssid);
508 if (bss && bss->freq != res->freq) {
509 wpa_printf(MSG_DEBUG, "bgscan learn: Update BSS "
511 MAC2STR(res->bssid), bss->freq, res->freq);
512 bss->freq = res->freq;
513 } else if (!bss) {
514 wpa_printf(MSG_DEBUG, "bgscan learn: Add BSS " MACSTR
516 bss = os_zalloc(sizeof(*bss));
517 if (!bss)
519 os_memcpy(bss->bssid, res->bssid, ETH_ALEN);
520 bss->freq = res->freq;
521 dl_list_add(&data->bss, &bss->list);
526 bgscan_learn_add_neighbor(bss, addr);
532 * the BSS and request roam if needed. This sample uses the existing
533 * BSS/ESS selection routine. Change this to return 1 if selection is