-/* $OpenBSD: ieee80211_node.c,v 1.145 2018/09/09 20:32:55 phessler Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.146 2018/09/10 08:26:39 phessler Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
if (ic->ic_des_esslen == ess->esslen &&
memcmp(ic->ic_des_essid, ess->essid,
ess->esslen) == 0) {
- ieee80211_set_ess(ic, ess->essid);
+ ieee80211_set_ess(ic, ess->essid, ess->esslen);
return;
}
continue;
printf("\n");
}
- ieee80211_set_ess(ic, seless->essid);
+ ieee80211_set_ess(ic, seless->essid, ess->esslen);
}
}
void
-ieee80211_set_ess(struct ieee80211com *ic, char *nwid)
+ieee80211_set_ess(struct ieee80211com *ic, char *nwid, int len)
{
struct ieee80211_ess *ess;
- TAILQ_FOREACH(ess, &ic->ic_ess, ess_next) {
- if (memcmp(ess->essid, nwid, IEEE80211_NWID_LEN) == 0)
- break;
- }
-
+ ess = ieee80211_get_ess(ic, nwid, len);
if (ess == NULL)
return;
-/* $OpenBSD: ieee80211_var.h,v 1.89 2018/09/09 20:32:55 phessler Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.90 2018/09/10 08:26:39 phessler Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
void ieee80211_disable_rsn(struct ieee80211com *);
int ieee80211_add_ess(struct ieee80211com *, struct ieee80211_join *);
void ieee80211_del_ess(struct ieee80211com *, char *, int);
-void ieee80211_set_ess(struct ieee80211com *, char *);
+void ieee80211_set_ess(struct ieee80211com *, char *, int);
struct ieee80211_ess *ieee80211_get_ess(struct ieee80211com *, const char *, int);
extern int ieee80211_cache_size;