svn commit: r218923 - head/sys/dev/ath/ath_hal
Adrian Chadd
adrian at FreeBSD.org
Mon Feb 21 18:58:58 UTC 2011
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.
More information about the svn-src-head
mailing list