--- a/sys/dev/netif/ath/ath/if_ath_spectral.c +++ b/sys/dev/netif/ath/ath/if_ath_spectral.c @@ -234,6 +234,14 @@ error = EINVAL; break; } + /* ATH_DIAG_IN not set: no parameters were copied in + * (ad_in_size alone does not make indata valid; + * mirrors the indata == NULL check that + * ENABLE_AT_RESET already has below). */ + if (indata == NULL) { + error = EINVAL; + break; + } pe = (HAL_SPECTRAL_PARAM *) indata; ath_hal_spectral_configure(sc->sc_ah, pe); /* Save a local copy of the updated parameters */