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

This commit is contained in:
Warner Losh 2005-05-15 21:02:51 +00:00
parent 036ae3dd79
commit 6b1fe67d59
2 changed files with 4 additions and 0 deletions

View File

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

View File

@ -121,6 +121,7 @@ struct iwi_softc {
uint32_t flags;
#define IWI_FLAG_FW_CACHED (1 << 0)
#define IWI_FLAG_FW_INITED (1 << 1)
#define IWI_FLAG_FW_WARNED (1 << 2)
struct iwi_cmd_ring cmdq;
struct iwi_tx_ring txq;