From owner-svn-src-all@FreeBSD.ORG Mon Nov 11 09:08:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 714F1E75; Mon, 11 Nov 2013 09:08:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C52B2585; Mon, 11 Nov 2013 09:08:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAB98Nsn069316; Mon, 11 Nov 2013 09:08:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAB98NH0069315; Mon, 11 Nov 2013 09:08:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311110908.rAB98NH0069315@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Nov 2013 09:08:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257951 - head/sys/dev/iwn 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.14 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: Mon, 11 Nov 2013 09:08:23 -0000 Author: adrian Date: Mon Nov 11 09:08:22 2013 New Revision: 257951 URL: http://svnweb.freebsd.org/changeset/base/257951 Log: If A-MPDU transmission fails entirely, then no BA is received from the NIC and pushed up to the driver. Unfortunately this means there's no rate control notification done. Thus, if the rate control code makes a decision that hits a crappy rate that can't succeed, the rate code would never lower the rate and packet loss would continue. So, fake some rate control notification in this case. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Nov 11 08:56:40 2013 (r257950) +++ head/sys/dev/iwn/if_iwn.c Mon Nov 11 09:08:22 2013 (r257951) @@ -2987,12 +2987,24 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); -#ifdef NOT_YET if (nframes == 1) { - if ((*status & 0xff) != 1 && (*status & 0xff) != 2) + if ((*status & 0xff) != 1 && (*status & 0xff) != 2) { +#ifdef NOT_YET printf("ieee80211_send_bar()\n"); - } #endif + /* + * If we completely fail a transmit, make sure a + * notification is pushed up to the rate control + * layer. + */ + tap = sc->qid2tap[qid]; + tid = tap->txa_tid; + wn = (void *)tap->txa_ni; + ni = tap->txa_ni; + ieee80211_ratectl_tx_complete(ni->ni_vap, ni, + IEEE80211_RATECTL_TX_FAILURE, &nframes, NULL); + } + } bitmap = 0; start = idx;