Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame^] | 2 | * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 24 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 25 | * |
| 26 | * |
| 27 | * Permission to use, copy, modify, and/or distribute this software for |
| 28 | * any purpose with or without fee is hereby granted, provided that the |
| 29 | * above copyright notice and this permission notice appear in all |
| 30 | * copies. |
| 31 | * |
| 32 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 33 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 35 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 36 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 37 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 39 | * PERFORMANCE OF THIS SOFTWARE. |
| 40 | */ |
| 41 | |
| 42 | #ifndef DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582 |
| 43 | #define DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582 |
| 44 | /** |
| 45 | * \file dot11fdefs.h |
| 46 | * |
| 47 | * \brief C defines customizing our framesc-generated code |
| 48 | * |
| 49 | * |
| 50 | * |
| 51 | * Copyright (C) 2006 Airgo Networks, Incorporated |
| 52 | * |
| 53 | * 'framesc' generates code written in terms of a number of macros |
| 54 | * intended for customization. |
| 55 | * |
| 56 | * |
| 57 | */ |
| 58 | |
| 59 | #include "parserApi.h" |
| 60 | |
| 61 | // This controls how the "dot11f" code copies memory |
| 62 | #define DOT11F_MEMCPY(ctx, dst, src, len) \ |
| 63 | palCopyMemory( ( ctx )->hHdd, ( tANI_U8* )( dst ), ( tANI_U8* )( src ), ( len ) ) |
| 64 | |
| 65 | // This controls how the "dot11f" code compares memory |
| 66 | #define DOT11F_MEMCMP(ctx, lhs, rhs, len) \ |
| 67 | ( ! palEqualMemory( ( ctx )->hHdd, ( tANI_U8* )( lhs ), ( tANI_U8* )( rhs ), ( len ) ) ) |
| 68 | |
| 69 | # if defined ( DBG ) && ( DBG != 0 ) |
| 70 | |
| 71 | # //define DOT11F_ENABLE_LOGGING |
| 72 | # //define DOT11F_DUMP_FRAMES |
| 73 | # define DOT11F_LOG_GATE ( 4 ) |
| 74 | # define FRAMES_SEV_FOR_FRAME(ctx, sig) \ |
| 75 | ( DOT11F_ASSOCREQUEST == (sig) ? 3 : 5 ) |
| 76 | |
| 77 | #if defined( DOT11F_ENABLE_LOGGING ) |
| 78 | |
| 79 | # define DOT11F_HAVE_LOG_MACROS |
| 80 | |
| 81 | # define FRAMES_LOG0(ctx, sev, fmt) \ |
| 82 | dot11fLog((ctx), (sev), (fmt)); |
| 83 | |
| 84 | # define FRAMES_LOG1(ctx, sev, fmt, p1) \ |
| 85 | dot11fLog((ctx), (sev), (fmt), (p1)); |
| 86 | |
| 87 | # define FRAMES_LOG2(ctx, sev, fmt, p1, p2) \ |
| 88 | dot11fLog((ctx), (sev), (fmt), (p1), (p2)); |
| 89 | |
| 90 | # define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) \ |
| 91 | dot11fLog((ctx), (sev), (fmt), (p1), (p2), (p3)); |
| 92 | |
| 93 | # define FRAMES_DUMP(ctx, sev, p, n) \ |
| 94 | sirDumpBuf((pCtx), SIR_DBG_MODULE_ID, (sev), (p), (n)); |
| 95 | |
| 96 | #endif //#if defined( DOT11F_ENABLE_LOGGING ) |
| 97 | |
| 98 | # else |
| 99 | |
| 100 | # undef DOT11F_ENABLE_LOGGING |
| 101 | # undef DOT11F_DUMP_FRAMES |
| 102 | # define DOT11F_LOG_GATE ( 1 ) |
| 103 | |
| 104 | # endif |
| 105 | |
| 106 | |
| 107 | // #define DOT11F_ENABLE_DBG_BREAK ( 1 ) |
| 108 | |
| 109 | // Local Variables: |
| 110 | // fill-column: 72 |
| 111 | // indent-tabs-mode: nil |
| 112 | // show-trailing-whitespace: t |
| 113 | // End: |
| 114 | |
| 115 | #endif // DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582 |