* Reset bss state on transition to the INIT state. * Clear any stations from the table (they have been * deauth'd) and reset the bss node (clears key, rate * etc. state). */
| 441 | * etc. state). |
| 442 | */ |
| 443 | void |
| 444 | ieee80211_reset_bss(struct ieee80211vap *vap) |
| 445 | { |
| 446 | struct ieee80211com *ic = vap->iv_ic; |
| 447 | struct ieee80211_node *ni, *obss; |
| 448 | |
| 449 | ieee80211_node_table_reset(&ic->ic_sta, vap); |
| 450 | /* XXX multi-bss: wrong */ |
| 451 | ieee80211_vap_reset_erp(vap); |
| 452 | |
| 453 | ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr); |
| 454 | KASSERT(ni != NULL, ("unable to setup initial BSS node")); |
| 455 | obss = vap->iv_bss; |
| 456 | vap->iv_bss = ieee80211_ref_node(ni); |
| 457 | if (obss != NULL) { |
| 458 | copy_bss(ni, obss); |
| 459 | ni->ni_intval = ic->ic_bintval; |
| 460 | ieee80211_free_node(obss); |
| 461 | } else |
| 462 | IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_myaddr); |
| 463 | } |
| 464 | |
| 465 | static int |
| 466 | match_ssid(const struct ieee80211_node *ni, |
no test coverage detected