Use IWN_NBANDS rather than a hard-coded limit.

Tested:

* Intel 5100, STA
This commit is contained in:
Adrian Chadd 2013-11-11 08:54:45 +00:00
parent 7c1c3741c3
commit 8ea24d528f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257948

View File

@ -1738,7 +1738,7 @@ iwn4965_read_eeprom(struct iwn_softc *sc)
iwn_read_prom_data(sc, IWN4965_EEPROM_DOMAIN, sc->eeprom_domain, 4);
/* Read the list of authorized channels (20MHz ones only). */
for (i = 0; i < 7; i++) {
for (i = 0; i < IWN_NBANDS - 1; i++) {
addr = iwn4965_regulatory_bands[i];
iwn_read_eeprom_channels(sc, i, addr);
}
@ -1829,7 +1829,7 @@ iwn5000_read_eeprom(struct iwn_softc *sc)
sc->eeprom_domain, 4);
/* Read the list of authorized channels (20MHz ones only). */
for (i = 0; i < 7; i++) {
for (i = 0; i < IWN_NBANDS - 1; i++) {
if (sc->hw_type >= IWN_HW_REV_TYPE_6000)
addr = base + iwn6000_regulatory_bands[i];
else