Module Name:    src
Committed By:   bouyer
Date:           Sun Jan 13 16:17:56 UTC 2013

Modified Files:
        src/sys/external/isc/atheros_hal/dist [netbsd-5-1]: ah_eeprom_v14.c

Log Message:
Apply patch (requested by msaitoh in ticket #1827):
        sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c: patch
Fix off by one read.


To generate a diff of this commit:
cvs rdiff -u -r1.4.10.2 -r1.4.10.2.2.1 \
    src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.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.4.10.2 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c:1.4.10.2.2.1
--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c:1.4.10.2	Fri Aug  7 06:43:30 2009
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c	Sun Jan 13 16:17:56 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_v14.c,v 1.4.10.2 2009/08/07 06:43:30 snj Exp $
+ * $Id: ah_eeprom_v14.c,v 1.4.10.2.2.1 2013/01/13 16:17:56 bouyer Exp $
  */
 #include <sys/endian.h>
 #include "opt_ah.h"
@@ -270,7 +270,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) {

Reply via email to