Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net80211/ieee80211_output.c
Show First 20 Lines • Show All 773 Lines • ▼ Show 20 Lines | #endif | ||||
* | * | ||||
* If the driver does seqno itself, then we can skip | * If the driver does seqno itself, then we can skip | ||||
* assigning sequence numbers here, and we can avoid | * assigning sequence numbers here, and we can avoid | ||||
* requiring the TX lock. | * requiring the TX lock. | ||||
*/ | */ | ||||
tap = &ni->ni_tx_ampdu[tid]; | tap = &ni->ni_tx_ampdu[tid]; | ||||
if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) { | if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) { | ||||
m->m_flags |= M_AMPDU_MPDU; | 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 { | } else { | ||||
if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, | if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, | ||||
type & IEEE80211_FC0_SUBTYPE_MASK)) | type & IEEE80211_FC0_SUBTYPE_MASK)) | ||||
/* | /* | ||||
* 802.11-2012 9.3.2.10 - QoS multicast frames | * 802.11-2012 9.3.2.10 - QoS multicast frames | ||||
* come out of a different seqno space. | * come out of a different seqno space. | ||||
*/ | */ | ||||
if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { | if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { | ||||
▲ Show 20 Lines • Show All 815 Lines • ▼ Show 20 Lines | if ((m->m_flags & M_AMPDU_MPDU) == 0) { | ||||
* XXX may want to control this with a driver | * XXX may want to control this with a driver | ||||
* capability; this may also change when we pull | * capability; this may also change when we pull | ||||
* aggregation up into net80211 | * aggregation up into net80211 | ||||
*/ | */ | ||||
seqno = ni->ni_txseqs[tid]++; | seqno = ni->ni_txseqs[tid]++; | ||||
*(uint16_t *)wh->i_seq = | *(uint16_t *)wh->i_seq = | ||||
htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); | htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); | ||||
M_SEQNO_SET(m, seqno); | M_SEQNO_SET(m, seqno); | ||||
} else { | |||||
/* NB: zero out i_seq field (for s/w encryption etc) */ | |||||
*(uint16_t *)wh->i_seq = 0; | |||||
} | } | ||||
} else { | } else { | ||||
/* | /* | ||||
* XXX TODO TX lock is needed for atomic updates of sequence | * XXX TODO TX lock is needed for atomic updates of sequence | ||||
* numbers. If the driver does it, then don't do it here; | * numbers. If the driver does it, then don't do it here; | ||||
* and we don't need the TX lock held. | * and we don't need the TX lock held. | ||||
*/ | */ | ||||
seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; | seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; | ||||
▲ Show 20 Lines • Show All 2,176 Lines • Show Last 20 Lines |