From owner-p4-projects@FreeBSD.ORG Tue Feb 3 23:01:49 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A98316A4D0; Tue, 3 Feb 2004 23:01:48 -0800 (PST) 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 4952816A4CE for ; Tue, 3 Feb 2004 23:01:48 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 391A743D4C for ; Tue, 3 Feb 2004 23:01:45 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1471j0B041411 for ; Tue, 3 Feb 2004 23:01:45 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1471iax041402 for perforce@freebsd.org; Tue, 3 Feb 2004 23:01:44 -0800 (PST) (envelope-from sam@freebsd.org) Date: Tue, 3 Feb 2004 23:01:44 -0800 (PST) Message-Id: <200402040701.i1471iax041402@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 Subject: PERFORCE change 46462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2004 07:01:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=46462 Change 46462 by sam@sam_ebb on 2004/02/03 23:01:25 o mark driver capable of transmit power control o complete 11g protection logic by only applying protection for ofdm unicast frames o add comment about issue to be dealt with for sending fragments o count frames sent with protection o disable use of multi-rate retry when applying rts/cts Affected files ... .. //depot/projects/netperf+sockets/sys/dev/ath/if_ath.c#27 edit Differences ... ==== //depot/projects/netperf+sockets/sys/dev/ath/if_ath.c#27 (text+ko) ==== @@ -340,6 +340,7 @@ | IEEE80211_C_MONITOR /* monitor mode */ | IEEE80211_C_SHPREAMBLE /* short preamble supported */ | IEEE80211_C_SHSLOT /* short slot time supported */ + | IEEE80211_C_TXPMGT /* transmit power control */ | IEEE80211_C_RCVMGT /* recv management frames */ ; ic->ic_flags |= IEEE80211_F_DATAPAD; @@ -2121,18 +2122,20 @@ } /* - * Determine whether to use RTS/CTS or just CTS for - * 802.11g protection. - * XXX use only before transmitting OFDM, not CCK. + * If 802.11g protection is enabled, determine whether + * to use RTS/CTS or just CTS. Note that this is only + * done for OFDM unicast frames. */ if ((ic->ic_flags & IEEE80211_F_USEPROT) && - (ni->ni_flags & IEEE80211_NODE_ERP)) { + rt->info[rix].phy == IEEE80211_T_OFDM && + (flags & HAL_TXDESC_NOACK) == 0) { + /* XXX fragments must use CCK rates w/ protection */ if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) flags |= HAL_TXDESC_RTSENA; else if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) flags |= HAL_TXDESC_CTSENA; cix = rt->info[sc->sc_protrix].controlRate; - /* XXX statistics */ + sc->sc_stats.ast_tx_protect++; } /* @@ -2183,6 +2186,10 @@ ctsduration += ath_hal_computetxtime(ah, rt, IEEE80211_ACK_SIZE, cix, shortPreamble); } + /* + * Must disable multi-rate retry when using RTS/CTS. + */ + try0 = ATH_TXMAXTRY; } else ctsrate = 0;