diff options
author | adrian <adrian@FreeBSD.org> | 2013-06-14 06:14:49 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-06-14 06:14:49 +0000 |
commit | 4feceecc85c28528543f499d6afe8ec613cfcab5 (patch) | |
tree | c4835f009d535efed613d19fe2827b361628753e /sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c | |
parent | a80685b9ce0c47ca222eb9c637898898cffa7752 (diff) | |
download | FreeBSD-src-4feceecc85c28528543f499d6afe8ec613cfcab5.zip FreeBSD-src-4feceecc85c28528543f499d6afe8ec613cfcab5.tar.gz |
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
Diffstat (limited to 'sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c')
-rw-r--r-- | sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c | 5 |
1 files changed, 5 insertions, 0 deletions
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", |