diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-08-09 15:10:42 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-08-09 15:10:42 +0000 |
commit | 3b1584ed7e7c92741e7777fbf1d79c43b3f6ed5b (patch) | |
tree | 625bbd5bb7e15f7f48cfcd01612e67547dcc1ce9 | |
parent | d7b6521eee404057249b641e70b015ad0f6fc310 (diff) |
Check all FW commands in the init path. None of them shall timeout,
otherwise we abort initialization.
-rw-r--r-- | sys/dev/pcmcia/if_malo.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index 8e3bee5bd3a..5d06b5fa08d 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.47 2007/08/09 14:50:06 mglocker Exp $ */ +/* $OpenBSD: if_malo.c,v 1.48 2007/08/09 15:10:41 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -631,17 +631,19 @@ cmalo_init(struct ifnet *ifp) return (EIO); if (cmalo_cmd_set_channel(sc, sc->sc_curchan) != 0) return (EIO); + if (cmalo_cmd_set_rate(sc) != 0) + return (EIO); + if (cmalo_cmd_set_snmp(sc, MALO_OID_RTSTRESH) != 0) + return (EIO); + if (cmalo_cmd_set_snmp(sc, MALO_OID_SHORTRETRY) != 0) + return (EIO); + if (cmalo_cmd_set_snmp(sc, MALO_OID_FRAGTRESH) != 0) + return (EIO); if (sc->sc_ic.ic_flags & IEEE80211_F_WEPON) { if (cmalo_wep(sc) != 0) return (EIO); } - cmalo_cmd_set_rate(sc); - - cmalo_cmd_set_snmp(sc, MALO_OID_RTSTRESH); - cmalo_cmd_set_snmp(sc, MALO_OID_SHORTRETRY); - cmalo_cmd_set_snmp(sc, MALO_OID_FRAGTRESH); - /* device up */ ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; |