From a1c17c1c6a2ab01784b049bd825561f7031c02d4 Mon Sep 17 00:00:00 2001 From: avos Date: Sun, 1 May 2016 20:57:10 +0000 Subject: net80211: calculate IEEE80211_MODE_BYTES / IEEE80211_CHAN_BYTES instead of hardcoding it. Suggested by: adrian --- sys/net80211/_ieee80211.h | 4 ++-- sys/net80211/ieee80211_freebsd.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net80211') diff --git a/sys/net80211/_ieee80211.h b/sys/net80211/_ieee80211.h index 3146c35..aceaba5 100644 --- a/sys/net80211/_ieee80211.h +++ b/sys/net80211/_ieee80211.h @@ -70,7 +70,7 @@ enum ieee80211_phymode { IEEE80211_MODE_QUARTER = 11, /* OFDM, 1/4x clock */ }; #define IEEE80211_MODE_MAX (IEEE80211_MODE_QUARTER+1) -#define IEEE80211_MODE_BYTES 2 /* howmany(IEEE80211_MODE_MAX, NBBY) */ +#define IEEE80211_MODE_BYTES howmany(IEEE80211_MODE_MAX, NBBY) /* * Operating mode. Devices do not necessarily support @@ -147,7 +147,7 @@ struct ieee80211_channel { }; #define IEEE80211_CHAN_MAX 256 -#define IEEE80211_CHAN_BYTES 32 /* howmany(IEEE80211_CHAN_MAX, NBBY) */ +#define IEEE80211_CHAN_BYTES howmany(IEEE80211_CHAN_MAX, NBBY) #define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */ #define IEEE80211_CHAN_ANYC \ ((struct ieee80211_channel *) IEEE80211_CHAN_ANY) diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h index d27b2ca..26fba76 100644 --- a/sys/net80211/ieee80211_freebsd.h +++ b/sys/net80211/ieee80211_freebsd.h @@ -28,7 +28,7 @@ #define _NET80211_IEEE80211_FREEBSD_H_ #ifdef _KERNEL -#include +#include #include #include #include -- cgit v1.1