Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 06:06:21 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
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
Message-ID:  <201605200606.u4K66L6K075197@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605200606.u4K66L6K075197>