mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-23 10:14:55 +00:00
o add M_WEP mbuf flag so drivers can mark frames that are decrypted by the
device and have had the crypto bits stripped from the 802.11 header o strip mbuf flags in the rx path before passing up the stack Reviewed by: thompsa, sephe, avatar Approved by: re (blanket wireless)
This commit is contained in:
parent
bdec1ad988
commit
b1acbdbbbb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172054
|
@ -184,14 +184,19 @@ void ieee80211_drain_ifq(struct ifqueue *);
|
|||
#define time_before_eq(a,b) time_after_eq(b,a)
|
||||
|
||||
struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen);
|
||||
|
||||
/* tx path usage */
|
||||
#define M_LINK0 M_PROTO1 /* WEP requested */
|
||||
#define M_PWR_SAV M_PROTO4 /* bypass PS handling */
|
||||
#define M_MORE_DATA M_PROTO5 /* more data frames to follow */
|
||||
#define M_FF 0x20000 /* fast frame */
|
||||
#define M_TXCB 0x40000 /* do tx complete callback */
|
||||
#define M_80211_TX (0x60000|M_PROTO1|M_WME_AC_MASK|M_PROTO4|M_PROTO5)
|
||||
|
||||
/* rx path usage */
|
||||
#define M_AMPDU M_PROTO1 /* A-MPDU processing done */
|
||||
#define M_WEP M_PROTO2 /* WEP done by hardware */
|
||||
#define M_80211_RX (M_AMPDU|M_WEP)
|
||||
/*
|
||||
* Encode WME access control bits in the PROTO flags.
|
||||
* This is safe since it's passed directly in to the
|
||||
|
|
|
@ -393,6 +393,7 @@ ieee80211_input(struct ieee80211com *ic, struct mbuf *m,
|
|||
wh = mtod(m, struct ieee80211_frame *);
|
||||
wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
|
||||
} else {
|
||||
/* XXX M_WEP and IEEE80211_F_PRIVACY */
|
||||
key = NULL;
|
||||
}
|
||||
|
||||
|
@ -474,7 +475,7 @@ ieee80211_input(struct ieee80211com *ic, struct mbuf *m,
|
|||
* any non-PAE frames received without encryption.
|
||||
*/
|
||||
if ((ic->ic_flags & IEEE80211_F_DROPUNENC) &&
|
||||
key == NULL &&
|
||||
(key == NULL && (m->m_flags & M_WEP) == 0) &&
|
||||
eh->ether_type != htons(ETHERTYPE_PAE)) {
|
||||
/*
|
||||
* Drop unencrypted frames.
|
||||
|
@ -722,6 +723,9 @@ ieee80211_deliver_data(struct ieee80211com *ic,
|
|||
} else
|
||||
IEEE80211_NODE_STAT(ni, rx_ucast);
|
||||
|
||||
/* clear driver/net80211 flags before passing up */
|
||||
m->m_flags &= ~M_80211_RX;
|
||||
|
||||
/* perform as a bridge within the AP */
|
||||
if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
|
||||
(ic->ic_flags & IEEE80211_F_NOBRIDGE) == 0) {
|
||||
|
|
Loading…
Reference in a new issue