From owner-svn-src-all@freebsd.org Sun Apr 10 03:35:19 2016 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 1BCE4B0ABE2; Sun, 10 Apr 2016 03:35:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D1C4C101F; Sun, 10 Apr 2016 03:35:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3A3ZI4M029791; Sun, 10 Apr 2016 03:35:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3A3ZIKs029790; Sun, 10 Apr 2016 03:35:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201604100335.u3A3ZIKs029790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 10 Apr 2016 03:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297774 - 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.21 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: Sun, 10 Apr 2016 03:35:19 -0000 Author: adrian Date: Sun Apr 10 03:35:17 2016 New Revision: 297774 URL: https://svnweb.freebsd.org/changeset/base/297774 Log: [net80211] unconditionally do A-MPDU RX aging. It's 2016 and vendors (including us!) still have 802.11n TX/RX sequence handling bugs. It's suboptimal, but I'd rather see us default to handling things in a sensible way. So, just delete the #ifdef'ed code for now. I'll leave the option in so it doesn't break existing configurations. This all started because I've started getting reports about urtwn not working after I enabled 802.11n support, and it's because the ARM kernel configs don't include A-MPDU RX aging. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun Apr 10 01:25:48 2016 (r297773) +++ head/sys/net80211/ieee80211_ht.c Sun Apr 10 03:35:17 2016 (r297774) @@ -136,12 +136,10 @@ const struct ieee80211_mcs_rates ieee802 { 429, 477, 891, 990 }, /* MCS 76 */ }; -#ifdef IEEE80211_AMPDU_AGE static int ieee80211_ampdu_age = -1; /* threshold for ampdu reorder q (ms) */ SYSCTL_PROC(_net_wlan, OID_AUTO, ampdu_age, CTLTYPE_INT | CTLFLAG_RW, &ieee80211_ampdu_age, 0, ieee80211_sysctl_msecs_ticks, "I", "AMPDU max reorder age (ms)"); -#endif static int ieee80211_recv_bar_ena = 1; SYSCTL_INT(_net_wlan, OID_AUTO, recv_bar, CTLFLAG_RW, &ieee80211_recv_bar_ena, @@ -178,9 +176,7 @@ ieee80211_ht_init(void) /* * Setup HT parameters that depends on the clock frequency. */ -#ifdef IEEE80211_AMPDU_AGE ieee80211_ampdu_age = msecs_to_ticks(500); -#endif ieee80211_addba_timeout = msecs_to_ticks(250); ieee80211_addba_backoff = msecs_to_ticks(10*1000); ieee80211_bar_timeout = msecs_to_ticks(250); @@ -671,7 +667,6 @@ ampdu_rx_dispatch(struct ieee80211_rx_am vap->iv_stats.is_ampdu_rx_oor += i; } -#ifdef IEEE80211_AMPDU_AGE /* * Dispatch all frames in the A-MPDU re-order queue. */ @@ -696,7 +691,6 @@ ampdu_rx_flush(struct ieee80211_node *ni break; } } -#endif /* IEEE80211_AMPDU_AGE */ /* * Dispatch all frames in the A-MPDU re-order queue @@ -864,7 +858,7 @@ again: * Common case (hopefully): in the BA window. * Sec 9.10.7.6.2 a) (p.137) */ -#ifdef IEEE80211_AMPDU_AGE + /* * Check for frames sitting too long in the reorder queue. * This should only ever happen if frames are not delivered @@ -903,7 +897,7 @@ again: */ rap->rxa_age = ticks; } -#endif /* IEEE80211_AMPDU_AGE */ + /* save packet */ if (rap->rxa_m[off] == NULL) { rap->rxa_m[off] = m; @@ -1125,14 +1119,11 @@ ieee80211_ht_node_cleanup(struct ieee802 void ieee80211_ht_node_age(struct ieee80211_node *ni) { -#ifdef IEEE80211_AMPDU_AGE struct ieee80211vap *vap = ni->ni_vap; uint8_t tid; -#endif KASSERT(ni->ni_flags & IEEE80211_NODE_HT, ("not an HT sta")); -#ifdef IEEE80211_AMPDU_AGE for (tid = 0; tid < WME_NUM_TID; tid++) { struct ieee80211_rx_ampdu *rap; @@ -1155,7 +1146,6 @@ ieee80211_ht_node_age(struct ieee80211_n ampdu_rx_flush(ni, rap); } } -#endif /* IEEE80211_AMPDU_AGE */ } static struct ieee80211_channel *