net80211: calculate IEEE80211_MODE_BYTES / IEEE80211_CHAN_BYTES
instead of hardcoding it. Suggested by: adrian
This commit is contained in:
parent
3f5f953561
commit
a1c17c1c6a
@ -70,7 +70,7 @@ enum ieee80211_phymode {
|
|||||||
IEEE80211_MODE_QUARTER = 11, /* OFDM, 1/4x clock */
|
IEEE80211_MODE_QUARTER = 11, /* OFDM, 1/4x clock */
|
||||||
};
|
};
|
||||||
#define IEEE80211_MODE_MAX (IEEE80211_MODE_QUARTER+1)
|
#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
|
* Operating mode. Devices do not necessarily support
|
||||||
@ -147,7 +147,7 @@ struct ieee80211_channel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define IEEE80211_CHAN_MAX 256
|
#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_ANY 0xffff /* token for ``any channel'' */
|
||||||
#define IEEE80211_CHAN_ANYC \
|
#define IEEE80211_CHAN_ANYC \
|
||||||
((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
|
((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define _NET80211_IEEE80211_FREEBSD_H_
|
#define _NET80211_IEEE80211_FREEBSD_H_
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
#include <sys/types.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/counter.h>
|
#include <sys/counter.h>
|
||||||
#include <sys/lock.h>
|
#include <sys/lock.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user