From owner-svn-src-all@FreeBSD.ORG Sun May 3 20:56:34 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CAFCF8F; Sun, 3 May 2015 20:56:34 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610FA197A; Sun, 3 May 2015 20:56:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t43KuYxR014189; Sun, 3 May 2015 20:56:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t43KuXrG014186; Sun, 3 May 2015 20:56:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505032056.t43KuXrG014186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 3 May 2015 20:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282369 - head/sys/dev/wpi 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: Sun, 03 May 2015 20:56:34 -0000 Author: adrian Date: Sun May 3 20:56:33 2015 New Revision: 282369 URL: https://svnweb.freebsd.org/changeset/base/282369 Log: Retry twice at the same rate. Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun May 3 19:30:11 2015 (r282368) +++ head/sys/dev/wpi/if_wpi.c Sun May 3 20:56:33 2015 (r282369) @@ -1957,7 +1957,7 @@ wpi_tx_done(struct wpi_softc *sc, struct struct ieee80211vap *vap; struct ieee80211com *ic; uint32_t status = le32toh(stat->status); - int ackfailcnt = stat->ackfailcnt / 2; /* wpi_mrr_setup() */ + int ackfailcnt = stat->ackfailcnt / WPI_NTRIES_DEFAULT; KASSERT(data->ni != NULL, ("no node")); KASSERT(data->m != NULL, ("no mbuf")); @@ -1966,7 +1966,7 @@ wpi_tx_done(struct wpi_softc *sc, struct DPRINTF(sc, WPI_DEBUG_XMIT, "%s: " "qid %d idx %d retries %d btkillcnt %d rate %x duration %d " - "status %x\n", __func__, desc->qid, desc->idx, ackfailcnt, + "status %x\n", __func__, desc->qid, desc->idx, stat->ackfailcnt, stat->btkillcnt, stat->rate, le32toh(stat->duration), status); /* Unmap and free mbuf. */ @@ -3125,8 +3125,8 @@ wpi_mrr_setup(struct wpi_softc *sc) /* Fallback to the immediate lower CCK rate (if any.) */ mrr.rates[i].next = (i == WPI_RIDX_CCK1) ? WPI_RIDX_CCK1 : i - 1; - /* Try one time at this rate before falling back to "next". */ - mrr.rates[i].ntries = 1; + /* Try twice at this rate before falling back to "next". */ + mrr.rates[i].ntries = WPI_NTRIES_DEFAULT; } /* OFDM rates (not used with 802.11b). */ for (i = WPI_RIDX_OFDM6; i <= WPI_RIDX_OFDM54; i++) { @@ -3138,8 +3138,8 @@ wpi_mrr_setup(struct wpi_softc *sc) ((ic->ic_curmode == IEEE80211_MODE_11A) ? WPI_RIDX_OFDM6 : WPI_RIDX_CCK2) : i - 1; - /* Try one time at this rate before falling back to "next". */ - mrr.rates[i].ntries = 1; + /* Try twice at this rate before falling back to "next". */ + mrr.rates[i].ntries = WPI_NTRIES_DEFAULT; } /* Setup MRR for control frames. */ mrr.which = htole32(WPI_MRR_CTL); Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun May 3 19:30:11 2015 (r282368) +++ head/sys/dev/wpi/if_wpireg.h Sun May 3 20:56:33 2015 (r282369) @@ -547,6 +547,8 @@ struct wpi_mrr_setup { uint8_t plcp; uint8_t flags; uint8_t ntries; +#define WPI_NTRIES_DEFAULT 2 + uint8_t next; } __packed rates[WPI_RIDX_MAX + 1]; } __packed;