-/* $OpenBSD: if_umb.c,v 1.19 2018/04/30 19:07:44 tb Exp $ */
+/* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
/*
* Copyright (c) 2016 genua mbH
{
struct umb_softc *sc = arg;
- if (sc->sc_info.regstate == MBIM_REGSTATE_ROAMING && !sc->sc_roaming) {
- /*
- * Query the registration state until we're with the home
- * network again.
- */
- umb_cmd(sc, MBIM_CID_REGISTER_STATE, MBIM_CMDOP_QRY, NULL, 0);
- } else
+ if (sc->sc_info.regstate != MBIM_REGSTATE_ROAMING || sc->sc_roaming)
printf("%s: state change timeout\n",DEVNAM(sc));
usb_add_task(sc->sc_udev, &sc->sc_umb_task);
}
int s;
int state;
+ if (sc->sc_info.regstate == MBIM_REGSTATE_ROAMING && !sc->sc_roaming) {
+ /*
+ * Query the registration state until we're with the home
+ * network again.
+ */
+ umb_cmd(sc, MBIM_CID_REGISTER_STATE, MBIM_CMDOP_QRY, NULL, 0);
+ return;
+ }
+
s = splnet();
if (ifp->if_flags & IFF_UP)
umb_up(sc);