summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r--sys/net80211/ieee80211.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index 97654ba..1e0db22 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -197,10 +197,13 @@ ieee80211_chan2ieee(struct ieee80211com *ic, struct ieee80211_channel *c)
return c - ic->ic_channels;
else if (c == IEEE80211_CHAN_ANYC)
return IEEE80211_CHAN_ANY;
- else {
+ else if (c != NULL) {
if_printf(&ic->ic_if, "invalid channel freq %u flags %x\n",
c->ic_freq, c->ic_flags);
return 0; /* XXX */
+ } else {
+ if_printf(&ic->ic_if, "invalid channel (NULL)\n");
+ return 0; /* XXX */
}
}
OpenPOWER on IntegriCloud