Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 2009 21:01:08 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191022 - in head/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212
Message-ID:  <200904132101.n3DL18cm083516@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Mon Apr 13 21:01:08 2009
New Revision: 191022
URL: http://svn.freebsd.org/changeset/base/191022

Log:
  o eliminate a << in calculating the tx time for turbo mode by pre-multiplying
    data in the phy tables
  o correct the ctrl rate indices in the 5212 turbog phy table

Modified:
  head/sys/dev/ath/ath_hal/ah.c
  head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c

Modified: head/sys/dev/ath/ath_hal/ah.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.c	Mon Apr 13 20:58:47 2009	(r191021)
+++ head/sys/dev/ath/ath_hal/ah.c	Mon Apr 13 21:01:08 2009	(r191022)
@@ -287,8 +287,7 @@ ath_hal_computetxtime(struct ath_hal *ah
 				+ (numSymbols * OFDM_QUARTER_SYMBOL_TIME);
 		break;
 	case IEEE80211_T_TURBO:
-		/* we still save OFDM rates in kbps - so double them */
-		bitsPerSymbol = ((kbps << 1) * TURBO_SYMBOL_TIME) / 1000;
+		bitsPerSymbol	= (kbps * TURBO_SYMBOL_TIME) / 1000;
 		HALASSERT(bitsPerSymbol != 0);
 
 		numBits		= TURBO_PLCP_BITS + (frameLen << 3);

Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c	Mon Apr 13 20:58:47 2009	(r191021)
+++ head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c	Mon Apr 13 21:01:08 2009	(r191022)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5210_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 
@@ -50,14 +50,14 @@ HAL_RATE_TABLE ar5210_turbo_table = {
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 

Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c	Mon Apr 13 20:58:47 2009	(r191021)
+++ head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c	Mon Apr 13 21:01:08 2009	(r191022)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5211_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 
@@ -51,14 +51,14 @@ HAL_RATE_TABLE ar5211_turbo_table = {
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c	Mon Apr 13 20:58:47 2009	(r191021)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c	Mon Apr 13 21:01:08 2009	(r191022)
@@ -87,13 +87,13 @@ HAL_RATE_TABLE ar5212_turbog_table = {
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   3 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   3 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   3 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   3 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   1 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   1 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   2 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   2 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   2 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   2 }
 	},
 };
 
@@ -103,14 +103,14 @@ HAL_RATE_TABLE ar5212_turboa_table = {
 	{
 /*                                                 short            ctrl  */
 /*                valid                rateCode Preamble  dot11Rate Rate */
-/*   6 Mb */ {  AH_TRUE, TURBO,   6000,    0x0b,    0x00, (0x80|12),   0 },
-/*   9 Mb */ {  AH_TRUE, TURBO,   9000,    0x0f,    0x00,        18,   0 },
-/*  12 Mb */ {  AH_TRUE, TURBO,  12000,    0x0a,    0x00, (0x80|24),   2 },
-/*  18 Mb */ {  AH_TRUE, TURBO,  18000,    0x0e,    0x00,        36,   2 },
-/*  24 Mb */ {  AH_TRUE, TURBO,  24000,    0x09,    0x00, (0x80|48),   4 },
-/*  36 Mb */ {  AH_TRUE, TURBO,  36000,    0x0d,    0x00,        72,   4 },
-/*  48 Mb */ {  AH_TRUE, TURBO,  48000,    0x08,    0x00,        96,   4 },
-/*  54 Mb */ {  AH_TRUE, TURBO,  54000,    0x0c,    0x00,       108,   4 }
+/*   6 Mb */ {  AH_TRUE, TURBO,  12000,    0x0b,    0x00, (0x80|12),   0 },
+/*   9 Mb */ {  AH_TRUE, TURBO,  18000,    0x0f,    0x00,        18,   0 },
+/*  12 Mb */ {  AH_TRUE, TURBO,  24000,    0x0a,    0x00, (0x80|24),   2 },
+/*  18 Mb */ {  AH_TRUE, TURBO,  36000,    0x0e,    0x00,        36,   2 },
+/*  24 Mb */ {  AH_TRUE, TURBO,  48000,    0x09,    0x00, (0x80|48),   4 },
+/*  36 Mb */ {  AH_TRUE, TURBO,  72000,    0x0d,    0x00,        72,   4 },
+/*  48 Mb */ {  AH_TRUE, TURBO,  96000,    0x08,    0x00,        96,   4 },
+/*  54 Mb */ {  AH_TRUE, TURBO, 108000,    0x0c,    0x00,       108,   4 }
 	},
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904132101.n3DL18cm083516>