Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2013-2014 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 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | * |
| 30 | * |
| 31 | * Author: Sandesh Goel |
| 32 | * Date: 02/25/02 |
| 33 | * History:- |
| 34 | * Date Modified by Modification Information |
| 35 | * -------------------------------------------------------------------- |
| 36 | * |
| 37 | */ |
| 38 | |
| 39 | #ifndef __SCH_GLOBAL_H__ |
| 40 | #define __SCH_GLOBAL_H__ |
| 41 | |
| 42 | #include "sir_mac_prop_exts.h" |
| 43 | #include "lim_global.h" |
| 44 | |
| 45 | #include "parser_api.h" |
| 46 | |
| 47 | #ifdef WLAN_SOFTAP_VSTA_FEATURE |
| 48 | #define TIM_IE_SIZE 0xB |
| 49 | #else |
| 50 | #define TIM_IE_SIZE 0x7 |
| 51 | #endif |
| 52 | |
| 53 | /* ----------------------- Beacon processing ------------------------ */ |
| 54 | |
| 55 | /* / Beacon structure */ |
| 56 | #define tSchBeaconStruct tSirProbeRespBeacon |
| 57 | #define tpSchBeaconStruct struct sSirProbeRespBeacon * |
| 58 | |
| 59 | /* ------------------------------------------------------------------- */ |
| 60 | |
| 61 | /* ****************** MISC defs ********************************* */ |
| 62 | |
| 63 | struct schMisc { |
| 64 | uint16_t gSchBeaconInterval; |
| 65 | |
| 66 | /* / Current CFP count */ |
| 67 | uint8_t gSchCFPCount; |
| 68 | |
| 69 | /* / CFP Duration remaining */ |
| 70 | uint8_t gSchCFPDurRemaining; |
| 71 | |
| 72 | /* / CFP Maximum Duration */ |
| 73 | uint8_t gSchCFPMaxDuration; |
| 74 | |
| 75 | /* / Current DTIM count */ |
| 76 | uint8_t gSchDTIMCount; |
| 77 | |
| 78 | /* / Whether we have initiated a CFP or not */ |
| 79 | uint8_t gSchCFPInitiated; |
| 80 | |
| 81 | /* / Whether we have initiated a CFB or not */ |
| 82 | uint8_t gSchCFBInitiated; |
| 83 | |
| 84 | /* / CFP is enabled and AP is configured as HCF */ |
| 85 | uint8_t gSchCFPEnabled; |
| 86 | |
| 87 | /* / CFB is enabled and AP is configured as HCF */ |
| 88 | uint8_t gSchCFBEnabled; |
| 89 | |
| 90 | /* --------- STA ONLY state ----------- */ |
| 91 | |
| 92 | /* / Indicates whether RR timer is running or not */ |
| 93 | uint8_t rrTimer[8]; |
| 94 | |
| 95 | /* / Indicates the remaining RR timeout value if the RR timer is running */ |
| 96 | uint16_t rrTimeout[8]; |
| 97 | |
| 98 | /* / Number of RRs transmitted */ |
| 99 | uint16_t numRR[8]; |
| 100 | uint16_t numRRtimeouts[8]; |
| 101 | |
| 102 | /* / flag to indicate that beacon template has been updated */ |
| 103 | uint8_t fBeaconChanged; |
| 104 | |
| 105 | uint16_t p2pIeOffset; |
| 106 | |
| 107 | }; |
| 108 | |
| 109 | /* ****************** MISC defs ********************************* */ |
| 110 | |
| 111 | typedef struct schStaWaitList { |
| 112 | uint16_t staId; |
| 113 | uint16_t count; |
| 114 | } tStaWaitList, *tpStaWaitList; |
| 115 | |
| 116 | /* / Global SCH structure */ |
| 117 | typedef struct sAniSirSch { |
| 118 | /* / The scheduler object */ |
| 119 | struct schMisc schObject; |
| 120 | |
| 121 | /* schQoSClass unsolicited; */ |
| 122 | |
| 123 | /* / Whether HCF is enabled or not */ |
| 124 | uint8_t gSchHcfEnabled; |
| 125 | |
| 126 | /* / Whether scan is requested by LIM or not */ |
| 127 | uint8_t gSchScanRequested; |
| 128 | |
| 129 | /* / Whether scan request is received by SCH or not */ |
| 130 | uint8_t gSchScanReqRcvd; |
| 131 | |
| 132 | /* / Debug flag to disable beacon generation */ |
| 133 | uint32_t gSchGenBeacon; |
| 134 | |
| 135 | #define SCH_MAX_ARR 100 |
| 136 | uint32_t gSchBeaconsWritten; |
| 137 | uint32_t gSchBeaconsSent; |
| 138 | uint32_t gSchBBXportRcvCnt; |
| 139 | uint32_t gSchRRRcvCnt, qosNullCnt; |
| 140 | uint32_t gSchBcnRcvCnt; |
| 141 | uint32_t gSchUnknownRcvCnt; |
| 142 | |
| 143 | uint32_t gSchBcnParseErrorCnt; |
| 144 | uint32_t gSchBcnIgnored; |
| 145 | |
| 146 | uint32_t numPoll, numData, numCorrupt; |
| 147 | uint32_t numBogusInt, numTxAct0; |
| 148 | |
| 149 | #define SCH_MAX_NUM_SCH 21 |
| 150 | uint32_t lastBeaconLength; |
| 151 | uint16_t rrTimeout; |
| 152 | uint32_t pollPeriod; |
| 153 | uint32_t multipleSched; |
| 154 | uint32_t pollFeedbackHist[8]; |
| 155 | uint32_t dataFeedbackHist[8]; |
| 156 | uint32_t maxPollTimeouts; |
| 157 | uint32_t checkCfbFlagStuck; |
| 158 | |
| 159 | /* / Sta Wait list */ |
| 160 | tpStaWaitList pStaWaitList; |
| 161 | |
| 162 | /* / Pointer to next available entry in sta wait list */ |
| 163 | uint16_t staWaitListIn; |
| 164 | /* / Pointer to first waiting sta in sta wait list */ |
| 165 | uint16_t staWaitListOut; |
| 166 | /* / Total number of waiting STAs in sta wait list */ |
| 167 | uint16_t staWaitListCount; |
| 168 | /* / Total number of schedules to be waited */ |
| 169 | uint16_t staWaitListTotalWait; |
| 170 | |
| 171 | /* / Number of entries in DPH activity queue that were ignored */ |
| 172 | uint32_t ignoreDph; |
| 173 | |
| 174 | } tAniSirSch, *tpAniSirSch; |
| 175 | |
| 176 | #endif |