diff options
author | avos <avos@FreeBSD.org> | 2016-05-01 20:57:10 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-05-01 20:57:10 +0000 |
commit | a1c17c1c6a2ab01784b049bd825561f7031c02d4 (patch) | |
tree | ac0483df0495864d8f84f19e486f814ac3ce6a68 /sys/net80211 | |
parent | 3f5f953561045a8361305bba2a74e00375dc8a6d (diff) | |
download | FreeBSD-src-a1c17c1c6a2ab01784b049bd825561f7031c02d4.zip FreeBSD-src-a1c17c1c6a2ab01784b049bd825561f7031c02d4.tar.gz |
net80211: calculate IEEE80211_MODE_BYTES / IEEE80211_CHAN_BYTES
instead of hardcoding it.
Suggested by: adrian
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/_ieee80211.h | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_freebsd.h | 2 |
2 files changed, 3 insertions, 3 deletions
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 <sys/types.h> +#include <sys/param.h> #include <sys/systm.h> #include <sys/counter.h> #include <sys/lock.h> |