-/* $OpenBSD: bwfm.c,v 1.32 2018/01/24 13:07:31 patrick Exp $ */
+/* $OpenBSD: bwfm.c,v 1.33 2018/01/31 12:36:13 stsp Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
{
struct bwfm_cmd_newstate *cmd = arg;
struct ieee80211com *ic = &sc->sc_ic;
- enum ieee80211_state ostate, nstate;
+ struct ifnet *ifp = &ic->ic_if;
+ enum ieee80211_state nstate = cmd->state;
int s;
s = splnet();
- ostate = ic->ic_state;
- nstate = cmd->state;
- DPRINTF(("newstate %s -> %s\n",
- ieee80211_state_name[ostate],
- ieee80211_state_name[nstate]));
switch (nstate) {
case IEEE80211_S_SCAN:
bwfm_scan(sc);
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", DEVNAME(sc),
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[nstate]);
ic->ic_state = nstate;
splx(s);
return;
case IEEE80211_S_AUTH:
ic->ic_bss->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
bwfm_connect(sc);
- ic->ic_state = cmd->state;
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", DEVNAME(sc),
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[nstate]);
+ ic->ic_state = nstate;
if (ic->ic_flags & IEEE80211_F_RSNON)
ic->ic_bss->ni_rsn_supp_state = RSNA_SUPP_PTKSTART;
splx(s);
-/* $OpenBSD: if_iwm.c,v 1.223 2018/01/14 11:51:34 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.224 2018/01/31 12:36:13 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
iwm_scan(struct iwm_softc *sc)
{
struct ieee80211com *ic = &sc->sc_ic;
+ struct ifnet *ifp = IC2IFP(ic);
int err;
if (sc->sc_flags & IWM_FLAG_BGSCAN) {
}
sc->sc_flags |= IWM_FLAG_SCANNING;
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[IEEE80211_S_SCAN]);
ic->ic_state = IEEE80211_S_SCAN;
iwm_led_blink_start(sc);
wakeup(&ic->ic_state); /* wake iwm_init() */
int arg = sc->ns_arg;
int err = 0, s = splnet();
- DPRINTF(("switching state %s->%s\n",
- ieee80211_state_name[ostate],
- ieee80211_state_name[nstate]));
-
if (sc->sc_flags & IWM_FLAG_SHUTDOWN) {
/* iwm_stop() is waiting for us. */
refcnt_rele_wake(&sc->task_refs);
-/* $OpenBSD: if_iwn.c,v 1.198 2018/01/09 10:00:12 mpi Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.199 2018/01/31 12:36:13 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
sc->sc_dev.dv_xname);
return error;
}
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[nstate]);
ic->ic_state = nstate;
return 0;
-/* $OpenBSD: if_wpi.c,v 1.141 2017/10/26 15:00:28 mpi Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.142 2018/01/31 12:36:13 stsp Exp $ */
/*-
* Copyright (c) 2006-2008
sc->sc_dev.dv_xname);
return error;
}
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[nstate]);
ic->ic_state = nstate;
return 0;
-/* $OpenBSD: if_atu.c,v 1.123 2017/07/21 15:55:04 stsp Exp $ */
+/* $OpenBSD: if_atu.c,v 1.124 2018/01/31 12:36:13 stsp Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
struct atu_softc *sc = ifp->if_softc;
enum ieee80211_state ostate = ic->ic_state;
- DPRINTFN(10, ("%s: atu_newstate: %s -> %s\n", sc->atu_dev.dv_xname,
- ieee80211_state_name[ostate], ieee80211_state_name[nstate]));
-
switch (nstate) {
case IEEE80211_S_SCAN:
memcpy(ic->ic_chan_scan, ic->ic_chan_active,
usb_add_task(sc->atu_udev, &sc->sc_task);
/* handle this ourselves */
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[nstate]);
ic->ic_state = nstate;
return (0);
-/* $OpenBSD: if_rsu.c,v 1.41 2017/10/26 15:00:28 mpi Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.42 2018/01/31 12:36:13 stsp Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
{
struct rsu_cmd_newstate *cmd = arg;
struct ieee80211com *ic = &sc->sc_ic;
+ struct ifnet *ifp = &ic->ic_if;
enum ieee80211_state ostate;
int error, s;
s = splnet();
ostate = ic->ic_state;
- DPRINTF(("newstate %s -> %s\n",
- ieee80211_state_name[ostate],
- ieee80211_state_name[cmd->state]));
if (ostate == IEEE80211_S_RUN) {
/* Stop calibration. */
printf("%s: could not send site survey command\n",
sc->sc_dev.dv_xname);
}
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[cmd->state]);
ic->ic_state = cmd->state;
splx(s);
return;
splx(s);
return;
}
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[cmd->state]);
ic->ic_state = cmd->state;
if (ic->ic_flags & IEEE80211_F_RSNON)
ic->ic_bss->ni_rsn_supp_state = RSNA_SUPP_PTKSTART;
return;
case IEEE80211_S_ASSOC:
/* No-op for this driver. See rsu_event_join_bss(). */
+ if (ifp->if_flags & IFF_DEBUG)
+ printf("%s: %s -> %s\n", ifp->if_xname,
+ ieee80211_state_name[ic->ic_state],
+ ieee80211_state_name[cmd->state]);
ic->ic_state = cmd->state;
splx(s);
return;