wpi, iwn: fix check in find_eeprom_channel()
Return correct eeprom_chan structure pointer for 7, 8, 11 and 12 5Ghz channels.
This commit is contained in:
parent
6cbb8ca91d
commit
eb702816ae
@ -2554,7 +2554,8 @@ iwn_find_eeprom_channel(struct iwn_softc *sc, struct ieee80211_channel *c)
|
||||
} else {
|
||||
for (j = 0; j < 5; j++) {
|
||||
for (i = 0; i < iwn_bands[j].nchan; i++) {
|
||||
if (iwn_bands[j].chan[i] == c->ic_ieee)
|
||||
if (iwn_bands[j].chan[i] == c->ic_ieee &&
|
||||
((j == 0) ^ IEEE80211_IS_CHAN_A(c)) == 1)
|
||||
return &sc->eeprom_channels[j][i];
|
||||
}
|
||||
}
|
||||
|
@ -1503,7 +1503,8 @@ wpi_find_eeprom_channel(struct wpi_softc *sc, struct ieee80211_channel *c)
|
||||
|
||||
for (j = 0; j < WPI_CHAN_BANDS_COUNT; j++)
|
||||
for (i = 0; i < wpi_bands[j].nchan; i++)
|
||||
if (wpi_bands[j].chan[i] == c->ic_ieee)
|
||||
if (wpi_bands[j].chan[i] == c->ic_ieee &&
|
||||
((j == 0) ^ IEEE80211_IS_CHAN_A(c)) == 1)
|
||||
return &sc->eeprom_channels[j][i];
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user