diff options
author | 2007-06-09 09:50:00 +0000 | |
---|---|---|
committer | 2007-06-09 09:50:00 +0000 | |
commit | 21e5951bf0fb8a64f53c16eb84775fcaa5e965af (patch) | |
tree | 056a1e695f867bb6019913cb9242b2fad11533d9 /sys | |
parent | re-indent prototypes after "Static" removal. (diff) | |
download | wireguard-openbsd-21e5951bf0fb8a64f53c16eb84775fcaa5e965af.tar.xz wireguard-openbsd-21e5951bf0fb8a64f53c16eb84775fcaa5e965af.zip |
print regulatory domain in dmesg output.
fix typo in a comment.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_wpi.c | 13 | ||||
-rw-r--r-- | sys/dev/pci/if_wpireg.h | 3 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index ef23a636f3d..b27c84579d1 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.42 2007/06/06 20:33:18 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.43 2007/06/09 09:50:00 damien Exp $ */ /*- * Copyright (c) 2006, 2007 @@ -287,7 +287,6 @@ wpi_attach(struct device *parent, struct device *self, void *aux) /* read supported channels and MAC address from EEPROM */ wpi_read_eeprom(sc); - printf(", address %s\n", ether_sprintf(ic->ic_myaddr)); /* set supported .11a, .11b and .11g rates */ ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; @@ -1913,6 +1912,7 @@ void wpi_read_eeprom(struct wpi_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; + char domain[4]; int i; wpi_read_prom_data(sc, WPI_EEPROM_CAPABILITIES, &sc->cap, 1); @@ -1922,8 +1922,13 @@ wpi_read_eeprom(struct wpi_softc *sc) DPRINTF(("cap=%x rev=%x type=%x\n", sc->cap, letoh16(sc->rev), sc->type)); - /* read MAC address */ + /* read and print regulatory domain */ + wpi_read_prom_data(sc, WPI_EEPROM_DOMAIN, domain, 4); + printf(", %.4s", domain); + + /* read and print MAC address */ wpi_read_prom_data(sc, WPI_EEPROM_MAC, ic->ic_myaddr, 6); + printf(", address %s\n", ether_sprintf(ic->ic_myaddr)); /* read the list of authorized channels */ for (i = 0; i < WPI_CHAN_BANDS_COUNT; i++) @@ -2242,7 +2247,7 @@ wpi_get_power_index(struct wpi_softc *sc, struct wpi_power_group *group, /*- * Adjust power index based on current temperature: - * - if colder than factory-calibrated: decrease output power + * - if cooler than factory-calibrated: decrease output power * - if warmer than factory-calibrated: increase output power */ idx -= (sc->temp - group->temp) * 11 / 100; diff --git a/sys/dev/pci/if_wpireg.h b/sys/dev/pci/if_wpireg.h index ea98be3e76a..bf6ef5ac853 100644 --- a/sys/dev/pci/if_wpireg.h +++ b/sys/dev/pci/if_wpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpireg.h,v 1.13 2007/06/05 19:49:40 damien Exp $ */ +/* $OpenBSD: if_wpireg.h,v 1.14 2007/06/09 09:50:00 damien Exp $ */ /*- * Copyright (c) 2006, 2007 @@ -588,6 +588,7 @@ struct wpi_firmware_hdr { #define WPI_EEPROM_REVISION 0x035 #define WPI_EEPROM_CAPABILITIES 0x045 #define WPI_EEPROM_TYPE 0x04a +#define WPI_EEPROM_DOMAIN 0x060 #define WPI_EEPROM_BAND1 0x063 #define WPI_EEPROM_BAND2 0x072 #define WPI_EEPROM_BAND3 0x080 |