diff options
author | adrian <adrian@FreeBSD.org> | 2016-05-20 06:06:21 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2016-05-20 06:06:21 +0000 |
commit | ad10425ff7c11b0f9841a9ff53859ca0d7800109 (patch) | |
tree | 223c9a7050e5acc9515f1c1efb0fd6eb9c7af9c3 /sys/dev | |
parent | 7ba611924b2c6fb3937354ede3eb6e47fb44443c (diff) | |
download | FreeBSD-src-ad10425ff7c11b0f9841a9ff53859ca0d7800109.zip FreeBSD-src-ad10425ff7c11b0f9841a9ff53859ca0d7800109.tar.gz |
[ath] convert recent changes over to HAL format.
This is needed to compile the ath tools, that includes this code
to run in userland.
Tested:
* Carambola 2, AR9331, STA mode
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/ath_hal/ah_regdomain.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ath/ath_hal/ah_regdomain.c b/sys/dev/ath/ath_hal/ah_regdomain.c index 87567eb..d388e12 100644 --- a/sys/dev/ath/ath_hal/ah_regdomain.c +++ b/sys/dev/ath/ath_hal/ah_regdomain.c @@ -424,7 +424,7 @@ addchan(struct ath_hal *ah, struct ieee80211_channel chans[], struct ieee80211_channel *c; if (*nchans >= maxchans) - return (ENOBUFS); + return (HAL_ENOMEM); c = &chans[(*nchans)++]; c->ic_freq = freq; @@ -443,10 +443,11 @@ copychan_prev(struct ath_hal *ah, struct ieee80211_channel chans[], { struct ieee80211_channel *c; - KASSERT(*nchans > 0, ("channel list is empty\n")); + if (*nchans == 0) + return (HAL_EINVAL); if (*nchans >= maxchans) - return (ENOBUFS); + return (HAL_ENOMEM); c = &chans[(*nchans)++]; c[0] = c[-1]; @@ -632,8 +633,8 @@ getchannels(struct ath_hal *ah, else if (cm->flags & IEEE80211_CHAN_2GHZ) rd = rd2GHz; else { - KASSERT(0, ("%s: Unkonwn HAL flags 0x%x\n", - __func__, cm->flags)); + ath_hal_printf(ah, "%s: Unkonwn HAL flags 0x%x\n", + __func__, cm->flags); return HAL_EINVAL; } |