-/* $OpenBSD: ieee80211_input.c,v 1.241 2022/01/05 05:18:25 dlg Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.242 2022/01/12 08:29:27 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
ic->ic_stats.is_rx_chanmismatch++;
return;
}
- /*
- * Use mac, channel and rssi so we collect only the
- * best potential AP with the equal bssid while scanning.
- * Collecting all potential APs may result in bloat of
- * the node tree. This call will return NULL if the node
- * for this APs does not exist or if the new node is the
- * potential better one.
- */
- ni = ieee80211_find_node_for_beacon(ic, wh->i_addr2,
- &ic->ic_channels[chan], ssid, rxi->rxi_rssi);
- if (ni != NULL) {
- /*
- * If we are doing a directed scan for an AP with a hidden SSID
- * we must collect the SSID from a probe response to override
- * a non-zero-length SSID filled with zeroes that we may have
- * received earlier in a beacon.
- */
- if (isprobe && ssid[1] != 0 && ni->ni_essid[0] == '\0') {
- ni->ni_esslen = ssid[1];
- memset(ni->ni_essid, 0, sizeof(ni->ni_essid));
- /* we know that ssid[1] <= IEEE80211_NWID_LEN */
- memcpy(ni->ni_essid, &ssid[2], ssid[1]);
- }
-
- /* Update channel in case AP has switched */
- if (ic->ic_opmode == IEEE80211_M_STA)
- ni->ni_chan = rni->ni_chan;
-
- return;
- }
#ifdef IEEE80211_DEBUG
if (ieee80211_debug > 1 &&
}
}
+ /*
+ * Set our SSID if we do not know it yet.
+ * If we are doing a directed scan for an AP with a hidden SSID
+ * we must collect the SSID from a probe response to override
+ * a non-zero-length SSID filled with zeroes that we may have
+ * received earlier in a beacon.
+ */
if (ssid[1] != 0 && ni->ni_essid[0] == '\0') {
ni->ni_esslen = ssid[1];
memset(ni->ni_essid, 0, sizeof(ni->ni_essid));
-/* $OpenBSD: ieee80211_node.c,v 1.190 2021/12/07 20:06:38 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.191 2022/01/12 08:29:27 stsp Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
return ieee80211_ref_node(ni);
}
-struct ieee80211_node *
-ieee80211_find_node_for_beacon(struct ieee80211com *ic,
- const u_int8_t *macaddr, const struct ieee80211_channel *chan,
- const char *ssid, u_int8_t rssi)
-{
- struct ieee80211_node *ni, *keep = NULL;
- int s, score = 0;
-
- if ((ni = ieee80211_find_node(ic, macaddr)) != NULL) {
- s = splnet();
-
- if (ni->ni_chan != chan && ni->ni_rssi >= rssi)
- score++;
- if (ssid[1] == 0 && ni->ni_esslen != 0)
- score++;
- if (score > 0)
- keep = ni;
-
- splx(s);
- }
-
- return (keep);
-}
-
void
ieee80211_node_tx_ba_clear(struct ieee80211_node *ni, int tid)
{
-/* $OpenBSD: ieee80211_node.h,v 1.90 2021/12/03 12:41:36 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.h,v 1.91 2022/01/12 08:29:27 stsp Exp $ */
/* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */
/*-
const struct ieee80211_frame *);
struct ieee80211_node *ieee80211_find_txnode(struct ieee80211com *,
const u_int8_t *);
-struct ieee80211_node *
- ieee80211_find_node_for_beacon(struct ieee80211com *,
- const u_int8_t *, const struct ieee80211_channel *,
- const char *, u_int8_t);
void ieee80211_release_node(struct ieee80211com *,
struct ieee80211_node *);
void ieee80211_node_cleanup(struct ieee80211com *, struct ieee80211_node *);