summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2007-06-06 20:14:04 +0000
committerdamien <damien@openbsd.org>2007-06-06 20:14:04 +0000
commit59603abf3cd78cddeeb7cbc27746b5cd71b7f6e5 (patch)
tree0bec4db3c09e61ab99eb5b2a57d3d0dd31ecb6ab
parentAnsify. No binary change. (diff)
downloadwireguard-openbsd-59603abf3cd78cddeeb7cbc27746b5cd71b7f6e5.tar.xz
wireguard-openbsd-59603abf3cd78cddeeb7cbc27746b5cd71b7f6e5.zip
- #undef the correct macro
- improve a comment
-rw-r--r--sys/dev/pci/if_wpi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 1cd10c1e075..a5f43f4efea 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.40 2007/06/06 18:06:05 cnst Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.41 2007/06/06 20:14:04 damien Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -2238,7 +2238,11 @@ wpi_get_power_index(struct wpi_softc *sc, struct wpi_power_group *group,
idx = interpolate(pwr, sample[0].power, sample[0].index,
sample[1].power, sample[1].index, 19);
- /* adjust power index based on current temperature */
+ /*-
+ * Adjust power index based on current temperature:
+ * - if colder than factory-calibrated: decrease output power
+ * - if warmer than factory-calibrated: increase output power
+ */
idx -= (sc->temp - group->temp) * 11 / 100;
/* decrease power for CCK rates (-5dB) */
@@ -2253,7 +2257,7 @@ wpi_get_power_index(struct wpi_softc *sc, struct wpi_power_group *group,
return idx;
#undef interpolate
-#undef fdiv
+#undef fdivround
}
/*