From owner-p4-projects@FreeBSD.ORG Mon May 9 04:37:04 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C016F16A4E8; Mon, 9 May 2005 04:37:03 +0000 (GMT) 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 9C26616A4E6 for ; Mon, 9 May 2005 04:37:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67A6643D7B for ; Mon, 9 May 2005 04:37:03 +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 j494b3iS026821 for ; Mon, 9 May 2005 04:37:03 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j494b32N026818 for perforce@freebsd.org; Mon, 9 May 2005 04:37:03 GMT (envelope-from sam@freebsd.org) Date: Mon, 9 May 2005 04:37:03 GMT Message-Id: <200505090437.j494b32N026818@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 76730 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: Mon, 09 May 2005 04:37:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=76730 Change 76730 by sam@sam_ebb on 2005/05/09 04:36:50 o get correct rate table for turboA o check for ff usage properly o more tx fragmentation stuff Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#9 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#9 (text+ko) ==== @@ -1663,7 +1663,7 @@ pri = M_WME_GETAC(m); txq = sc->sc_ac2q[pri]; - if (ni->ni_flags & IEEE80211_NODE_FF) { + if (IEEE80211_ATH_CAP(ni->ni_vap, ni, FF)) { /* * Check queue length; if too deep drop this * frame (tail drop considered good). @@ -4032,7 +4032,8 @@ cip = k->wk_cipher; hdrlen += cip->ic_header; pktlen += cip->ic_header + cip->ic_trailer; - if ((k->wk_flags & IEEE80211_KEY_SWMIC) == 0) + if ((k->wk_flags & IEEE80211_KEY_SWMIC) == 0 && + (m0->m_flags & M_FRAG) == 0) pktlen += cip->ic_miclen; keyix = k->wk_keyix; @@ -4192,8 +4193,7 @@ if (ismcast) { flags |= HAL_TXDESC_NOACK; /* no ack on broad/multicast */ sc->sc_stats.ast_tx_noack++; - } else if (pktlen > vap->iv_rtsthreshold && - !IEEE80211_ATH_CAP(vap, ni, FF)) { + } else if (pktlen > vap->iv_rtsthreshold && (m0->m_flags & M_FF) == 0) { flags |= HAL_TXDESC_RTSENA; /* RTS based on frame length */ cix = rt->info[rix].controlRate; sc->sc_stats.ast_tx_rts++; @@ -4230,6 +4230,13 @@ dur = rt->info[rix].spAckDuration; else dur = rt->info[rix].lpAckDuration; + if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { + KASSERT(m0->m_nextpkt != NULL, + ("next fragment missing, fc[1] 0x%x", wh->i_fc[1])); + /* SIFS+ACK+time for next fragment */ + dur += dur + ath_hal_computetxtime(ah, rt, + m0->m_nextpkt->m_len, rix, shortPreamble); + } *(u_int16_t *)wh->i_dur = htole16(dur); } @@ -5323,7 +5330,7 @@ sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_11G); break; case IEEE80211_MODE_TURBO_A: - sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108A); + sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_TURBO); break; case IEEE80211_MODE_TURBO_G: sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);