From 3b1584ed7e7c92741e7777fbf1d79c43b3f6ed5b Mon Sep 17 00:00:00 2001 From: Marcus Glocker Date: Thu, 9 Aug 2007 15:10:42 +0000 Subject: Check all FW commands in the init path. None of them shall timeout, otherwise we abort initialization. --- sys/dev/pcmcia/if_malo.c | 16 +++++++++------- 1 file 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 @@ -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; -- cgit v1.2.3