summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-09-18 05:01:05 +0000
committeradrian <adrian@FreeBSD.org>2015-09-18 05:01:05 +0000
commite1e1523f6715bdeea34e64b73390eb6ad8321084 (patch)
treebdf91174e302814ad0a0d95aa8f492d47e4d7957 /sys/net80211
parent4b0b4451a95e04e6477d2d424cc3e43ee387191e (diff)
downloadFreeBSD-src-e1e1523f6715bdeea34e64b73390eb6ad8321084.zip
FreeBSD-src-e1e1523f6715bdeea34e64b73390eb6ad8321084.tar.gz
Add an external facing function to manually set the RX A-MPDU parameters
for re-ordering. Devices like if_rsu don't pass through action/management frames but do send firmware commands to inform us of things. One of those notifications is the RX A-MPDU negotiated parameters.
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ht.c37
-rw-r--r--sys/net80211/ieee80211_ht.h3
2 files changed, 40 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index d83cf65..09c007a 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -558,6 +558,43 @@ ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap,
}
/*
+ * Public function; manually setup the RX ampdu state.
+ */
+int
+ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni, int tid, int seq, int baw)
+{
+ struct ieee80211_rx_ampdu *rap;
+
+ /* XXX TODO: sanity check tid, seq, baw */
+
+ rap = &ni->ni_rx_ampdu[tid];
+
+ if (rap->rxa_flags & IEEE80211_AGGR_RUNNING) {
+ /*
+ * AMPDU previously setup and not terminated with a DELBA,
+ * flush the reorder q's in case anything remains.
+ */
+ ampdu_rx_purge(rap);
+ }
+
+ memset(rap, 0, sizeof(*rap));
+ rap->rxa_wnd = (baw== 0) ?
+ IEEE80211_AGGR_BAWMAX : min(baw, IEEE80211_AGGR_BAWMAX);
+ rap->rxa_start = seq;
+ rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND;
+
+ IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni,
+ "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x\n",
+ __func__,
+ tid,
+ seq,
+ rap->rxa_wnd,
+ rap->rxa_flags);
+
+ return 0;
+}
+
+/*
* Stop A-MPDU rx processing for the specified TID.
*/
static void
diff --git a/sys/net80211/ieee80211_ht.h b/sys/net80211/ieee80211_ht.h
index 3bda5fe..f7ba6c6 100644
--- a/sys/net80211/ieee80211_ht.h
+++ b/sys/net80211/ieee80211_ht.h
@@ -200,4 +200,7 @@ uint8_t *ieee80211_add_htinfo_vendor(uint8_t *, struct ieee80211_node *);
struct ieee80211_beacon_offsets;
void ieee80211_ht_update_beacon(struct ieee80211vap *,
struct ieee80211_beacon_offsets *);
+int ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni, int tid,
+ int seq, int baw);
+
#endif /* _NET80211_IEEE80211_HT_H_ */
OpenPOWER on IntegriCloud