svn commit: r297524 - in head/sys/dev: iwn wpi
Andriy Voskoboinyk
avos at FreeBSD.org
Sun Apr 3 14:38:28 UTC 2016
Author: avos
Date: Sun Apr 3 14:38:26 2016
New Revision: 297524
URL: https://svnweb.freebsd.org/changeset/base/297524
Log:
wpi, iwn: fix check in find_eeprom_channel()
Return correct eeprom_chan structure pointer for 7, 8, 11 and 12 5Ghz
channels.
Modified:
head/sys/dev/iwn/if_iwn.c
head/sys/dev/wpi/if_wpi.c
Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c Sun Apr 3 14:38:02 2016 (r297523)
+++ head/sys/dev/iwn/if_iwn.c Sun Apr 3 14:38:26 2016 (r297524)
@@ -2554,7 +2554,8 @@ iwn_find_eeprom_channel(struct iwn_softc
} 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];
}
}
Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c Sun Apr 3 14:38:02 2016 (r297523)
+++ head/sys/dev/wpi/if_wpi.c Sun Apr 3 14:38:26 2016 (r297524)
@@ -1503,7 +1503,8 @@ wpi_find_eeprom_channel(struct wpi_softc
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;
More information about the svn-src-head
mailing list