tx_schedules.h (218013) | tx_schedules.h (221869) |
---|---|
1/*- 2 * Copyright (c) 2005 John Bicket 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 * 36 */ 37#ifndef __ATH_RATE_SAMPLE_TXSCHEDULES_H__ 38#define __ATH_RATE_SAMPLE_TXSCHEDULES_H__ 39 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 John Bicket 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 * 36 */ 37#ifndef __ATH_RATE_SAMPLE_TXSCHEDULES_H__ 38#define __ATH_RATE_SAMPLE_TXSCHEDULES_H__ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/ath/ath_rate/sample/tx_schedules.h 218013 2011-01-28 08:57:58Z adrian $"); | 41__FBSDID("$FreeBSD: head/sys/dev/ath/ath_rate/sample/tx_schedules.h 221869 2011-05-14 01:53:38Z attilio $"); |
42 43#define A(_r) \ 44 (((_r) == 6) ? 0 : (((_r) == 9) ? 1 : (((_r) == 12) ? 2 : \ 45 (((_r) == 18) ? 3 : (((_r) == 24) ? 4 : (((_r) == 36) ? 5 : \ 46 (((_r) == 48) ? 6 : (((_r) == 54) ? 7 : 0)))))))) 47static const struct txschedule series_11a[] = { 48 { 3,A( 6), 3,A( 6), 0,A( 6), 0,A( 6) }, /* 6Mb/s */ 49 { 4,A( 9), 3,A( 6), 4,A( 6), 0,A( 6) }, /* 9Mb/s */ --- 117 unchanged lines hidden (view full) --- 167 { 4,H(12), 3,H( 9), 4,H( 6), 2,H( 3) }, /* 12Mb/s */ 168 { 4,H(18), 3,H( 12), 4,H( 9), 2,H( 3) }, /* 18Mb/s */ 169 { 4,H(24), 3,H( 18), 4,H( 12), 2,H( 6) }, /* 24Mb/s */ 170 { 4,H(27), 3,H( 24), 4,H( 18), 2,H(12) } /* 27Mb/s */ 171}; 172#undef H 173 174#ifdef Q | 42 43#define A(_r) \ 44 (((_r) == 6) ? 0 : (((_r) == 9) ? 1 : (((_r) == 12) ? 2 : \ 45 (((_r) == 18) ? 3 : (((_r) == 24) ? 4 : (((_r) == 36) ? 5 : \ 46 (((_r) == 48) ? 6 : (((_r) == 54) ? 7 : 0)))))))) 47static const struct txschedule series_11a[] = { 48 { 3,A( 6), 3,A( 6), 0,A( 6), 0,A( 6) }, /* 6Mb/s */ 49 { 4,A( 9), 3,A( 6), 4,A( 6), 0,A( 6) }, /* 9Mb/s */ --- 117 unchanged lines hidden (view full) --- 167 { 4,H(12), 3,H( 9), 4,H( 6), 2,H( 3) }, /* 12Mb/s */ 168 { 4,H(18), 3,H( 12), 4,H( 9), 2,H( 3) }, /* 18Mb/s */ 169 { 4,H(24), 3,H( 18), 4,H( 12), 2,H( 6) }, /* 24Mb/s */ 170 { 4,H(27), 3,H( 24), 4,H( 18), 2,H(12) } /* 27Mb/s */ 171}; 172#undef H 173 174#ifdef Q |
175#undef Q /* sun4v bogosity */ | 175#undef Q |
176#endif 177#define Q(_r) \ 178 (((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \ 179 (((_r) == 4.5) ? 3 : (((_r) == 6) ? 4 : (((_r) == 9) ? 5 : \ 180 (((_r) == 12) ? 6 : (((_r) == 13.5)? 7 : 0)))))))) 181static const struct txschedule series_quarter[] = { 182 { 3,Q( 1.5),3,Q(1.5), 0,Q(1.5), 0,Q(1.5) }, /* 1.5Mb/s */ 183 { 4,Q(2.25),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /*2.25Mb/s */ 184 { 4,Q( 3),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /* 3Mb/s */ 185 { 4,Q( 4.5),3,Q( 3), 4,Q(1.5), 2,Q(1.5) }, /* 4.5Mb/s */ 186 { 4,Q( 6),3,Q(4.5), 4,Q( 3), 2,Q(1.5) }, /* 6Mb/s */ 187 { 4,Q( 9),3,Q( 6), 4,Q(4.5), 2,Q(1.5) }, /* 9Mb/s */ 188 { 4,Q( 12),3,Q( 9), 4,Q( 6), 2,Q( 3) }, /* 12Mb/s */ 189 { 4,Q(13.5),3,Q( 12), 4,Q( 9), 2,Q( 6) } /*13.5Mb/s */ 190}; 191#undef Q 192 193#endif | 176#endif 177#define Q(_r) \ 178 (((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \ 179 (((_r) == 4.5) ? 3 : (((_r) == 6) ? 4 : (((_r) == 9) ? 5 : \ 180 (((_r) == 12) ? 6 : (((_r) == 13.5)? 7 : 0)))))))) 181static const struct txschedule series_quarter[] = { 182 { 3,Q( 1.5),3,Q(1.5), 0,Q(1.5), 0,Q(1.5) }, /* 1.5Mb/s */ 183 { 4,Q(2.25),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /*2.25Mb/s */ 184 { 4,Q( 3),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /* 3Mb/s */ 185 { 4,Q( 4.5),3,Q( 3), 4,Q(1.5), 2,Q(1.5) }, /* 4.5Mb/s */ 186 { 4,Q( 6),3,Q(4.5), 4,Q( 3), 2,Q(1.5) }, /* 6Mb/s */ 187 { 4,Q( 9),3,Q( 6), 4,Q(4.5), 2,Q(1.5) }, /* 9Mb/s */ 188 { 4,Q( 12),3,Q( 9), 4,Q( 6), 2,Q( 3) }, /* 12Mb/s */ 189 { 4,Q(13.5),3,Q( 12), 4,Q( 9), 2,Q( 6) } /*13.5Mb/s */ 190}; 191#undef Q 192 193#endif |