svn commit: r300267 - head/sys/dev/ath/ath_hal

Adrian Chadd adrian at FreeBSD.org
Fri May 20 06:06:22 UTC 2016


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;
 		}
 


More information about the svn-src-head mailing list