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 | #if !defined( __WLAN_QCT_PAL_TYPE_H ) |
| 43 | #define __WLAN_QCT_PAL_TYPE_H |
| 44 | |
| 45 | /**========================================================================= |
| 46 | |
| 47 | \file wlan_qct_pal_type.h |
| 48 | |
| 49 | \brief define basic types PAL exports. wpt = (Wlan Pal Type) |
| 50 | |
| 51 | Definitions for platform independent. |
| 52 | |
| 53 | Copyright 2010 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 54 | |
| 55 | Qualcomm Confidential and Proprietary. |
| 56 | |
| 57 | ========================================================================*/ |
| 58 | #include "wlan_qct_os_type.h" |
| 59 | |
| 60 | typedef wpt_uint8 wpt_macAddr[6]; |
| 61 | |
| 62 | enum |
| 63 | { |
| 64 | eWLAN_PAL_FALSE = 0, |
| 65 | eWLAN_PAL_TRUE = 1, |
| 66 | }; |
| 67 | |
| 68 | typedef enum |
| 69 | { |
| 70 | eWLAN_MODULE_DAL, |
| 71 | eWLAN_MODULE_DAL_CTRL, |
| 72 | eWLAN_MODULE_DAL_DATA, |
| 73 | eWLAN_MODULE_PAL, |
| 74 | |
| 75 | //Always the last one |
| 76 | eWLAN_MODULE_COUNT |
| 77 | } wpt_moduleid; |
| 78 | |
| 79 | |
| 80 | typedef struct |
| 81 | { |
| 82 | //BIT order is most likely little endian. |
| 83 | //This structure is for netowkr-order byte array (or big-endian byte order) |
| 84 | #ifndef WLAN_PAL_BIG_ENDIAN_BIT |
| 85 | wpt_byte protVer :2; |
| 86 | wpt_byte type :2; |
| 87 | wpt_byte subType :4; |
| 88 | |
| 89 | wpt_byte toDS :1; |
| 90 | wpt_byte fromDS :1; |
| 91 | wpt_byte moreFrag :1; |
| 92 | wpt_byte retry :1; |
| 93 | wpt_byte powerMgmt :1; |
| 94 | wpt_byte moreData :1; |
| 95 | wpt_byte wep :1; |
| 96 | wpt_byte order :1; |
| 97 | |
| 98 | #else |
| 99 | |
| 100 | wpt_byte subType :4; |
| 101 | wpt_byte type :2; |
| 102 | wpt_byte protVer :2; |
| 103 | |
| 104 | wpt_byte order :1; |
| 105 | wpt_byte wep :1; |
| 106 | wpt_byte moreData :1; |
| 107 | wpt_byte powerMgmt :1; |
| 108 | wpt_byte retry :1; |
| 109 | wpt_byte moreFrag :1; |
| 110 | wpt_byte fromDS :1; |
| 111 | wpt_byte toDS :1; |
| 112 | |
| 113 | #endif |
| 114 | |
| 115 | } wpt_FrameCtrl; |
| 116 | |
| 117 | typedef struct |
| 118 | { |
| 119 | /* Frame control field */ |
| 120 | wpt_FrameCtrl frameCtrl; |
| 121 | /* Duration ID */ |
| 122 | wpt_uint16 usDurationId; |
| 123 | /* Address 1 field */ |
| 124 | wpt_macAddr vA1; |
| 125 | /* Address 2 field */ |
| 126 | wpt_macAddr vA2; |
| 127 | /* Address 3 field */ |
| 128 | wpt_macAddr vA3; |
| 129 | /* Sequence control field */ |
| 130 | wpt_uint16 sSeqCtrl; |
| 131 | /* Optional A4 address */ |
| 132 | wpt_macAddr optvA4; |
| 133 | /* Optional QOS control field */ |
| 134 | wpt_uint16 usQosCtrl; |
| 135 | }wpt_80211Header; |
| 136 | |
| 137 | typedef struct |
| 138 | { |
| 139 | wpt_macAddr dest; |
| 140 | wpt_macAddr sec; |
| 141 | wpt_uint16 lenOrType; |
| 142 | } wpt_8023Header; |
| 143 | |
| 144 | |
| 145 | #endif // __WLAN_QCT_PAL_TYPE_H |