MCPcopy Create free account
hub / github.com/F-Stack/f-stack / select_bss

Function select_bss

freebsd/net80211/ieee80211_scan_sta.c:1231–1252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229}
1230
1231static struct sta_entry *
1232select_bss(struct ieee80211_scan_state *ss, struct ieee80211vap *vap, int debug)
1233{
1234 struct sta_table *st = ss->ss_priv;
1235 struct sta_entry *se, *selbs = NULL;
1236
1237 IEEE80211_DPRINTF(vap, debug, " %s\n",
1238 "macaddr bssid chan rssi rate flag wep essid");
1239 IEEE80211_SCAN_TABLE_LOCK(st);
1240 TAILQ_FOREACH(se, &st->st_entry, se_list) {
1241 ieee80211_ies_expand(&se->base.se_ies);
1242 if (match_bss(vap, ss, se, debug) == 0) {
1243 if (selbs == NULL)
1244 selbs = se;
1245 else if (sta_compare(se, selbs) > 0)
1246 selbs = se;
1247 }
1248 }
1249 IEEE80211_SCAN_TABLE_UNLOCK(st);
1250
1251 return selbs;
1252}
1253
1254/*
1255 * Pick an ap or ibss network to join or find a channel

Callers 4

sta_pick_bssFunction · 0.85
sta_roam_checkFunction · 0.85
adhoc_pick_bssFunction · 0.85
mesh_pick_bssFunction · 0.85

Calls 3

ieee80211_ies_expandFunction · 0.85
match_bssFunction · 0.85
sta_compareFunction · 0.85

Tested by

no test coverage detected