Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103312839
D10240.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D10240.diff
View Options
Index: head/sys/net80211/ieee80211_ht.c
===================================================================
--- head/sys/net80211/ieee80211_ht.c
+++ head/sys/net80211/ieee80211_ht.c
@@ -644,6 +644,25 @@
(void) ieee80211_input(ni, m, 0, 0);
}
+static int
+ampdu_dispatch_slot(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni,
+ int i)
+{
+ struct mbuf *m;
+
+ if (rap->rxa_m[i] == NULL)
+ return (0);
+
+ m = rap->rxa_m[i];
+ rap->rxa_m[i] = NULL;
+ rap->rxa_qbytes -= m->m_pkthdr.len;
+ rap->rxa_qframes--;
+
+ ampdu_dispatch(ni, m);
+
+ return (1);
+}
+
static void
ampdu_rx_moveup(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni,
int i, int winstart)
@@ -690,20 +709,14 @@
ampdu_rx_dispatch(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni)
{
struct ieee80211vap *vap = ni->ni_vap;
- struct mbuf *m;
int i;
/* flush run of frames */
for (i = 1; i < rap->rxa_wnd; i++) {
- m = rap->rxa_m[i];
- if (m == NULL)
+ if (ampdu_dispatch_slot(rap, ni, i) == 0)
break;
- rap->rxa_m[i] = NULL;
- rap->rxa_qbytes -= m->m_pkthdr.len;
- rap->rxa_qframes--;
-
- ampdu_dispatch(ni, m);
}
+
/*
* If frames remain, copy the mbuf pointers down so
* they correspond to the offsets in the new window.
@@ -725,19 +738,14 @@
ampdu_rx_flush(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap)
{
struct ieee80211vap *vap = ni->ni_vap;
- struct mbuf *m;
- int i;
+ int i, r;
for (i = 0; i < rap->rxa_wnd; i++) {
- m = rap->rxa_m[i];
- if (m == NULL)
+ r = ampdu_dispatch_slot(rap, ni, i);
+ if (r == 0)
continue;
- rap->rxa_m[i] = NULL;
- rap->rxa_qbytes -= m->m_pkthdr.len;
- rap->rxa_qframes--;
- vap->iv_stats.is_ampdu_rx_oor++;
+ vap->iv_stats.is_ampdu_rx_oor += r;
- ampdu_dispatch(ni, m);
if (rap->rxa_qframes == 0)
break;
}
@@ -753,9 +761,8 @@
struct ieee80211_rx_ampdu *rap, ieee80211_seq winstart)
{
struct ieee80211vap *vap = ni->ni_vap;
- struct mbuf *m;
ieee80211_seq seqno;
- int i;
+ int i, r;
/*
* Flush any complete MSDU's with a sequence number lower
@@ -766,18 +773,12 @@
*/
seqno = rap->rxa_start;
for (i = 0; i < rap->rxa_wnd; i++) {
- m = rap->rxa_m[i];
- if (m != NULL) {
- rap->rxa_m[i] = NULL;
- rap->rxa_qbytes -= m->m_pkthdr.len;
- rap->rxa_qframes--;
- vap->iv_stats.is_ampdu_rx_oor++;
-
- ampdu_dispatch(ni, m);
- } else {
+ r = ampdu_dispatch_slot(rap, ni, i);
+ if (r == 0) {
if (!IEEE80211_SEQ_BA_BEFORE(seqno, winstart))
break;
}
+ vap->iv_stats.is_ampdu_rx_oor += r;
seqno = IEEE80211_SEQ_INC(seqno);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 10:22 AM (10 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14819622
Default Alt Text
D10240.diff (2 KB)
Attached To
Mode
D10240: [net80211] refactor out code into ampdu_dispatch_slot(). This is again in preparation for A-MSDU in A-MPDU offload support, where A-MSDUs are decapped into standalone 802.11/802.3 MPDUs but with the same seqno/crypto IV..
Attached
Detach File
Event Timeline
Log In to Comment