Printing a warning once when trying to bring up interface before firmware load.

Obtained from:	imp (if_iwi)
Reviewed by:	damien
This commit is contained in:
Tai-hwa Liang 2005-06-01 01:54:00 +00:00
parent 9703393611
commit 972d4b8211
2 changed files with 4 additions and 0 deletions

View File

@ -2016,6 +2016,9 @@ ipw_init(void *priv)
/* exit immediately if firmware has not been ioctl'd */ /* exit immediately if firmware has not been ioctl'd */
if (!(sc->flags & IPW_FLAG_FW_CACHED)) { if (!(sc->flags & IPW_FLAG_FW_CACHED)) {
if (!(sc->flags & IPW_FLAG_FW_WARNED))
device_printf(sc->sc_dev, "Please load firmware\n");
sc->flags |= IPW_FLAG_FW_WARNED;
ifp->if_flags &= ~IFF_UP; ifp->if_flags &= ~IFF_UP;
return; return;
} }

View File

@ -97,6 +97,7 @@ struct ipw_softc {
#define IPW_FLAG_FW_CACHED (1 << 0) #define IPW_FLAG_FW_CACHED (1 << 0)
#define IPW_FLAG_FW_INITED (1 << 1) #define IPW_FLAG_FW_INITED (1 << 1)
#define IPW_FLAG_HAS_RADIO_SWITCH (1 << 2) #define IPW_FLAG_HAS_RADIO_SWITCH (1 << 2)
#define IPW_FLAG_FW_WARNED (1 << 3)
int irq_rid; int irq_rid;
int mem_rid; int mem_rid;