summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2016-01-01 00:21:07 +0000
committeradrian <adrian@FreeBSD.org>2016-01-01 00:21:07 +0000
commit9b181806d20526b3131763643956a41cb482b8e9 (patch)
tree46ec95cc9a7f66bbf2ba6cc409280a50e72bb355 /sys/net80211/ieee80211_var.h
parented55793422d36f8a8036159c0b7c8011bc2fe2fb (diff)
downloadFreeBSD-src-9b181806d20526b3131763643956a41cb482b8e9.zip
FreeBSD-src-9b181806d20526b3131763643956a41cb482b8e9.tar.gz
[net80211] document the (not completely complete) set of places where
we're assuming hz=1000 and not gracefully handling when it isn't. The math involved will return 0 for hz < 1000, which it is on some platforms and on DragonflyBSD. This doesn't fix it, it: * converts one manual use over to use the macro, and * comments where it needs some thought/fixing. I'll think about this a bit more before fixing it. Submitted by: imre@vdsz.com
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
-rw-r--r--sys/net80211/ieee80211_var.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index cd27ead..1dd57ee 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -84,6 +84,7 @@
#define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024)
#define IEEE80211_TU_TO_MS(x) (((x) * 1024) / 1000)
+/* XXX TODO: cap this at 1, in case hz is not 1000 */
#define IEEE80211_TU_TO_TICKS(x)(((x) * 1024 * hz) / (1000 * 1000))
/*
OpenPOWER on IntegriCloud