29#ifndef _NET80211_IEEE80211_INPUT_H_
30#define _NET80211_IEEE80211_INPUT_H_
33#define IEEE80211_VERIFY_ELEMENT(__elem, __maxlen, _action) do { \
34 if ((__elem) == NULL) { \
35 IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
36 wh, NULL, "%s", "no " #__elem ); \
37 vap->iv_stats.is_rx_elem_missing++; \
39 } else if ((__elem)[1] > (__maxlen)) { \
40 IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
41 wh, NULL, "bad " #__elem " len %d", (__elem)[1]); \
42 vap->iv_stats.is_rx_elem_toobig++; \
47#define IEEE80211_VERIFY_LENGTH(_len, _minlen, _action) do { \
48 if ((_len) < (_minlen)) { \
49 IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID, \
50 wh, NULL, "ie too short, got %d, expected %d", \
52 vap->iv_stats.is_rx_elem_toosmall++; \
58void ieee80211_ssid_mismatch(
struct ieee80211vap *,
const char *tag,
61#define IEEE80211_VERIFY_SSID(_ni, _ssid, _action) do { \
62 if ((_ssid)[1] != 0 && \
63 ((_ssid)[1] != (_ni)->ni_esslen || \
64 memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \
65 if (ieee80211_msg_input(vap)) \
66 ieee80211_ssid_mismatch(vap, \
67 ieee80211_mgt_subtype_name(subtype), \
68 wh->i_addr2, _ssid); \
69 vap->iv_stats.is_rx_ssidmismatch++; \
74#define IEEE80211_VERIFY_SSID(_ni, _ssid, _action) do { \
75 if ((_ssid)[1] != 0 && \
76 ((_ssid)[1] != (_ni)->ni_esslen || \
77 memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \
78 vap->iv_stats.is_rx_ssidmismatch++; \
84#include <sys/endian.h>
198#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
199#define SEQ_EQ(a,b) ((int)((a)-(b)) == 0)
200#define SEQNO(a) ((a) >> IEEE80211_SEQ_SEQ_SHIFT)
201#define FRAGNO(a) ((a) & IEEE80211_SEQ_FRAG_MASK)
204 uint8_t type, subtype;
208 rxseq = le16toh(*(uint16_t *)wh->
i_seq);
296 "seqno <%u,%u> fragno <%u,%u> tid %u",
312 struct mbuf *,
int,
int);
318 const uint8_t *rates,
const uint8_t *xrates,
int flags);
#define IEEE80211_RX_F_AMSDU
#define IEEE80211_RX_F_AMSDU_MORE
#define IEEE80211_FC1_RETRY
#define IEEE80211_FC0_TYPE_MASK
#define IEEE80211_ADDR_LEN
#define WME_PARAM_OUI_SUBTYPE
#define WME_INFO_OUI_SUBTYPE
#define IEEE80211_HAS_SEQ(type, subtype)
#define IEEE80211_IS_MULTICAST(_a)
#define IEEE80211_FC0_SUBTYPE_MASK
static const struct ieee80211_aclator mac
#define IEEE80211_AGGR_RUNNING
#define IEEE80211_NODE_STAT(ni, stat)
#define IEEE80211_NODE_HT
static __inline uint8_t ieee80211_gettid(const struct ieee80211_frame *wh)
#define IEEE80211_DISCARD_MAC(_vap, _m, _mac, _type, _fmt,...)
#define IEEE80211_MSG_INPUT
uint8_t i_addr1[IEEE80211_ADDR_LEN]
struct ieee80211_rx_ampdu ni_rx_ampdu[WME_NUM_TID]
struct ieee80211vap * ni_vap
ieee80211_seq ni_rxseqs[IEEE80211_TID_SIZE]
struct ieee80211_stats iv_stats