From owner-svn-src-all@freebsd.org Fri May 20 06:06:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD037B4175D; Fri, 20 May 2016 06:06:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9FD1D7D; Fri, 20 May 2016 06:06:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4K66LXh075198; Fri, 20 May 2016 06:06:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4K66L6K075197; Fri, 20 May 2016 06:06:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605200606.u4K66L6K075197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 20 May 2016 06:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300267 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2016 06:06:22 -0000 Author: adrian Date: Fri May 20 06:06:21 2016 New Revision: 300267 URL: https://svnweb.freebsd.org/changeset/base/300267 Log: [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 Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Fri May 20 06:05:20 2016 (r300266) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Fri May 20 06:06:21 2016 (r300267) @@ -424,7 +424,7 @@ addchan(struct ath_hal *ah, struct ieee8 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 { 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; }