From owner-svn-src-all@freebsd.org Fri Sep 18 05:01:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC0849CD419; Fri, 18 Sep 2015 05:01:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 845651613; Fri, 18 Sep 2015 05:01:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I516av038903; Fri, 18 Sep 2015 05:01:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I516B0038901; Fri, 18 Sep 2015 05:01:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180501.t8I516B0038901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 05:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287948 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 05:01:06 -0000 Author: adrian Date: Fri Sep 18 05:01:05 2015 New Revision: 287948 URL: https://svnweb.freebsd.org/changeset/base/287948 Log: 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. Modified: head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ht.h Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Fri Sep 18 04:12:11 2015 (r287947) +++ head/sys/net80211/ieee80211_ht.c Fri Sep 18 05:01:05 2015 (r287948) @@ -558,6 +558,43 @@ ampdu_rx_start(struct ieee80211_node *ni } /* + * 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 Modified: head/sys/net80211/ieee80211_ht.h ============================================================================== --- head/sys/net80211/ieee80211_ht.h Fri Sep 18 04:12:11 2015 (r287947) +++ head/sys/net80211/ieee80211_ht.h Fri Sep 18 05:01:05 2015 (r287948) @@ -200,4 +200,7 @@ uint8_t *ieee80211_add_htinfo_vendor(uin 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_ */