From 89f3938121311e667b7d00a8501e6c46dddca3ad Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 20 Jun 2017 13:51:46 +0000 Subject: [PATCH] Initialize the link state of a wireless interface to DOWN when the interface is attached to the net80211 layer. Prevents confusion in cases where drivers forget to initialize the link state. ok mpi@ kettenis@ --- sys/net80211/ieee80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index e8506cd8337..eb9a6e52922 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.61 2017/05/31 09:17:39 stsp Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.62 2017/06/20 13:51:46 stsp Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -156,6 +156,8 @@ ieee80211_ifattach(struct ifnet *ifp) if_addgroup(ifp, "wlan"); ifp->if_priority = IF_WIRELESS_DEFAULT_PRIORITY; + + ieee80211_set_link_state(ic, LINK_STATE_DOWN); } void -- 2.20.1