diff options
author | sam <sam@FreeBSD.org> | 2008-09-21 23:00:19 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-09-21 23:00:19 +0000 |
commit | 7a8139bec34979455320162a624d9f5762a864d0 (patch) | |
tree | 24722386b7e72f294b811c4f1cbee461b32b26ae /sys/net80211/ieee80211_ht.c | |
parent | 50dd888a5f6605eebf5956acf6ab3c87e4e8a81e (diff) | |
download | FreeBSD-src-7a8139bec34979455320162a624d9f5762a864d0.zip FreeBSD-src-7a8139bec34979455320162a624d9f5762a864d0.tar.gz |
Cleanup AMPDU handling:
For receive:
o explicitly tag rx frames w/ M_AMPDU instead of passing frames through
the reorder processing according to the node having HT and the frame
being QoS data
o relax ieee80211_ampdu_reorder asserts to allow any frame to be passed
in, unsuitable frames are returned to the caller for normal processing;
this permits drivers that cannot inspect the PLCP to mark all data
frames as potential ampdu candidates with only a small penalty
o add M_AMPDU_MPDU to identify frames resubmitted from the reorder q
For transmit:
o tag aggregation candidates with M_AMPDU_MPDU
o fix the QoS ack policy set in ampdu subframes; we only support immediate
BA streams which should be marked for "normal ack" to get implicit block
ack behaviour; interestingly certain vendor parts BA'd frames with the
11e BA ack policy set
o do not assign a sequence # to aggregation candidates; this must be done
when frames are submitted for transmit (NB: this can/will be handled
better when aggregation is pulled up to net80211)
Diffstat (limited to 'sys/net80211/ieee80211_ht.c')
-rw-r--r-- | sys/net80211/ieee80211_ht.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 5356a66..f3c0adf 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -335,14 +335,14 @@ ampdu_rx_stop(struct ieee80211_rx_ampdu *rap) /* * Dispatch a frame from the A-MPDU reorder queue. The * frame is fed back into ieee80211_input marked with an - * M_AMPDU flag so it doesn't come back to us (it also + * M_AMPDU_MPDU flag so it doesn't come back to us (it also * permits ieee80211_input to optimize re-processing). */ static __inline void ampdu_dispatch(struct ieee80211_node *ni, struct mbuf *m) { - m->m_flags |= M_AMPDU; /* bypass normal processing */ - /* NB: rssi, noise, and rstamp are ignored w/ M_AMPDU set */ + m->m_flags |= M_AMPDU_MPDU; /* bypass normal processing */ + /* NB: rssi, noise, and rstamp are ignored w/ M_AMPDU_MPDU set */ (void) ieee80211_input(ni, m, 0, 0, 0); } @@ -517,11 +517,19 @@ ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m) uint8_t tid; int off; + KASSERT((m->m_flags & (M_AMPDU | M_AMPDU_MPDU)) == M_AMPDU, + ("!a-mpdu or already re-ordered, flags 0x%x", m->m_flags)); KASSERT(ni->ni_flags & IEEE80211_NODE_HT, ("not an HT sta")); /* NB: m_len known to be sufficient */ wh = mtod(m, struct ieee80211_qosframe *); - KASSERT(wh->i_fc[0] == IEEE80211_FC0_QOSDATA, ("not QoS data")); + if (wh->i_fc[0] != IEEE80211_FC0_QOSDATA) { + /* + * Not QoS data, shouldn't get here but just + * return it to the caller for processing. + */ + return PROCESS; + } if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) tid = ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0]; |