Date: Mon, 21 Feb 2011 18:58:58 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218923 - head/sys/dev/ath/ath_hal Message-ID: <201102211858.p1LIwwJI080005@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102211858.p1LIwwJI080005>