| OLD | NEW |
| 1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
| 2 // <copyright file="htc.h" company="Atheros"> | 2 // <copyright file="htc.h" company="Atheros"> |
| 3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved. | 3 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved. |
| 4 // | 4 // |
| 5 // This program is free software; you can redistribute it and/or modify | |
| 6 // it under the terms of the GNU General Public License version 2 as | |
| 7 // published by the Free Software Foundation; | |
| 8 // | 5 // |
| 9 // Software distributed under the License is distributed on an "AS | 6 // Permission to use, copy, modify, and/or distribute this software for any |
| 10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | 7 // purpose with or without fee is hereby granted, provided that the above |
| 11 // implied. See the License for the specific language governing | 8 // copyright notice and this permission notice appear in all copies. |
| 12 // rights and limitations under the License. | 9 // |
| 10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 13 // | 17 // |
| 14 // | 18 // |
| 15 //------------------------------------------------------------------------------ | 19 //------------------------------------------------------------------------------ |
| 16 //============================================================================== | 20 //============================================================================== |
| 17 // Author(s): ="Atheros" | 21 // Author(s): ="Atheros" |
| 18 //============================================================================== | 22 //============================================================================== |
| 19 | 23 |
| 20 #ifndef __HTC_H__ | 24 #ifndef __HTC_H__ |
| 21 #define __HTC_H__ | 25 #define __HTC_H__ |
| 22 | 26 |
| 23 #ifndef ATH_TARGET | 27 #ifndef ATH_TARGET |
| 24 #include "athstartpack.h" | 28 #include "athstartpack.h" |
| 25 #endif | 29 #endif |
| 26 | 30 |
| 27 #define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field)) | 31 #define A_OFFSETOF(type,field) (unsigned long)(&(((type *)NULL)->field)) |
| 28 | 32 |
| 29 #define ASSEMBLE_UNALIGNED_UINT16(p,highbyte,lowbyte) \ | 33 #define ASSEMBLE_UNALIGNED_UINT16(p,highbyte,lowbyte) \ |
| 30 (((A_UINT16)(((A_UINT8 *)(p))[(highbyte)])) << 8 | (A_UINT16)(((A_UINT8
*)(p))[(lowbyte)])) | 34 (((A_UINT16)(((A_UINT8 *)(p))[(highbyte)])) << 8 | (A_UINT16)(((A_UINT8
*)(p))[(lowbyte)])) |
| 31 | 35 |
| 32 /* alignment independent macros (little-endian) to fetch UINT16s or UINT8s from
a | 36 /* alignment independent macros (little-endian) to fetch UINT16s or UINT8s from
a |
| 33 * structure using only the type and field name. | 37 * structure using only the type and field name. |
| 34 * Use these macros if there is the potential for unaligned buffer accesses. */ | 38 * Use these macros if there is the potential for unaligned buffer accesses. */ |
| 35 #define A_GET_UINT16_FIELD(p,type,field) \ | 39 #define A_GET_UINT16_FIELD(p,type,field) \ |
| 36 ASSEMBLE_UNALIGNED_UINT16(p,\ | 40 ASSEMBLE_UNALIGNED_UINT16(p,\ |
| 37 A_OFFSETOF(type,field) + 1, \ | 41 A_OFFSETOF(type,field) + 1, \ |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 A_UINT8 LookAhead[4]; /* 4 byte lookahead */ | 227 A_UINT8 LookAhead[4]; /* 4 byte lookahead */ |
| 224 } POSTPACK HTC_BUNDLED_LOOKAHEAD_REPORT; | 228 } POSTPACK HTC_BUNDLED_LOOKAHEAD_REPORT; |
| 225 | 229 |
| 226 #ifndef ATH_TARGET | 230 #ifndef ATH_TARGET |
| 227 #include "athendpack.h" | 231 #include "athendpack.h" |
| 228 #endif | 232 #endif |
| 229 | 233 |
| 230 | 234 |
| 231 #endif /* __HTC_H__ */ | 235 #endif /* __HTC_H__ */ |
| 232 | 236 |
| OLD | NEW |