For ic_opmode switch cases, provide a default label with a printf saying

this opmode is not supported.

Approved by:	re (kib)
This commit is contained in:
rpaulo 2009-07-10 15:28:33 +00:00
parent 3625089dba
commit ade7784f4d
4 changed files with 10 additions and 2 deletions

View File

@ -2462,6 +2462,9 @@ ipw_config(struct ipw_softc *sc)
case IEEE80211_M_MONITOR:
data = htole32(IPW_MODE_MONITOR);
break;
default:
device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode);
return EINVAL;
}
DPRINTF(("Setting mode to %u\n", le32toh(data)));
error = ipw_cmd(sc, IPW_CMD_SET_MODE, &data, sizeof data);

View File

@ -2208,7 +2208,8 @@ iwi_get_firmware(struct iwi_softc *sc, enum ieee80211_opmode opmode)
&sc->fw_uc, "iwi_ucode_monitor");
break;
default:
break;
device_printf(sc->sc_dev, "unknown opmode %d\n", opmode);
return EINVAL;
}
fp = sc->fw_fw.fp;
if (fp == NULL) {

View File

@ -3916,7 +3916,8 @@ iwn_config(struct iwn_softc *sc)
IWN_FILTER_CTL | IWN_FILTER_PROMISC);
break;
default:
break;
device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode);
return EINVAL;
}
sc->config.cck_mask = 0x0f; /* not yet negotiated */
sc->config.ofdm_mask = 0xff; /* not yet negotiated */

View File

@ -2818,6 +2818,9 @@ wpi_config(struct wpi_softc *sc)
sc->config.filter |= htole32(WPI_FILTER_MULTICAST |
WPI_FILTER_CTL | WPI_FILTER_PROMISC);
break;
default:
device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode);
return EINVAL;
}
sc->config.cck_mask = 0x0f; /* not yet negotiated */
sc->config.ofdm_mask = 0xff; /* not yet negotiated */