From 10d5b77b5421e7cbcc426160edbe858d1d610a29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Imre=20Vad=C3=A1sz?= Date: Mon, 17 Oct 2016 23:17:06 +0200 Subject: [PATCH] if_iwm - Sanity check channel for IEEE80211_CHAN_ANYC in if_iwm_mac_ctxt.c. * This avoids panicing in some broken vap state handling cases. --- sys/dev/netif/iwm/if_iwm_mac_ctxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/netif/iwm/if_iwm_mac_ctxt.c b/sys/dev/netif/iwm/if_iwm_mac_ctxt.c index a6ad21c778..051c9cbd5a 100644 --- a/sys/dev/netif/iwm/if_iwm_mac_ctxt.c +++ b/sys/dev/netif/iwm/if_iwm_mac_ctxt.c @@ -293,7 +293,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in, /* * 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); } else { is2ghz = 1; -- 2.11.4.GIT