Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2012 17:37:52 +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: r239657 - head/sys/dev/ath/ath_hal/ar5212
Message-ID:  <201208241737.q7OHbq6e077618@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Aug 24 17:37:51 2012
New Revision: 239657
URL: http://svn.freebsd.org/changeset/base/239657

Log:
  Correctly handle the "pe_enabled" flag - both when configuring DFS and
  fetching the current DFS configuration.
  
  PR:		kern/170904

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Aug 24 17:37:12 2012	(r239656)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Aug 24 17:37:51 2012	(r239657)
@@ -1160,7 +1160,12 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_
 		val &= ~AR_PHY_RADAR_0_INBAND;
 		val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND);
 	}
-	OS_REG_WRITE(ah, AR_PHY_RADAR_0, val | AR_PHY_RADAR_0_ENA);
+	if (pe->pe_enabled)
+		val |= AR_PHY_RADAR_0_ENA;
+	else
+		val &= ~ AR_PHY_RADAR_0_ENA;
+
+	OS_REG_WRITE(ah, AR_PHY_RADAR_0, val);
 }
 
 /*
@@ -1206,6 +1211,7 @@ ar5212GetDfsThresh(struct ath_hal *ah, H
 	pe->pe_height =  MS(val, AR_PHY_RADAR_0_HEIGHT);
 	pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI);
 	pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND);
+	pe->pe_enabled = !! (val & AR_PHY_RADAR_0_ENA);
 
 	pe->pe_relpwr = 0;
 	pe->pe_relstep = 0;



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