From 4feceecc85c28528543f499d6afe8ec613cfcab5 Mon Sep 17 00:00:00 2001 From: adrian Date: Fri, 14 Jun 2013 06:14:49 +0000 Subject: If chan is NULL, don't derefrence it. The bluetooth setup code actually does a channel lookup during setup, even though we haven't yet programmed in a channel. Sigh. Tested: * WB225 (AR9485) + bluetooth --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/contrib') diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c index 44d473f..642aba1 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c @@ -778,6 +778,11 @@ ar9300_set_delta_slope(struct ath_hal *ah, struct ieee80211_channel *chan) HAL_CHANNEL_INTERNAL * ar9300_check_chan(struct ath_hal *ah, const struct ieee80211_channel *chan) { + + if (chan == NULL) { + return AH_NULL; + } + if ((IS(chan, CHAN_2GHZ) ^ IS(chan, CHAN_5GHZ)) == 0) { HALDEBUG(ah, HAL_DEBUG_CHANNEL, "%s: invalid channel %u/0x%x; not marked as 2GHz or 5GHz\n", -- cgit v1.1