[iwm] Sanity check channel for IEEE80211_CHAN_ANYC in if_iwm_mac_ctxt.c.

* This avoids panicing in some broken vap state handling cases.

Obtained from:	dragonflybsd.git 10d5b77b5421e7cbcc426160edbe858d1d610a29
This commit is contained in:
Adrian Chadd 2017-05-12 05:21:50 +00:00
parent 2863c11c8f
commit 5d2fcafc23

View File

@ -308,7 +308,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
/* /*
* Default to 2ghz if no node information is given. * Default to 2ghz if no node information is given.
*/ */
if (in) { if (in && in->in_ni.ni_chan != IEEE80211_CHAN_ANYC) {
is2ghz = !! IEEE80211_IS_CHAN_2GHZ(in->in_ni.ni_chan); is2ghz = !! IEEE80211_IS_CHAN_2GHZ(in->in_ni.ni_chan);
} else { } else {
is2ghz = 1; is2ghz = 1;