From owner-svn-src-all@FreeBSD.ORG Mon Feb 21 18:58:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83FF1106564A; Mon, 21 Feb 2011 18:58:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 727888FC0C; Mon, 21 Feb 2011 18:58:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1LIww1x080007; Mon, 21 Feb 2011 18:58:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1LIwwJI080005; Mon, 21 Feb 2011 18:58:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201102211858.p1LIwwJI080005@svn.freebsd.org> From: Adrian Chadd Date: Mon, 21 Feb 2011 18:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218923 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Feb 2011 18:58:58 -0000 Author: adrian Date: Mon Feb 21 18:58:58 2011 New Revision: 218923 URL: http://svn.freebsd.org/changeset/base/218923 Log: Add a vocal warning to ath_hal_computetxtime() function is used for non-11n rates. It's used to calculate: * the initial per-rate entries for short/long preamble ACK durations; * packet durations for TDMA slot decisions; * RTS/CTS protection durations; * updating the duration field in the 802.11 frame header This way invalid durations will generate a warning, prompting for it to be fixed. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon Feb 21 18:11:56 2011 (r218922) +++ head/sys/dev/ath/ath_hal/ah.c Mon Feb 21 18:58:58 2011 (r218923) @@ -318,6 +318,11 @@ ath_hal_computetxtime(struct ath_hal *ah uint32_t bitsPerSymbol, numBits, numSymbols, phyTime, txTime; uint32_t kbps; + /* Warn if this function is called for 11n rates; it should not be! */ + if (IS_HT_RATE(rates->info[rateix].rateCode)) + ath_hal_printf(ah, "%s: MCS rate? (index %d; hwrate 0x%x)\n", + __func__, rateix, rates->info[rateix].rateCode); + kbps = rates->info[rateix].rateKbps; /* * index can be invalid duting dynamic Turbo transitions.