net80211: initialize i_seq for A-MPDU frames.
Fragment number field (part of i_seq) is used for AAD calculation; as a result, without this patch every driver without h/w crypto support need to clear it before ieee80211_crypto_encap(). Also fixes rtwn(4) A-MPDU Tx with dev.rtwn.%d.hwcrypto tunable set to 0 (h/w crypto is disabled). Tested with: * Intel 6205, STA mode. * RTL8188EU, STA mode. Differential Revision: https://reviews.freebsd.org/D10753
This commit is contained in:
parent
71deb2bcf7
commit
2db223f902
@ -779,6 +779,9 @@ ieee80211_send_setup(
|
||||
tap = &ni->ni_tx_ampdu[tid];
|
||||
if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) {
|
||||
m->m_flags |= M_AMPDU_MPDU;
|
||||
|
||||
/* NB: zero out i_seq field (for s/w encryption etc) */
|
||||
*(uint16_t *)&wh->i_seq[0] = 0;
|
||||
} else {
|
||||
if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK,
|
||||
type & IEEE80211_FC0_SUBTYPE_MASK))
|
||||
@ -1610,6 +1613,9 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
|
||||
*(uint16_t *)wh->i_seq =
|
||||
htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT);
|
||||
M_SEQNO_SET(m, seqno);
|
||||
} else {
|
||||
/* NB: zero out i_seq field (for s/w encryption etc) */
|
||||
*(uint16_t *)wh->i_seq = 0;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user