CVS commit: src/sys/external/isc/atheros_hal/dist/ar5210

2019-02-23 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Feb 23 11:24:53 UTC 2019

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210_xmit.c

Log Message:
Improve fallthrough statement wording

Fixes build with kUBSan on NetBSD/i386.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c:1.1.1.1	Thu Dec 11 04:46:29 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_xmit.c	Sat Feb 23 11:24:53 2019
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210_xmit.c,v 1.1.1.1 2008/12/11 04:46:29 alc Exp $
+ * $Id: ar5210_xmit.c,v 1.2 2019/02/23 11:24:53 kamil Exp $
  */
 #include "opt_ah.h"
 
@@ -389,7 +389,7 @@ ar5210StartTxDma(struct ath_hal *ah, u_i
 	case HAL_TX_QUEUE_INACTIVE:
 		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: inactive queue %u\n",
 		__func__, q);
-		/* fal thru... */
+		/* FALLTHROUGH */
 	default:
 		return AH_FALSE;
 	}



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2016-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  9 14:40:47 UTC 2016

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416_attach.c

Log Message:
PR/51540: Henning Petersen: replace , with ;


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c:1.4 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c:1.5
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c:1.4	Mon Mar  7 06:25:44 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c	Sun Oct  9 10:40:47 2016
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_attach.c,v 1.4 2011/03/07 11:25:44 cegger Exp $
+ * $Id: ar5416_attach.c,v 1.5 2016/10/09 14:40:47 christos Exp $
  */
 #include "opt_ah.h"
 
@@ -86,8 +86,8 @@ ar5416InitState(struct ath_hal_5416 *ahp
 	ah->ah_disable			= ar5416Disable;
 	ah->ah_configPCIE		= ar5416ConfigPCIE;
 	ah->ah_perCalibration		= ar5416PerCalibration;
-	ah->ah_perCalibrationN		= ar5416PerCalibrationN,
-	ah->ah_resetCalValid		= ar5416ResetCalValid,
+	ah->ah_perCalibrationN		= ar5416PerCalibrationN;
+	ah->ah_resetCalValid		= ar5416ResetCalValid;
 	ah->ah_setTxPowerLimit		= ar5416SetTxPowerLimit;
 	ah->ah_setTxPower		= ar5416SetTransmitPower;
 	ah->ah_setBoardValues		= ar5416SetBoardValues;
@@ -104,8 +104,8 @@ ar5416InitState(struct ath_hal_5416 *ahp
 	ah->ah_stopPcuReceive		= ar5416StopPcuReceive;
 	ah->ah_setupRxDesc		= ar5416SetupRxDesc;
 	ah->ah_procRxDesc		= ar5416ProcRxDesc;
-	ah->ah_rxMonitor		= ar5416AniPoll,
-	ah->ah_procMibEvent		= ar5416ProcessMibIntr,
+	ah->ah_rxMonitor		= ar5416AniPoll;
+	ah->ah_procMibEvent		= ar5416ProcessMibIntr;
 
 	/* Misc Functions */
 	ah->ah_getDiagState		= ar5416GetDiagState;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5210

2015-11-24 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Tue Nov 24 08:48:25 UTC 2015

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210_reset.c

Log Message:
One too many parenthesis removed.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.6 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.7
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.6	Mon Nov 23 23:46:33 2015
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c	Tue Nov 24 08:48:25 2015
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210_reset.c,v 1.6 2015/11/23 23:46:33 joerg Exp $
+ * $Id: ar5210_reset.c,v 1.7 2015/11/24 08:48:25 jklos Exp $
  */
 #include "opt_ah.h"
 
@@ -504,7 +504,7 @@ ar5210PerCalibrationN(struct ath_hal *ah
 	OS_REG_WRITE(ah, 0x985c,
 		 (reg985c & ~(KCOARSEHIGH_M | KCOARSELOW_M)) |
 		 ((~0U << KCOARSEHIGH_S) & KCOARSEHIGH_M) |
-		 ~0U << 7) + 1) << KCOARSELOW_S)) & KCOARSELOW_M));
+		 ~0U << 7) + 1) << KCOARSELOW_S) & KCOARSELOW_M));
 	OS_REG_WRITE(ah, 0x9868,
 		 (reg9868 & ~(ADCSAT_ICOUNT_M | ADCSAT_THRESH_M)) |
 		 ((2 << ADCSAT_ICOUNT_S) & ADCSAT_ICOUNT_M) |



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5210

2015-11-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 23 23:46:33 UTC 2015

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210_reset.c

Log Message:
Replace left shifts of negative values with appropiate unsigned values.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.5 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.6
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c:1.5	Mon Mar  7 11:25:42 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c	Mon Nov 23 23:46:33 2015
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210_reset.c,v 1.5 2011/03/07 11:25:42 cegger Exp $
+ * $Id: ar5210_reset.c,v 1.6 2015/11/23 23:46:33 joerg Exp $
  */
 #include "opt_ah.h"
 
@@ -500,11 +500,11 @@ ar5210PerCalibrationN(struct ath_hal *ah
 	reg9868 = OS_REG_READ(ah, 0x9868);
 
 	OS_REG_WRITE(ah, 0x9858, (reg9858 & ~FIRPWR_M) |
-	 ((-1 << FIRPWR_S) & FIRPWR_M));
+	 ((~0U << FIRPWR_S) & FIRPWR_M));
 	OS_REG_WRITE(ah, 0x985c,
 		 (reg985c & ~(KCOARSEHIGH_M | KCOARSELOW_M)) |
-		 ((-1 << KCOARSEHIGH_S) & KCOARSEHIGH_M) |
-		 ((-127 << KCOARSELOW_S) & KCOARSELOW_M));
+		 ((~0U << KCOARSEHIGH_S) & KCOARSEHIGH_M) |
+		 ~0U << 7) + 1) << KCOARSELOW_S)) & KCOARSELOW_M));
 	OS_REG_WRITE(ah, 0x9868,
 		 (reg9868 & ~(ADCSAT_ICOUNT_M | ADCSAT_THRESH_M)) |
 		 ((2 << ADCSAT_ICOUNT_S) & ADCSAT_ICOUNT_M) |



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2014-02-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 27 01:31:09 UTC 2014

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar5212_reset.c

Log Message:
abs on unsigned values is a nop.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c:1.4 src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c:1.5
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c:1.4	Mon Mar  7 11:25:43 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c	Thu Feb 27 01:31:09 2014
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5212_reset.c,v 1.4 2011/03/07 11:25:43 cegger Exp $
+ * $Id: ar5212_reset.c,v 1.5 2014/02/27 01:31:09 joerg Exp $
  */
 #include opt_ah.h
 
@@ -2510,7 +2510,7 @@ ar5212GetLowerUpperValues(uint16_t v, ui
 		 * If value is close to the current value of the list
 		 * then target is not between values, it is one of the values
 		 */
-		if (abs(lp[0] * EEP_SCALE - target)  EEP_DELTA) {
+		if (lp[0] * EEP_SCALE - target  EEP_DELTA) {
 			*vlo = *vhi = lp[0];
 			return;
 		}



CVS commit: src/sys/external/isc/atheros_hal/dist

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 11:26:53 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_eeprom_v3.c

Log Message:
Remove unused maxPower_t4 variable.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.3 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.4
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.3	Mon Mar  7 11:25:42 2011
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c	Thu Sep 12 11:26:53 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ah_eeprom_v3.c,v 1.3 2011/03/07 11:25:42 cegger Exp $
+ * $Id: ah_eeprom_v3.c,v 1.4 2013/09/12 11:26:53 martin Exp $
  */
 #include opt_ah.h
 
@@ -181,7 +181,6 @@ eepromExpandPower5112(struct ath_hal *ah
 	EEPROM_POWER_EXPN_5112 *pPowerExpn)
 {
 	int ii, jj, kk;
-	int16_t maxPower_t4;
 	EXPN_DATA_PER_XPD_5112 *pExpnXPD;
 	/* ptr to array of info held per channel */
 	const EEPROM_DATA_PER_CHANNEL_5112 *pCalCh;
@@ -218,7 +217,6 @@ eepromExpandPower5112(struct ath_hal *ah
 			pCalCh-channelValue;
 		pPowerExpn-pDataPerChannel[ii].maxPower_t4 =
 			pCalCh-maxPower_t4;
-		maxPower_t4 = pPowerExpn-pDataPerChannel[ii].maxPower_t4;
 
 		for (jj = 0; jj  NUM_XPD_PER_CHANNEL; jj++)
 			pPowerExpn-pDataPerChannel[ii].pDataPerXPD[jj].numPcdacs = 0;



CVS commit: src/sys/external/isc/atheros_hal/dist

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 11:38:23 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_eeprom_v4k.c

Log Message:
Fix wrong for loop limit


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.5
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.4	Tue Dec 11 09:22:16 2012
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c	Thu Sep 12 11:38:23 2013
@@ -239,7 +239,7 @@ v4kEepromReadCTLInfo(struct ath_hal *ah,
 	HALASSERT(AR5416_4K_NUM_CTLS = sizeof(ee-ee_rdEdgesPower)/NUM_EDGES);
 
 	for (i = 0; i  AR5416_4K_NUM_CTLS  ee-ee_base.ctlIndex[i] != 0; i++) {
-		for (j = 0; j  NUM_EDGES; j ++) {
+		for (j = 0; j  AR5416_4K_NUM_BAND_EDGES; j ++) {
 			/* XXX Confirm this is the right thing to do when an invalid channel is stored */
 			if (ee-ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {
 rep[j].rdEdge = 0;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 11:44:08 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar2316.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c:1.2 src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c:1.3
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c:1.2	Tue Jan  6 06:03:57 2009
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar2316.c	Thu Sep 12 11:44:08 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar2316.c,v 1.2 2009/01/06 06:03:57 mrg Exp $
+ * $Id: ar2316.c,v 1.3 2013/09/12 11:44:08 martin Exp $
  */
 #include opt_ah.h
 
@@ -305,13 +305,12 @@ ar2316FillVpdTable(uint32_t pdGainIdx, i
 		   const int16_t *pwrList, const int16_t *VpdList,
 		   uint16_t numIntercepts, uint16_t retVpdList[][64])
 {
-	uint16_t ii, jj, kk;
+	uint16_t ii, kk;
 	int16_t currPwr = (int16_t)(2*Pmin);
 	/* since Pmin is pwr*2 and pwrList is 4*pwr */
 	uint32_t  idxL = 0, idxR = 0;
 
 	ii = 0;
-	jj = 0;
 
 	if (numIntercepts  2)
 		return AH_FALSE;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:03:33 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar2317.c

Log Message:
Get rid of unused variables


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c:1.3 src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c:1.4
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c:1.3	Tue Jan  6 06:03:57 2009
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar2317.c	Thu Sep 12 12:03:33 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar2317.c,v 1.3 2009/01/06 06:03:57 mrg Exp $
+ * $Id: ar2317.c,v 1.4 2013/09/12 12:03:33 martin Exp $
  */
 #include opt_ah.h
 
@@ -282,13 +282,12 @@ ar2317FillVpdTable(uint32_t pdGainIdx, i
 		   const int16_t *pwrList, const int16_t *VpdList,
 		   uint16_t numIntercepts, uint16_t retVpdList[][64])
 {
-	uint16_t ii, jj, kk;
+	uint16_t ii, kk;
 	int16_t currPwr = (int16_t)(2*Pmin);
 	/* since Pmin is pwr*2 and pwrList is 4*pwr */
 	uint32_t  idxL = 0, idxR = 0;
 
 	ii = 0;
-	jj = 0;
 
 	if (numIntercepts  2)
 		return AH_FALSE;
@@ -611,14 +610,12 @@ ar2317GetMaxPower(struct ath_hal *ah, co
 {
 	uint32_t ii;
 	uint16_t Pmax=0,numVpd;
-	uint16_t vpdmax;
 	
 	for (ii=0; ii MAX_NUM_PDGAINS_PER_CHANNEL; ii++) {
 		/* work forwards cuase lowest pdGain for highest power */
 		numVpd = data-pDataPerPDGain[ii].numVpd;
 		if (numVpd  0) {
 			Pmax = data-pDataPerPDGain[ii].pwr_t4[numVpd-1];
-			vpdmax = data-pDataPerPDGain[ii].Vpd[numVpd-1];
 			return(Pmax);
 		}
 	}



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:04:37 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar2413.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c:1.2 src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c:1.3
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c:1.2	Tue Jan  6 06:03:57 2009
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar2413.c	Thu Sep 12 12:04:37 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar2413.c,v 1.2 2009/01/06 06:03:57 mrg Exp $
+ * $Id: ar2413.c,v 1.3 2013/09/12 12:04:37 martin Exp $
  */
 #include opt_ah.h
 
@@ -299,13 +299,12 @@ ar2413FillVpdTable(uint32_t pdGainIdx, i
 		   const int16_t *pwrList, const uint16_t *VpdList,
 		   uint16_t numIntercepts, uint16_t retVpdList[][64])
 {
-	uint16_t ii, jj, kk;
+	uint16_t ii, kk;
 	int16_t currPwr = (int16_t)(2*Pmin);
 	/* since Pmin is pwr*2 and pwrList is 4*pwr */
 	uint32_t  idxL = 0, idxR = 0;
 
 	ii = 0;
-	jj = 0;
 
 	if (numIntercepts  2)
 		return AH_FALSE;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:05:52 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar2425.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c:1.3 src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c:1.4
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c:1.3	Sun Feb 20 11:21:03 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar2425.c	Thu Sep 12 12:05:52 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar2425.c,v 1.3 2011/02/20 11:21:03 jmcneill Exp $
+ * $Id: ar2425.c,v 1.4 2013/09/12 12:05:52 martin Exp $
  */
 #include opt_ah.h
 
@@ -301,13 +301,12 @@ ar2425FillVpdTable(uint32_t pdGainIdx, i
 		   uint16_t numIntercepts,
 		   uint16_t retVpdList[][64])
 {
-	uint16_t ii, jj, kk;
+	uint16_t ii, kk;
 	int16_t currPwr = (int16_t)(2*Pmin);
 	/* since Pmin is pwr*2 and pwrList is 4*pwr */
 	uint32_t  idxL = 0, idxR = 0;
 
 	ii = 0;
-	jj = 0;
 
 	if (numIntercepts  2)
 		return AH_FALSE;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:07:01 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar5413.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c:1.3 src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c:1.4
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c:1.3	Sun Feb 20 11:21:03 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar5413.c	Thu Sep 12 12:07:01 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5413.c,v 1.3 2011/02/20 11:21:03 jmcneill Exp $
+ * $Id: ar5413.c,v 1.4 2013/09/12 12:07:01 martin Exp $
  */
 #include opt_ah.h
 
@@ -335,13 +335,12 @@ ar5413FillVpdTable(uint32_t pdGainIdx, i
 		   uint16_t numIntercepts,
 		   uint16_t retVpdList[][64])
 {
-	uint16_t ii, jj, kk;
+	uint16_t ii, kk;
 	int16_t currPwr = (int16_t)(2*Pmin);
 	/* since Pmin is pwr*2 and pwrList is 4*pwr */
 	uint32_t  idxL = 0, idxR = 0;
 
 	ii = 0;
-	jj = 0;
 
 	if (numIntercepts  2)
 		return AH_FALSE;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:08:49 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416_beacon.c

Log Message:
Remove unsued variable


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c:1.1.1.1	Thu Dec 11 04:46:47 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_beacon.c	Thu Sep 12 12:08:49 2013
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_beacon.c,v 1.1.1.1 2008/12/11 04:46:47 alc Exp $
+ * $Id: ar5416_beacon.c,v 1.2 2013/09/12 12:08:49 martin Exp $
  */
 #include opt_ah.h
 
@@ -138,7 +138,7 @@ ar5416ResetStaBeaconTimers(struct ath_ha
 void
 ar5416SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *bs)
 {
-	uint32_t nextTbtt, nextdtim,beaconintval, dtimperiod;
+	uint32_t nextTbtt,beaconintval, dtimperiod;
 
 	HALASSERT(bs-bs_intval != 0);
 	
@@ -214,7 +214,6 @@ ar5416SetStaBeaconTimers(struct ath_hal 
 		nextTbtt = bs-bs_nextdtim;
 	else
 		nextTbtt = bs-bs_nexttbtt;
-	nextdtim = bs-bs_nextdtim;
 
 	OS_REG_WRITE(ah, AR_NEXT_DTIM,
 		TU_TO_USEC(bs-bs_nextdtim - SLEEP_SLOP));



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:10:11 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9280_attach.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c:1.2 src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c:1.3
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c:1.2	Mon Feb 21 11:06:38 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c	Thu Sep 12 12:10:11 2013
@@ -306,13 +306,12 @@ ar9280ConfigPCIE(struct ath_hal *ah, HAL
 static void
 ar9280WriteIni(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *chan)
 {
-	u_int modesIndex, freqIndex;
+	u_int modesIndex;
 	int regWrites = 0;
 
 	/* Setup the indices for the next set of register array writes */
 	/* XXX Ignore 11n dynamic mode on the AR5416 for the moment */
 	if (IS_CHAN_2GHZ(chan)) {
-		freqIndex = 2;
 		if (IS_CHAN_HT40(chan))
 			modesIndex = 3;
 		else if (IS_CHAN_108G(chan))
@@ -320,7 +319,6 @@ ar9280WriteIni(struct ath_hal *ah, HAL_C
 		else
 			modesIndex = 4;
 	} else {
-		freqIndex = 1;
 		if (IS_CHAN_HT40(chan) ||
 		IS_CHAN_TURBO(chan))
 			modesIndex = 2;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2013-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 12 12:11:12 UTC 2013

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9285_attach.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c:1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c:1.1	Mon Feb 21 11:06:38 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c	Thu Sep 12 12:11:12 2013
@@ -291,12 +291,11 @@ ar9285ConfigPCIE(struct ath_hal *ah, HAL
 static void
 ar9285WriteIni(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *chan)
 {
-	u_int modesIndex, freqIndex;
+	u_int modesIndex;
 	int regWrites = 0;
 
 	/* Setup the indices for the next set of register array writes */
 	/* XXX Ignore 11n dynamic mode on the AR5416 for the moment */
-	freqIndex = 2;
 	if (IS_CHAN_HT40(chan))
 		modesIndex = 3;
 	else if (IS_CHAN_108G(chan))



CVS commit: src/sys/external/isc/atheros_hal/dist

2012-12-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec 11 09:22:16 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_eeprom_v14.c ah_eeprom_v4k.c

Log Message:
Fix off by one read error.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c:1.5 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c:1.6
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c:1.5	Mon Mar  7 11:25:42 2011
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c	Tue Dec 11 09:22:16 2012
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ah_eeprom_v14.c,v 1.5 2011/03/07 11:25:42 cegger Exp $
+ * $Id: ah_eeprom_v14.c,v 1.6 2012/12/11 09:22:16 msaitoh Exp $
  */
 #include opt_ah.h
 
@@ -255,7 +255,7 @@ v14EepromReadCTLInfo(struct ath_hal *ah,
 	
 	HALASSERT(AR5416_NUM_CTLS = sizeof(ee-ee_rdEdgesPower)/NUM_EDGES);
 
-	for (i = 0; ee-ee_base.ctlIndex[i] != 0  i  AR5416_NUM_CTLS; i++) {
+	for (i = 0; i  AR5416_NUM_CTLS  ee-ee_base.ctlIndex[i] != 0; i++) {
 		for (j = 0; j  NUM_EDGES; j ++) {
 			/* XXX Confirm this is the right thing to do when an invalid channel is stored */
 			if (ee-ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.3 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.4
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.3	Thu Mar 15 18:52:02 2012
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c	Tue Dec 11 09:22:16 2012
@@ -238,7 +238,7 @@ v4kEepromReadCTLInfo(struct ath_hal *ah,
 	
 	HALASSERT(AR5416_4K_NUM_CTLS = sizeof(ee-ee_rdEdgesPower)/NUM_EDGES);
 
-	for (i = 0; ee-ee_base.ctlIndex[i] != 0  i  AR5416_4K_NUM_CTLS; i++) {
+	for (i = 0; i  AR5416_4K_NUM_CTLS  ee-ee_base.ctlIndex[i] != 0; i++) {
 		for (j = 0; j  NUM_EDGES; j ++) {
 			/* XXX Confirm this is the right thing to do when an invalid channel is stored */
 			if (ee-ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {



CVS commit: src/sys/external/isc/atheros_hal/dist

2012-03-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Mar 15 18:49:50 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_eeprom_v4k.c

Log Message:
Use the right marcro for loop bound, avoids read past array end. Found by
gcc -03


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.1 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.1	Sun Feb 20 11:21:02 2011
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c	Thu Mar 15 18:49:49 2012
@@ -239,7 +239,7 @@ v4kEepromReadCTLInfo(struct ath_hal *ah,
 	HALASSERT(AR5416_4K_NUM_CTLS = sizeof(ee-ee_rdEdgesPower)/NUM_EDGES);
 
 	for (i = 0; ee-ee_base.ctlIndex[i] != 0  i  AR5416_4K_NUM_CTLS; i++) {
-		for (j = 0; j  NUM_EDGES; j ++) {
+		for (j = 0; j  AR5416_4K_NUM_BAND_EDGES; j ++) {
 			/* XXX Confirm this is the right thing to do when an invalid channel is stored */
 			if (ee-ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {
 rep[j].rdEdge = 0;



CVS commit: src/sys/external/isc/atheros_hal/dist

2012-03-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Mar 15 18:52:02 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_eeprom_v4k.c

Log Message:
Revert previous; needs more work


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.2 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.3
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:1.2	Thu Mar 15 18:49:49 2012
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c	Thu Mar 15 18:52:02 2012
@@ -239,7 +239,7 @@ v4kEepromReadCTLInfo(struct ath_hal *ah,
 	HALASSERT(AR5416_4K_NUM_CTLS = sizeof(ee-ee_rdEdgesPower)/NUM_EDGES);
 
 	for (i = 0; ee-ee_base.ctlIndex[i] != 0  i  AR5416_4K_NUM_CTLS; i++) {
-		for (j = 0; j  AR5416_4K_NUM_BAND_EDGES; j ++) {
+		for (j = 0; j  NUM_EDGES; j ++) {
 			/* XXX Confirm this is the right thing to do when an invalid channel is stored */
 			if (ee-ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {
 rep[j].rdEdge = 0;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2012-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb 12 13:47:19 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416_misc.c

Log Message:
Use correct return value. From clang via Henning Petersen in PR 45996.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c:1.1.1.1	Thu Dec 11 04:46:48 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_misc.c	Sun Feb 12 13:47:19 2012
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_misc.c,v 1.1.1.1 2008/12/11 04:46:48 alc Exp $
+ * $Id: ar5416_misc.c,v 1.2 2012/02/12 13:47:19 wiz Exp $
  */
 #include opt_ah.h
 
@@ -113,7 +113,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a
 HAL_BOOL
 ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en)
 {
-	return HAL_OK;
+	return AH_TRUE;
 }
 
 /* Setup coverage class */



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5212

2012-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb 12 13:48:45 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5212: ar5212_misc.c

Log Message:
Use correct return value. From clang via Henning Petersen in PR 45995.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c:1.2 src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c:1.3
--- src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c:1.2	Mon Mar  7 11:25:43 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c	Sun Feb 12 13:48:45 2012
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5212_misc.c,v 1.2 2011/03/07 11:25:43 cegger Exp $
+ * $Id: ar5212_misc.c,v 1.3 2012/02/12 13:48:45 wiz Exp $
  */
 #include opt_ah.h
 
@@ -570,7 +570,7 @@ ar5212SetDecompMask(struct ath_hal *ah, 
 	struct ath_hal_5212 *ahp = AH5212(ah);
 
 if (keyidx = HAL_DECOMP_MASK_SIZE)
-return HAL_EINVAL; 
+return AH_FALSE; 
 OS_REG_WRITE(ah, AR_DCM_A, keyidx);
 OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0);
 ahp-ah_decompMask[keyidx] = en;



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2012-02-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Feb 12 13:55:27 UTC 2012

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416_reset.c

Log Message:
Consistently use ar5416SetPowerMode. From Henning Petersen in PR 45999.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c:1.5 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c:1.6
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c:1.5	Mon Mar  7 11:25:44 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c	Sun Feb 12 13:55:27 2012
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_reset.c,v 1.5 2011/03/07 11:25:44 cegger Exp $
+ * $Id: ar5416_reset.c,v 1.6 2012/02/12 13:55:27 wiz Exp $
  */
 #include opt_ah.h
 
@@ -1028,7 +1028,7 @@ ar5416GetRfgain(struct ath_hal *ah)
 HAL_BOOL
 ar5416Disable(struct ath_hal *ah)
 {
-	if (!ar5212SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE))
+	if (!ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE))
 		return AH_FALSE;
 	return ar5416SetResetReg(ah, HAL_RESET_COLD);
 }



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2011-08-01 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  1 10:21:32 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416reg.h

Log Message:
Fix AR_SREV_MERLIN_20 and AR_SREV_MERLIN_20_OR_LATER macros to match
rev 2.1 as well as 2.0, from FreeBSD. Fixes 5GHz mode on my 9280.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h:1.4 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h:1.5
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h:1.4	Mon Mar  7 11:25:44 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h	Mon Aug  1 10:21:32 2011
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416reg.h,v 1.4 2011/03/07 11:25:44 cegger Exp $
+ * $Id: ar5416reg.h,v 1.5 2011/08/01 10:21:32 jmcneill Exp $
  */
 #ifndef _DEV_ATH_AR5416REG_H
 #define	_DEV_ATH_AR5416REG_H
@@ -609,10 +609,11 @@
 	(AH_PRIVATE((_ah))-ah_macVersion = AR_XSREV_VERSION_MERLIN)
 #define	AR_SREV_MERLIN_20(_ah) \
 	(AR_SREV_MERLIN(_ah)  \
-	 AH_PRIVATE((_ah))-ah_macRev == AR_XSREV_REVISION_MERLIN_20)
+	 AH_PRIVATE((_ah))-ah_macRev = AR_XSREV_REVISION_MERLIN_20)
 #define	AR_SREV_MERLIN_20_OR_LATER(_ah) \
-	(AR_SREV_MERLIN_20(_ah) || \
-	 AH_PRIVATE((_ah))-ah_macVersion = AR_XSREV_VERSION_MERLIN)
+	((AH_PRIVATE((_ah))-ah_macVersion  AR_XSREV_VERSION_MERLIN) || \
+	 (AR_SREV_MERLIN((_ah))  \
+	 AH_PRIVATE((_ah))-ah_macRev = AR_XSREV_REVISION_MERLIN_20))
 
 #define	AR_SREV_KITE(_ah) \
 	(AH_PRIVATE((_ah))-ah_macVersion == AR_XSREV_VERSION_KITE)



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2011-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May 30 13:57:21 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416_eeprom.c

Log Message:
Silence warnings about unused return value for a dead hardware read.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c:1.1.1.1	Thu Dec 11 04:46:48 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_eeprom.c	Mon May 30 13:57:21 2011
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5416_eeprom.c,v 1.1.1.1 2008/12/11 04:46:48 alc Exp $
+ * $Id: ar5416_eeprom.c,v 1.2 2011/05/30 13:57:21 joerg Exp $
  */
 #include opt_ah.h
 
@@ -34,7 +34,7 @@
 HAL_BOOL
 ar5416EepromRead(struct ath_hal *ah, u_int off, uint16_t *data)
 {
-OS_REG_READ(ah,  AR5416_EEPROM_OFFSET + (off  AR5416_EEPROM_S));
+(void)OS_REG_READ(ah,  AR5416_EEPROM_OFFSET + (off  AR5416_EEPROM_S));
	if (!ath_hal_wait(ah, AR_EEPROM_STATUS_DATA,
 	AR_EEPROM_STATUS_DATA_BUSY | AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0))
 		return AH_FALSE;



CVS commit: src/sys/external/isc/atheros_hal/dist

2011-05-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May 30 13:58:24 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210reg.h
src/sys/external/isc/atheros_hal/dist/ar5211: ar5211reg.h

Log Message:
Define a few macros as unsigned to avoid UB when later shifting them
in ways that involve integer overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.1.1.1	Thu Dec 11 04:46:30 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h	Mon May 30 13:58:23 2011
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210reg.h,v 1.1.1.1 2008/12/11 04:46:30 alc Exp $
+ * $Id: ar5210reg.h,v 1.2 2011/05/30 13:58:23 joerg Exp $
  */
 #ifndef _DEV_ATH_AR5210REG_H
 #define _DEV_ATH_AR5210REG_H
@@ -246,8 +246,8 @@
 #define	AR_SCR_SLE		0x0003	/* sleep enable */
 #define	AR_SCR_SLE_S		16
 #define	AR_SCR_SLE_WAKE		0x	/* force wake */
-#define	AR_SCR_SLE_SLP		0x0001	/* force sleep */
-#define	AR_SCR_SLE_ALLOW	0x0002	/* allow to control sleep */
+#define	AR_SCR_SLE_SLP		0x0001U	/* force sleep */
+#define	AR_SCR_SLE_ALLOW	0x0002U	/* allow to control sleep */
 #define	AR_SCR_BITS	\20\20SLE_SLP\21SLE_ALLOW
 
 #define	AR_INTPEND_IP		0x0001	/* interrupt pending */

Index: src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.1.1.1	Thu Dec 11 04:46:34 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h	Mon May 30 13:58:24 2011
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5211reg.h,v 1.1.1.1 2008/12/11 04:46:34 alc Exp $
+ * $Id: ar5211reg.h,v 1.2 2011/05/30 13:58:24 joerg Exp $
  */
 #ifndef _DEV_ATH_AR5211REG_H
 #define _DEV_ATH_AR5211REG_H
@@ -619,8 +619,8 @@
 #define	AR_SCR_SLE	0x0003	/* sleep enable mask */
 #define	AR_SCR_SLE_S	16		/* sleep enable bits shift */
 #define	AR_SCR_SLE_WAKE	0x	/* force wake */
-#define	AR_SCR_SLE_SLP	0x0001	/* force sleep */
-#define	AR_SCR_SLE_NORM	0x0002	/* sleep logic normal operation */
+#define	AR_SCR_SLE_SLP	0x0001U	/* force sleep */
+#define	AR_SCR_SLE_NORM	0x0002U	/* sleep logic normal operation */
 #define	AR_SCR_SLE_UNITS	0x0008	/* SCR units/TU */
 #define	AR_SCR_BITS	\20\20SLE_SLP\21SLE
 



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 13:04:22 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9285_reset.c

Log Message:
make it compile with ATHHAL_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.1	Mon Feb 21 11:06:38 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c	Mon Feb 21 13:04:22 2011
@@ -119,7 +119,7 @@
 twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)-ah_powerLimit); 
 pModal = pEepData-modalHeader;
 HALDEBUG(ah, HAL_DEBUG_RESET, %s Channel=%u CfgCtl=%u\n,
-	__func__,chan-ic_freq, cfgCtl );  
+	__func__,chan-channel, cfgCtl );  
   
 if (IS_EEP_MINOR_V2(ah)) {
 ht40PowerIncForPdadc = pModal-ht40PowerIncForPdadc;



CVS commit: src/sys/external/isc/atheros_hal/dist

2011-01-25 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Jan 26 00:55:42 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_internal.h

Log Message:
Protect against a NULL pointer dereference that I've seen in the wild.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/dist/ah_internal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_internal.h
diff -u src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.3 src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.4
--- src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.3	Thu May 14 09:07:49 2009
+++ src/sys/external/isc/atheros_hal/dist/ah_internal.h	Wed Jan 26 00:55:42 2011
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ah_internal.h,v 1.3 2009/05/14 09:07:49 reinoud Exp $
+ * $Id: ah_internal.h,v 1.4 2011/01/26 00:55:42 dyoung Exp $
  */
 #ifndef _ATH_AH_INTERAL_H_
 #define _ATH_AH_INTERAL_H_
@@ -324,8 +324,11 @@
 #define	ath_hal_getNoiseFloor(_ah, _nfArray) \
 	AH_PRIVATE(_ah)-ah_getNoiseFloor(_ah, _nfArray)
 
-#define	ath_hal_eepromDetach(_ah) \
-	AH_PRIVATE(_ah)-ah_eepromDetach(_ah)
+#define	ath_hal_eepromDetach(_ah)			\
+do {			\
+	if (AH_PRIVATE(_ah)-ah_eepromDetach != NULL)	\
+		AH_PRIVATE(_ah)-ah_eepromDetach(_ah);	\
+} while (/*CONSTCOND*/0)
 #define	ath_hal_eepromGet(_ah, _param, _val) \
 	AH_PRIVATE(_ah)-ah_eepromGet(_ah, _param, _val)
 #define	ath_hal_eepromSet(_ah, _param, _val) \



CVS commit: src/sys/external/isc/atheros_hal/dist

2009-05-14 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu May 14 09:07:49 UTC 2009

Modified Files:
src/sys/external/isc/atheros_hal/dist: ah_internal.h
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210.h
src/sys/external/isc/atheros_hal/dist/ar5211: ar5211.h

Log Message:
Fix prototypes to match the functions. The prototypes had `int' specified for
parameters or result where they should have been the corresponding enums.

gcc won't bitch on them but conceptually they are different and could be
stored in a different width. Compiling with pcc brought this to light.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/isc/atheros_hal/dist/ah_internal.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ah_internal.h
diff -u src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.2 src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.3
--- src/sys/external/isc/atheros_hal/dist/ah_internal.h:1.2	Thu Dec 11 05:30:29 2008
+++ src/sys/external/isc/atheros_hal/dist/ah_internal.h	Thu May 14 09:07:49 2009
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ah_internal.h,v 1.2 2008/12/11 05:30:29 alc Exp $
+ * $Id: ah_internal.h,v 1.3 2009/05/14 09:07:49 reinoud Exp $
  */
 #ifndef _ATH_AH_INTERAL_H_
 #define _ATH_AH_INTERAL_H_
@@ -516,7 +516,7 @@
  * based on the current regulatory domain for the specified
  * channel.
  */
-extern	u_int ath_hal_getnfcheckrequired(struct ath_hal *, HAL_CHANNEL *);
+extern	HAL_BOOL ath_hal_getnfcheckrequired(struct ath_hal *, HAL_CHANNEL *);
 
 /*
  * Map a public channel definition to the corresponding

Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h:1.1.1.1	Thu Dec 11 04:46:27 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h	Thu May 14 09:07:49 2009
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210.h,v 1.1.1.1 2008/12/11 04:46:27 alc Exp $
+ * $Id: ar5210.h,v 1.2 2009/05/14 09:07:49 reinoud Exp $
  */
 #ifndef _ATH_AR5210_H_
 #define _ATH_AR5210_H_
@@ -254,7 +254,7 @@
 extern	HAL_BOOL ar5210SetKeyCacheEntryMac(struct ath_hal *,
 			uint16_t, const uint8_t *);
 
-extern	HAL_BOOL ar5210SetPowerMode(struct ath_hal *, uint32_t powerRequest,
+extern	HAL_BOOL ar5210SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode,
 		int setChip);
 extern	HAL_POWER_MODE ar5210GetPowerMode(struct ath_hal *);
 

Index: src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h:1.1.1.1	Thu Dec 11 04:46:31 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h	Thu May 14 09:07:49 2009
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5211.h,v 1.1.1.1 2008/12/11 04:46:31 alc Exp $
+ * $Id: ar5211.h,v 1.2 2009/05/14 09:07:49 reinoud Exp $
  */
 #ifndef _ATH_AR5211_H_
 #define _ATH_AR5211_H_
@@ -284,7 +284,7 @@
 extern	HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *,
 			uint16_t, const uint8_t *);
 
-extern	HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest,
+extern	HAL_BOOL ar5211SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode,
 		int setChip);
 extern	HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *);