From owner-p4-projects@FreeBSD.ORG Fri Sep 16 20:47:03 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0261316A421; Fri, 16 Sep 2005 20:47:03 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7AA316A41F for ; Fri, 16 Sep 2005 20:47:02 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FB9843D45 for ; Fri, 16 Sep 2005 20:47:02 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8GKl2gc022105 for ; Fri, 16 Sep 2005 20:47:02 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8GKl2CC021947 for perforce@freebsd.org; Fri, 16 Sep 2005 20:47:02 GMT (envelope-from sam@freebsd.org) Date: Fri, 16 Sep 2005 20:47:02 GMT Message-Id: <200509162047.j8GKl2CC021947@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 83757 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2005 20:47:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=83757 Change 83757 by sam@sam_ebb on 2005/09/16 20:46:28 reduce the max xmit attempts for mgt/ctl frames to deal with probe response backlog caused by low xmit rates (also need to bump the tx buffer pool); adjust the logic for deciding when a multi-rate retry callback to the rate control module is required as we can no longer depend on the #tries to decide (need to rev the rate control module api) Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#104 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#43 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#104 (text+ko) ==== @@ -3661,7 +3661,8 @@ struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; - int i, error, iswep, ismcast, isfrag, keyix, hdrlen, pktlen, try0; + int i, error, iswep, ismcast, isfrag, ismrr; + int keyix, hdrlen, pktlen, try0; u_int8_t rix, txrate, ctsrate; u_int8_t cix = 0xff; /* NB: silence compiler */ struct ath_desc *ds, *ds0; @@ -3805,6 +3806,7 @@ an = ATH_NODE(ni); flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */ + ismrr = 0; /* default no multi-rate retry*/ /* * Calculate Atheros packet type from IEEE80211 packet header, * setup for rate calculations, and select h/w transmit queue. @@ -3824,7 +3826,7 @@ txrate = rt->info[rix].rateCode; if (shortPreamble) txrate |= rt->info[rix].shortPreamble; - try0 = ATH_TXMAXTRY; + try0 = ATH_TXMGTTRY; /* NB: force all management frames to highest queue */ if (ni->ni_flags & IEEE80211_NODE_QOS) { /* NB: force all management frames to highest queue */ @@ -3839,7 +3841,7 @@ txrate = rt->info[rix].rateCode; if (shortPreamble) txrate |= rt->info[rix].shortPreamble; - try0 = ATH_TXMAXTRY; + try0 = ATH_TXMGTTRY; /* NB: force all ctl frames to highest queue */ if (ni->ni_flags & IEEE80211_NODE_QOS) { /* NB: force all ctl frames to highest queue */ @@ -3869,12 +3871,14 @@ txrate = rt->info[rix].rateCode; if (shortPreamble) txrate |= rt->info[rix].shortPreamble; - try0 = ATH_TXMAXTRY; + try0 = 1; } else { ath_rate_findrate(sc, an, shortPreamble, pktlen, &rix, &try0, &txrate); sc->sc_txrate = txrate; /* for LED blinking */ sc->sc_lastdatarix = rix; /* for fast frames */ + if (try0 != ATH_TXMAXTRY) + ismrr = 1; } /* * Default all non-QoS traffic to the best-effort queue. @@ -3976,7 +3980,8 @@ * fragment by disabling multi-rate retry which updates * duration based on the multi-rate duration table. */ - try0 = ATH_TXMAXTRY; + ismrr = 0; + try0 = ATH_TXMGTTRY; /* XXX? */ } *(u_int16_t *)wh->i_dur = htole16(dur); } @@ -4022,7 +4027,8 @@ /* * Must disable multi-rate retry when using RTS/CTS. */ - try0 = ATH_TXMAXTRY; + ismrr = 0; + try0 = ATH_TXMGTTRY; /* XXX */ } else ctsrate = 0; @@ -4099,7 +4105,7 @@ * when the hardware supports multi-rate retry and * we don't use it. */ - if (try0 != ATH_TXMAXTRY) + if (ismrr) ath_rate_setupxtxdesc(sc, an, ds, shortPreamble, rix); /* ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#43 (text+ko) ==== @@ -53,6 +53,7 @@ #define ATH_TXBUF 100 /* number of TX buffers */ #define ATH_TXDESC 10 /* number of descriptors per buffer */ #define ATH_TXMAXTRY 11 /* max number of transmit attempts */ +#define ATH_TXMGTTRY 4 /* xmit attempts for mgt/ctl frames */ #define ATH_TXINTR_PERIOD 5 /* max number of batched tx descriptors */ #define ATH_BEACON_AIFS_DEFAULT 0 /* default aifs for ap beacon q */