Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Jeff Johnson | 0fe596e | 2017-09-19 08:36:48 -0700 | [diff] [blame^] | 2 | * Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved. |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 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 | /* |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 26 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 27 | |
| 28 | |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 29 | |
| 30 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 31 | /*============================================================================ |
| 32 | limLogDump.c |
| 33 | |
| 34 | Implements the dump commands specific to the lim module. |
| 35 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 36 | ============================================================================*/ |
| 37 | |
| 38 | #include "vos_types.h" |
| 39 | #include "limApi.h" |
| 40 | |
| 41 | #if defined(ANI_LOGDUMP) |
| 42 | |
| 43 | |
| 44 | #include "limUtils.h" |
| 45 | #include "limSecurityUtils.h" |
| 46 | #include "schApi.h" |
| 47 | #include "limSerDesUtils.h" |
| 48 | #include "limAssocUtils.h" |
| 49 | #include "limSendMessages.h" |
| 50 | #include "logDump.h" |
| 51 | #include "limTrace.h" |
| 52 | #if defined WLAN_FEATURE_VOWIFI |
| 53 | #include "rrmApi.h" |
| 54 | #endif |
| 55 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 56 | #include <limFT.h> |
| 57 | #endif |
| 58 | #include "smeInside.h" |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 59 | #include "wlan_qct_wda.h" |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 60 | #ifdef WLAN_FEATURE_RMC |
| 61 | #include "wlan_qct_tl.h" |
| 62 | #include "limRMC.h" |
| 63 | #endif |
Viral Modi | f45f767 | 2013-09-06 13:29:06 -0700 | [diff] [blame] | 64 | #include "wlan_qct_wdi_dts.h" |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 65 | |
| 66 | void WDA_TimerTrafficStatsInd(tWDA_CbContext *pWDA); |
Ravi Kumar Vaishnav | b765240 | 2013-01-18 19:05:15 -0800 | [diff] [blame] | 67 | #ifdef WLANTL_DEBUG |
| 68 | extern void WLANTLPrintPktsRcvdPerRssi(v_PVOID_t pAdapter, v_U8_t staId, v_BOOL_t flush); |
| 69 | extern void WLANTLPrintPktsRcvdPerRateIdx(v_PVOID_t pAdapter, v_U8_t staId, v_BOOL_t flush); |
| 70 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 71 | |
| 72 | static char *getRole( tLimSystemRole role ) |
| 73 | { |
| 74 | switch (role) |
| 75 | { |
| 76 | case eLIM_UNKNOWN_ROLE: |
| 77 | return "eLIM_UNKNOWN_ROLE"; |
| 78 | case eLIM_AP_ROLE: |
| 79 | return "eLIM_AP_ROLE"; |
| 80 | case eLIM_STA_IN_IBSS_ROLE: |
| 81 | return "eLIM_STA_IN_IBSS_ROLE"; |
| 82 | case eLIM_STA_ROLE: |
| 83 | return "eLIM_STA_ROLE"; |
| 84 | case eLIM_BT_AMP_STA_ROLE: |
| 85 | return "eLIM_BT_AMP_STA_ROLE"; |
| 86 | case eLIM_BT_AMP_AP_ROLE: |
| 87 | return "eLIM_BT_AMP_AP_ROLE"; |
| 88 | default: |
| 89 | return "UNKNOWN"; |
| 90 | } |
| 91 | } |
| 92 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 93 | |
| 94 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 95 | char *dumpLim( tpAniSirGlobal pMac, char *p, tANI_U32 sessionId) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 96 | { |
| 97 | #ifdef FIXME_GEN6 |
| 98 | //iterate through the sessionTable and dump sta entries for each session. |
| 99 | //Keep this code under 'WLAN_DEBUG' compile flag. |
| 100 | |
| 101 | tANI_U16 i, j; |
| 102 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 103 | tpPESession psessionEntry = peFindSessionBySessionId(pMac, sessionId); |
| 104 | |
| 105 | if (psessionEntry == NULL) |
| 106 | { |
| 107 | p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", sessionId); |
| 108 | return p; |
| 109 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 110 | |
| 111 | p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n"); |
| 112 | p += log_sprintf( pMac,p, "LIM Role = (%d) %s\n", |
| 113 | pMac->lim.gLimSystemRole, getRole(pMac->lim.gLimSystemRole)); |
| 114 | p += log_sprintf( pMac,p, "SME State = (%d) %s", |
| 115 | pMac->lim.gLimSmeState, limSmeStateStr(pMac->lim.gLimSmeState)); |
| 116 | p += log_sprintf( pMac,p, "MLM State = (%d) %s", |
| 117 | pMac->lim.gLimMlmState, limMlmStateStr(pMac->lim.gLimMlmState)); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 118 | p += log_sprintf( pMac,p, "802.11n session HT Capability: %s\n", |
| 119 | (psessionEntry->htCapability == 1) ? "Enabled" : "Disabled"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 120 | p += log_sprintf( pMac,p, "gLimProcessDefdMsgs: %s\n", |
| 121 | (pMac->lim.gLimProcessDefdMsgs == 1) ? "Enabled" : "Disabled"); |
| 122 | |
| 123 | if (pMac->lim.gLimSystemRole == eLIM_STA_ROLE) |
| 124 | { |
| 125 | p += log_sprintf( pMac,p, "AID = %X\t\t\n", pMac->lim.gLimAID); |
| 126 | p += log_sprintf( pMac,p, "SSID mismatch in Beacon Count = %d\n", |
| 127 | pMac->lim.gLimBcnSSIDMismatchCnt); |
| 128 | p += log_sprintf( pMac,p, "Number of link establishments = %d\n", |
| 129 | pMac->lim.gLimNumLinkEsts); |
| 130 | } |
| 131 | else if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE) |
| 132 | { |
| 133 | p += log_sprintf( pMac,p, "Num of STAs associated = %d\n", |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 134 | peGetCurrentSTAsCount(pMac)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 135 | |
| 136 | p += log_sprintf( pMac,p, "Num of Pre-auth contexts = %d\n", |
| 137 | pMac->lim.gLimNumPreAuthContexts); |
| 138 | |
| 139 | p += log_sprintf( pMac,p, "Num of AssocReq dropped in invalid State = %d\n", |
| 140 | pMac->lim.gLimNumAssocReqDropInvldState); |
| 141 | |
| 142 | p += log_sprintf( pMac,p, "Num of ReassocReq dropped in invalid State = %d\n", |
| 143 | pMac->lim.gLimNumReassocReqDropInvldState); |
| 144 | |
| 145 | p += log_sprintf( pMac,p, "Num of Hash Miss Event ignored = %d\n", |
| 146 | pMac->lim.gLimNumHashMissIgnored); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | p += log_sprintf( pMac,p, "Num of RxCleanup Count = %d\n", |
| 150 | pMac->lim.gLimNumRxCleanup); |
| 151 | p += log_sprintf( pMac,p, "Unexpected Beacon Count = %d\n", |
| 152 | pMac->lim.gLimUnexpBcnCnt); |
| 153 | p += log_sprintf( pMac,p, "Number of Re/Assoc rejects of 11b STAs = %d\n", |
| 154 | pMac->lim.gLim11bStaAssocRejectCount); |
| 155 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in LinkEst State = %d\n", |
| 156 | pMac->lim.gLimHBfailureCntInLinkEstState); |
| 157 | p += log_sprintf( pMac,p, "No. of Probe Failures after HB failed = %d\n", |
| 158 | pMac->lim.gLimProbeFailureAfterHBfailedCnt); |
| 159 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in Other States = %d\n", |
| 160 | pMac->lim.gLimHBfailureCntInOtherStates); |
| 161 | p += log_sprintf( pMac,p, "No. of Beacons Rxed During HB Interval = %d\n", |
| 162 | pMac->lim.gLimRxedBeaconCntDuringHB); |
| 163 | p += log_sprintf( pMac,p, "Self Operating Mode = %s\n", limDot11ModeStr(pMac, (tANI_U8)pMac->lim.gLimDot11Mode)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 164 | p += log_sprintf( pMac,p, "\n"); |
| 165 | |
| 166 | if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE) |
| 167 | i = 2; |
| 168 | else |
| 169 | i = 1; |
| 170 | |
| 171 | |
| 172 | for (; i< pMac->lim.maxStation; i++) |
| 173 | { |
| 174 | tpDphHashNode pSta = dphGetHashEntry(pMac, (unsigned short)i); |
| 175 | if (pSta && pSta->added) |
| 176 | { |
| 177 | p += log_sprintf( pMac,p, "\nSTA AID: %d STA ID: %d Valid: %d AuthType: %d MLM State: %s", |
| 178 | i, pSta->staIndex, pSta->valid, |
| 179 | pSta->mlmStaContext.authType, |
| 180 | limMlmStateStr(pSta->mlmStaContext.mlmState)); |
| 181 | |
| 182 | p += log_sprintf( pMac,p, "\tAID:%-2d OpRateMode:%s ShPrmbl:%d HT:%d GF:%d TxChWidth:%d MimoPS:%d LsigProt:%d\n", |
| 183 | pSta->assocId, limStaOpRateModeStr(pSta->supportedRates.opRateMode), |
| 184 | pSta->shortPreambleEnabled, pSta->mlmStaContext.htCapability, |
| 185 | pSta->htGreenfield, pSta->htSupportedChannelWidthSet, |
| 186 | pSta->htMIMOPSState, pSta->htLsigTXOPProtection); |
| 187 | |
| 188 | p += log_sprintf( pMac,p, "\tAMPDU [MaxSz(Factor):%d, Dens: %d] AMSDU-MaxLen: %d\n", |
| 189 | pSta->htMaxRxAMpduFactor, pSta->htAMpduDensity,pSta->htMaxAmsduLength); |
| 190 | p += log_sprintf( pMac,p, "\tDSSCCkMode40Mhz: %d, SGI20: %d, SGI40: %d\n", |
| 191 | pSta->htDsssCckRate40MHzSupport, pSta->htShortGI20Mhz, |
| 192 | pSta->htShortGI40Mhz); |
| 193 | |
| 194 | p += log_sprintf( pMac,p, "\t11b Rates: "); |
| 195 | for(j=0; j<SIR_NUM_11B_RATES; j++) |
| 196 | if(pSta->supportedRates.llbRates[j] > 0) |
| 197 | p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.llbRates[j]); |
| 198 | |
| 199 | p += log_sprintf( pMac,p, "\n\t11a Rates: "); |
| 200 | for(j=0; j<SIR_NUM_11A_RATES; j++) |
| 201 | if(pSta->supportedRates.llaRates[j] > 0) |
| 202 | p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.llaRates[j]); |
| 203 | |
| 204 | p += log_sprintf( pMac,p, "\n\tPolaris Rates: "); |
| 205 | for(j=0; j<SIR_NUM_POLARIS_RATES; j++) |
| 206 | if(pSta->supportedRates.aniLegacyRates[j] > 0) |
| 207 | p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.aniLegacyRates[j]); |
| 208 | |
| 209 | p += log_sprintf( pMac,p, "\n\tTitan and Taurus Proprietary Rate Bitmap: %08x\n", |
| 210 | pSta->supportedRates.aniEnhancedRateBitmap); |
| 211 | p += log_sprintf( pMac,p, "\tMCS Rate Set Bitmap: "); |
| 212 | for(j=0; j<SIR_MAC_MAX_SUPPORTED_MCS_SET; j++) |
| 213 | p += log_sprintf( pMac,p, "%x ", pSta->supportedRates.supportedMCSSet[j]); |
| 214 | |
| 215 | } |
| 216 | } |
| 217 | p += log_sprintf( pMac,p, "\nProbe response disable = %d\n", |
| 218 | pMac->lim.gLimProbeRespDisableFlag); |
| 219 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 220 | p += log_sprintf( pMac,p, "Scan mode enable = %d\n", |
| 221 | pMac->sys.gSysEnableScanMode); |
| 222 | p += log_sprintf( pMac,p, "BackgroundScanDisable = %d\n", |
| 223 | pMac->lim.gLimBackgroundScanDisable); |
| 224 | p += log_sprintf( pMac,p, "ForceBackgroundScanDisable = %d\n", |
| 225 | pMac->lim.gLimForceBackgroundScanDisable); |
| 226 | p += log_sprintf( pMac,p, "LinkMonitor mode enable = %d\n", |
| 227 | pMac->sys.gSysEnableLinkMonitorMode); |
| 228 | p += log_sprintf( pMac,p, "Qos Capable = %d\n", |
| 229 | SIR_MAC_GET_QOS(pMac->lim.gLimCurrentBssCaps)); |
| 230 | p += log_sprintf( pMac,p, "Wme Capable = %d\n", |
| 231 | LIM_BSS_CAPS_GET(WME, pMac->lim.gLimCurrentBssQosCaps)); |
| 232 | p += log_sprintf( pMac,p, "Wsm Capable = %d\n", |
| 233 | LIM_BSS_CAPS_GET(WSM, pMac->lim.gLimCurrentBssQosCaps)); |
| 234 | if (pMac->lim.gLimSystemRole == eLIM_STA_IN_IBSS_ROLE) |
| 235 | { |
| 236 | p += log_sprintf( pMac,p, "Number of peers in IBSS = %d\n", |
| 237 | pMac->lim.gLimNumIbssPeers); |
| 238 | if (pMac->lim.gLimNumIbssPeers) |
| 239 | { |
| 240 | tLimIbssPeerNode *pTemp; |
| 241 | pTemp = pMac->lim.gLimIbssPeerList; |
| 242 | p += log_sprintf( pMac,p, "MAC-Addr Ani Edca WmeInfo HT Caps #S,#E(Rates)\n"); |
| 243 | while (pTemp != NULL) |
| 244 | { |
| 245 | p += log_sprintf( pMac,p, "%02X:%02X:%02X:%02X:%02X:%02X ", |
| 246 | pTemp->peerMacAddr[0], |
| 247 | pTemp->peerMacAddr[1], |
| 248 | pTemp->peerMacAddr[2], |
| 249 | pTemp->peerMacAddr[3], |
| 250 | pTemp->peerMacAddr[4], |
| 251 | pTemp->peerMacAddr[5]); |
| 252 | p += log_sprintf( pMac,p, " %d %d,%d %d %d %04X %d,%d\n", |
| 253 | pTemp->aniIndicator, |
| 254 | pTemp->edcaPresent, pTemp->wmeEdcaPresent, |
| 255 | pTemp->wmeInfoPresent, |
| 256 | pTemp->htCapable, |
| 257 | pTemp->capabilityInfo, |
| 258 | pTemp->supportedRates.numRates, |
| 259 | pTemp->extendedRates.numRates); |
| 260 | pTemp = pTemp->next; |
| 261 | } |
| 262 | } |
| 263 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 264 | p += log_sprintf( pMac,p, "System Scan/Learn Mode bit = %d\n", |
| 265 | pMac->lim.gLimSystemInScanLearnMode); |
| 266 | p += log_sprintf( pMac,p, "Scan override = %d\n", |
| 267 | pMac->lim.gLimScanOverride); |
| 268 | p += log_sprintf( pMac,p, "CB State protection = %d\n", |
| 269 | pMac->lim.gLimCBStateProtection); |
| 270 | p += log_sprintf( pMac,p, "Count of Titan STA's = %d\n", |
| 271 | pMac->lim.gLimTitanStaCount); |
| 272 | |
| 273 | //current BSS capability |
| 274 | p += log_sprintf( pMac,p, "**********Current BSS Capability********\n"); |
| 275 | p += log_sprintf( pMac,p, "Ess = %d, ", SIR_MAC_GET_ESS(pMac->lim.gLimCurrentBssCaps)); |
| 276 | p += log_sprintf( pMac,p, "Privacy = %d, ", SIR_MAC_GET_PRIVACY(pMac->lim.gLimCurrentBssCaps)); |
| 277 | p += log_sprintf( pMac,p, "Short Preamble = %d, ", SIR_MAC_GET_SHORT_PREAMBLE(pMac->lim.gLimCurrentBssCaps)); |
| 278 | p += log_sprintf( pMac,p, "Short Slot = %d, ", SIR_MAC_GET_SHORT_SLOT_TIME(pMac->lim.gLimCurrentBssCaps)); |
| 279 | p += log_sprintf( pMac,p, "Qos = %d\n", SIR_MAC_GET_QOS(pMac->lim.gLimCurrentBssCaps)); |
| 280 | |
| 281 | //Protection related information |
| 282 | p += log_sprintf( pMac,p, "*****Protection related information******\n"); |
| 283 | p += log_sprintf( pMac,p, "Protection %s\n", pMac->lim.gLimProtectionControl ? "Enabled" : "Disabled"); |
| 284 | |
| 285 | p += log_sprintf( pMac,p, "OBSS MODE = %d\n", pMac->lim.gHTObssMode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 286 | p += log_sprintf( pMac, p, "HT operating Mode = %d, llbCoexist = %d, llgCoexist = %d, ht20Coexist = %d, nonGfPresent = %d, RifsMode = %d, lsigTxop = %d\n", |
| 287 | pMac->lim.gHTOperMode, pMac->lim.llbCoexist, pMac->lim.llgCoexist, |
| 288 | pMac->lim.ht20MhzCoexist, pMac->lim.gHTNonGFDevicesPresent, |
| 289 | pMac->lim.gHTRifsMode, pMac->lim.gHTLSigTXOPFullSupport); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 290 | p += log_sprintf(pMac, p, "2nd Channel offset = %d\n", |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 291 | psessionEntry->hHTSecondaryChannelOffset); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 292 | #endif |
| 293 | return p; |
| 294 | } |
| 295 | |
| 296 | /******************************************* |
| 297 | * FUNCTION: triggerBeaconGen() |
| 298 | * |
| 299 | * This logdump sends SIR_SCH_BEACON_GEN_IND to SCH. |
| 300 | * SCH then proceeds to generate a beacon template |
| 301 | * and copy it to the Host/SoftMAC shared memory |
| 302 | * |
| 303 | * TODO - This routine can safely be deleted once |
| 304 | * beacon generation is working |
| 305 | ******************************************/ |
| 306 | char *triggerBeaconGen( tpAniSirGlobal pMac, char *p ) |
| 307 | { |
| 308 | tSirMsgQ mesg = { (tANI_U16) SIR_LIM_BEACON_GEN_IND, (tANI_U16) 0, (tANI_U32) 0 }; |
| 309 | |
| 310 | pMac->lim.gLimSmeState = eLIM_SME_NORMAL_STATE; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 311 | MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 312 | pMac->lim.gLimSystemRole = eLIM_AP_ROLE; |
| 313 | |
| 314 | p += log_sprintf( pMac, p, |
| 315 | "Posted SIR_LIM_BEACON_GEN_IND with result = %s\n", |
| 316 | (eSIR_SUCCESS == limPostMsgApi( pMac, &mesg ))? |
| 317 | "Success": "Failure" ); |
| 318 | |
| 319 | return p; |
| 320 | } |
| 321 | |
| 322 | |
| 323 | /******************************************* |
| 324 | * FUNCTION: testLimSendProbeRsp() |
| 325 | * |
| 326 | * This logdump sends SIR_MAC_MGMT_PROBE_RSP |
| 327 | * |
| 328 | * TODO - This routine can safely be deleted once |
| 329 | * the MGMT frame transmission is working |
| 330 | ******************************************/ |
| 331 | char *testLimSendProbeRsp( tpAniSirGlobal pMac, char *p ) |
| 332 | { |
| 333 | tSirMacAddr peerMacAddr = { 0, 1, 2, 3, 4, 5 }; |
| 334 | tAniSSID ssId; |
| 335 | tANI_U32 len = SIR_MAC_MAX_SSID_LENGTH; |
| 336 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 337 | |
| 338 | |
| 339 | if( eSIR_SUCCESS != wlan_cfgGetStr( pMac, |
| 340 | WNI_CFG_SSID, |
| 341 | (tANI_U8 *) &ssId.ssId, |
| 342 | (tANI_U32 *) &len )) |
| 343 | { |
| 344 | // Could not get SSID from CFG. Log error. |
| 345 | p += log_sprintf( pMac, p, "Unable to retrieve SSID\n" ); |
| 346 | return p; |
| 347 | } |
| 348 | else |
| 349 | ssId.length = (tANI_U8) len; |
| 350 | |
| 351 | p += log_sprintf( pMac, p, "Calling limSendProbeRspMgmtFrame...\n" ); |
| 352 | limSendProbeRspMgmtFrame( pMac, peerMacAddr, &ssId, -1, 1, psessionEntry , 0); |
| 353 | |
| 354 | return p; |
| 355 | } |
| 356 | |
| 357 | |
| 358 | static char *sendSmeScanReq(tpAniSirGlobal pMac, char *p) |
| 359 | { |
| 360 | tSirMsgQ msg; |
| 361 | tSirSmeScanReq scanReq, *pScanReq; |
| 362 | |
| 363 | p += log_sprintf( pMac,p, "sendSmeScanReq: Preparing eWNI_SME_SCAN_REQ message\n"); |
| 364 | |
| 365 | pScanReq = (tSirSmeScanReq *) &scanReq; |
| 366 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 367 | pScanReq = vos_mem_malloc(sizeof(tSirSmeScanReq)); |
| 368 | if (NULL == pScanReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 369 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 370 | p += log_sprintf( pMac,p,"sendSmeScanReq: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 371 | return p; |
| 372 | } |
| 373 | |
| 374 | pScanReq->messageType = eWNI_SME_SCAN_REQ; |
| 375 | pScanReq->minChannelTime = 30; |
| 376 | pScanReq->maxChannelTime = 130; |
| 377 | pScanReq->bssType = eSIR_INFRASTRUCTURE_MODE; |
| 378 | limGetMyMacAddr(pMac, pScanReq->bssId); |
| 379 | pScanReq->numSsid = 1; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 380 | vos_mem_copy((void *) &pScanReq->ssId[0].ssId, (void *)"Ivan", 4); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 381 | pScanReq->ssId[0].length = 4; |
| 382 | pScanReq->scanType = eSIR_ACTIVE_SCAN; |
| 383 | pScanReq->returnAfterFirstMatch = 0; |
| 384 | pScanReq->returnUniqueResults = 0; |
| 385 | pScanReq->returnFreshResults = SIR_BG_SCAN_PURGE_RESUTLS|SIR_BG_SCAN_RETURN_FRESH_RESULTS; |
| 386 | pScanReq->channelList.numChannels = 1; |
| 387 | pScanReq->channelList.channelNumber[0] = 6; |
| 388 | pScanReq->uIEFieldLen = 0; |
| 389 | pScanReq->uIEFieldOffset = sizeof(tSirSmeScanReq); |
| 390 | pScanReq->sessionId = 0; |
| 391 | |
| 392 | msg.type = eWNI_SME_SCAN_REQ; |
| 393 | msg.bodyptr = pScanReq; |
| 394 | msg.bodyval = 0; |
| 395 | p += log_sprintf( pMac,p, "sendSmeScanReq: limPostMsgApi(eWNI_SME_SCAN_REQ) \n"); |
| 396 | limPostMsgApi(pMac, &msg); |
| 397 | |
| 398 | return p; |
| 399 | } |
| 400 | |
| 401 | static char *sendSmeDisAssocReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1 ,tANI_U32 arg2) |
| 402 | { |
| 403 | |
| 404 | tpDphHashNode pStaDs; |
| 405 | tSirMsgQ msg; |
| 406 | tSirSmeDisassocReq *pDisAssocReq; |
| 407 | tpPESession psessionEntry; |
| 408 | |
| 409 | //arg1 - assocId |
| 410 | //arg2 - sessionId |
| 411 | if( arg1 < 1 ) |
| 412 | { |
| 413 | p += log_sprintf( pMac,p,"Invalid session OR Assoc ID \n"); |
| 414 | return p; |
| 415 | } |
| 416 | |
| 417 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 418 | { |
| 419 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
| 420 | return p; |
| 421 | } |
| 422 | |
| 423 | pStaDs = dphGetHashEntry(pMac, (tANI_U16)arg1, &psessionEntry->dph.dphHashTable); |
| 424 | |
| 425 | if(NULL == pStaDs) |
| 426 | { |
| 427 | p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1); |
| 428 | return p; |
| 429 | } |
| 430 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 431 | pDisAssocReq = vos_mem_malloc(sizeof(tSirSmeDisassocReq)); |
| 432 | if (NULL == pDisAssocReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 433 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 434 | p += log_sprintf( pMac,p,"sendSmeDisAssocReq: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 435 | return p; |
| 436 | } |
| 437 | |
| 438 | if( ( (psessionEntry->limSystemRole == eLIM_STA_ROLE) || |
| 439 | (psessionEntry ->limSystemRole == eLIM_BT_AMP_STA_ROLE) ) && |
| 440 | (psessionEntry->statypeForBss == STA_ENTRY_PEER)) |
| 441 | { |
| 442 | sirCopyMacAddr(pDisAssocReq->bssId,psessionEntry->bssId); |
| 443 | sirCopyMacAddr(pDisAssocReq->peerMacAddr,psessionEntry->bssId); |
| 444 | } |
| 445 | if((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 446 | || (psessionEntry->limSystemRole == eLIM_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 447 | ) |
| 448 | { |
| 449 | sirCopyMacAddr(pDisAssocReq->peerMacAddr,pStaDs->staAddr); |
| 450 | sirCopyMacAddr(pDisAssocReq->bssId,psessionEntry->bssId); |
| 451 | } |
| 452 | |
| 453 | pDisAssocReq->messageType = eWNI_SME_DISASSOC_REQ; |
| 454 | |
| 455 | pDisAssocReq->length = sizeof(tSirSmeDisassocReq); |
| 456 | |
| 457 | pDisAssocReq->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON; |
| 458 | |
| 459 | pDisAssocReq->sessionId = 0; |
| 460 | |
| 461 | pDisAssocReq->transactionId = 0; |
| 462 | |
| 463 | msg.type = eWNI_SME_DISASSOC_REQ; |
| 464 | msg.bodyptr = pDisAssocReq; |
| 465 | msg.bodyval = 0; |
| 466 | |
| 467 | p += log_sprintf( pMac,p, "sendSmeDisAssocReq: limPostMsgApi(eWNI_SME_DISASSOC_REQ) \n"); |
| 468 | limPostMsgApi(pMac, &msg); |
| 469 | |
| 470 | return p; |
| 471 | } |
| 472 | |
| 473 | |
| 474 | static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1) |
| 475 | { |
| 476 | tSirMsgQ msg; |
| 477 | tSirSmeStartBssReq *pStartBssReq; |
| 478 | unsigned char *pBuf; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 479 | ePhyChanBondState cbMode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 480 | tSirNwType nwType; |
| 481 | |
| 482 | p += log_sprintf( pMac,p, "sendSmeStartBssReq: Preparing eWNI_SME_START_BSS_REQ message\n"); |
| 483 | |
| 484 | if(arg1 > 2) |
| 485 | { |
| 486 | p += log_sprintf( pMac,p,"Invalid Argument1 \n"); |
| 487 | return p; |
| 488 | } |
| 489 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 490 | pStartBssReq = vos_mem_malloc(sizeof(tSirSmeStartBssReq)); |
| 491 | if (NULL == pStartBssReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 492 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 493 | p += log_sprintf( pMac,p,"sendSmeStartBssReq: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 494 | return p; |
| 495 | } |
| 496 | |
| 497 | pStartBssReq->messageType = eWNI_SME_START_BSS_REQ; |
| 498 | pStartBssReq->length = 29; // 0x1d |
| 499 | |
| 500 | if(arg1 == 0) //BTAMP STATION |
| 501 | { |
| 502 | pStartBssReq->bssType = eSIR_BTAMP_STA_MODE; |
| 503 | |
| 504 | pStartBssReq->ssId.length = 5; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 505 | vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"BTSTA", 5); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 506 | } |
| 507 | else if(arg1 == 1) //BTAMP AP |
| 508 | { |
| 509 | pStartBssReq->bssType = eSIR_BTAMP_AP_MODE; |
| 510 | pStartBssReq->ssId.length = 4; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 511 | vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"BTAP", 4); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 512 | } |
| 513 | else //IBSS |
| 514 | { |
| 515 | pStartBssReq->bssType = eSIR_IBSS_MODE; |
| 516 | pStartBssReq->ssId.length = 4; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 517 | vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"Ibss", 4); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 518 | } |
| 519 | |
| 520 | // Filling in channel ID 6 |
| 521 | pBuf = &(pStartBssReq->ssId.ssId[pStartBssReq->ssId.length]); |
| 522 | *pBuf = 6; |
| 523 | pBuf++; |
| 524 | |
| 525 | // Filling in CB mode |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 526 | cbMode = PHY_SINGLE_CHANNEL_CENTERED; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 527 | vos_mem_copy(pBuf, (tANI_U8 *)&cbMode, sizeof(ePhyChanBondState)); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 528 | pBuf += sizeof(ePhyChanBondState); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 529 | |
| 530 | // Filling in RSN IE Length to zero |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 531 | vos_mem_set(pBuf, sizeof(tANI_U16), 0); //tSirRSNie->length |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 532 | pBuf += sizeof(tANI_U16); |
| 533 | |
| 534 | // Filling in NW Type |
| 535 | nwType = eSIR_11G_NW_TYPE; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 536 | vos_mem_copy(pBuf, (tANI_U8 *)&nwType, sizeof(tSirNwType)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 537 | pBuf += sizeof(tSirNwType); |
| 538 | |
| 539 | /* ---- To be filled by LIM later ---- |
| 540 | pStartBssReq->operationalRateSet |
| 541 | pStartBssReq->extendedRateSet |
| 542 | pStartBssReq->dot11mode |
| 543 | pStartBssReq->bssId |
| 544 | pStartBssReq->selfMacAddr |
| 545 | pStartBssReq->beaconInterval |
| 546 | pStartBssReq->sessionId = 0; |
| 547 | pStartBssReq->transactionId = 0; |
| 548 | * ------------------------------------ */ |
| 549 | |
| 550 | msg.type = eWNI_SME_START_BSS_REQ; |
| 551 | msg.bodyptr = pStartBssReq; |
| 552 | msg.bodyval = 0; |
| 553 | p += log_sprintf( pMac,p, "sendSmeStartBssReq: limPostMsgApi(eWNI_SME_START_BSS_REQ) \n"); |
| 554 | limPostMsgApi(pMac, &msg); |
| 555 | |
| 556 | return p; |
| 557 | } |
| 558 | |
| 559 | static char *sendSmeStopBssReq(tpAniSirGlobal pMac, char *p, tANI_U32 sessionId) |
| 560 | { |
| 561 | tSirMsgQ msg; |
| 562 | tSirSmeStopBssReq stopBssReq, *pStopBssReq; |
| 563 | tANI_U16 msgLen = 0; |
| 564 | tpPESession psessionEntry; |
| 565 | |
| 566 | psessionEntry = peFindSessionBySessionId(pMac, (tANI_U8)sessionId); |
| 567 | if ( psessionEntry == NULL ) |
| 568 | { |
| 569 | limLog(pMac, LOGP, FL("Session entry does not exist for given sessionID \n")); |
| 570 | return p; |
| 571 | } |
| 572 | |
| 573 | p += log_sprintf( pMac,p, "sendSmeStopBssReq: Preparing eWNI_SME_STOP_BSS_REQ message\n"); |
| 574 | pStopBssReq = (tSirSmeStopBssReq *) &stopBssReq; |
| 575 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 576 | pStopBssReq = vos_mem_malloc(sizeof(tSirSmeStopBssReq)); |
| 577 | if (NULL == pStopBssReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 578 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 579 | p += log_sprintf( pMac,p,"sendSmeStopBssReq: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 580 | return p; |
| 581 | } |
| 582 | |
| 583 | pStopBssReq->messageType = eWNI_SME_STOP_BSS_REQ; |
| 584 | msgLen += sizeof(tANI_U32); // msgType + length |
| 585 | |
| 586 | pStopBssReq->reasonCode = eSIR_SME_SUCCESS; |
| 587 | msgLen += sizeof(tSirResultCodes); |
| 588 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 589 | vos_mem_copy((void *) &pStopBssReq->bssId, (void *)psessionEntry->bssId, 6); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 590 | msgLen += sizeof(tSirMacAddr); |
| 591 | |
| 592 | pStopBssReq->sessionId = (tANI_U8)sessionId; |
| 593 | msgLen += sizeof(tANI_U8); |
| 594 | |
| 595 | pStopBssReq->transactionId = 0; |
| 596 | msgLen += sizeof(tANI_U16); |
| 597 | |
| 598 | pStopBssReq->length = msgLen; |
| 599 | |
| 600 | msg.type = eWNI_SME_STOP_BSS_REQ; |
| 601 | msg.bodyptr = pStopBssReq; |
| 602 | msg.bodyval = 0; |
| 603 | p += log_sprintf( pMac,p, "sendSmeStopBssReq: limPostMsgApi(eWNI_SME_STOP_BSS_REQ) \n"); |
| 604 | limPostMsgApi(pMac, &msg); |
| 605 | |
| 606 | return p; |
| 607 | } |
| 608 | |
| 609 | static char *sendSmeJoinReq(tpAniSirGlobal pMac, char *p) |
| 610 | { |
| 611 | tSirMsgQ msg; |
| 612 | tSirSmeJoinReq *pJoinReq; |
| 613 | unsigned char *pBuf; |
| 614 | tANI_U16 msgLen = 307; |
| 615 | |
| 616 | tANI_U8 msgDump[307] = { |
| 617 | 0x06, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 618 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, |
| 619 | 0xDE, 0xAD, 0xBA, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 620 | 0x00, 0x00, 0x00, 0x64, 0x00, 0x21, 0x04, 0x02, 0x00, 0x00, |
| 621 | 0x00, 0x01, 0x1E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18, |
| 622 | 0x00, 0x00, 0x00, 0xA8, 0x85, 0x4F, 0x7A, 0x00, 0x06, 0x41, |
| 623 | 0x6E, 0x69, 0x4E, 0x65, 0x74, 0x01, 0x04, 0x82, 0x84, 0x8B, |
| 624 | 0x96, 0x03, 0x01, 0x06, 0x07, 0x06, 0x55, 0x53, 0x49, 0x01, |
| 625 | 0x0E, 0x1E, 0x2A, 0x01, 0x00, 0x32, 0x08, 0x0C, 0x12, 0x18, |
| 626 | 0x24, 0x30, 0x48, 0x60, 0x6C, 0x2D, 0x1A, 0xEE, 0x11, 0x03, |
| 627 | 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 628 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 629 | 0x00, 0x00, 0x00, 0x3D, 0x16, 0x06, 0x07, 0x11, 0x00, 0x00, |
| 630 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 631 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x18, 0x00, |
| 632 | 0x50, 0xF2, 0x02, 0x01, 0x01, 0x01, 0x00, 0x03, 0xA4, 0x00, |
| 633 | 0x00, 0x27, 0xA4, 0x00, 0x00, 0x42, 0x43, 0x5E, 0x00, 0x62, |
| 634 | 0x32, 0x2F, 0x00, 0xDD, 0x14, 0x00, 0x0A, 0xF5, 0x00, 0x03, |
| 635 | 0x01, 0x03, 0x05, 0x0A, 0x02, 0x80, 0xC0, 0x12, 0x06, 0xFF, |
| 636 | 0xFF, 0xFF, 0xFF, 0xB6, 0x0D, 0xDD, 0x6E, 0x00, 0x50, 0xF2, |
| 637 | 0x04, 0x10, 0x4A, 0x00, 0x01, 0x10, 0x10, 0x44, 0x00, 0x01, |
| 638 | 0x01, 0x10, 0x3B, 0x00, 0x01, 0x03, 0x10, 0x47, 0x00, 0x10, |
| 639 | 0xDB, 0xC6, 0x77, 0x28, 0xB9, 0xF3, 0xD8, 0x58, 0x86, 0xFF, |
| 640 | 0xFC, 0x6B, 0xB6, 0xB9, 0x27, 0x79, 0x10, 0x21, 0x00, 0x08, |
| 641 | 0x51, 0x75, 0x61, 0x6C, 0x63, 0x6F, 0x6D, 0x6D, 0x10, 0x23, |
| 642 | 0x00, 0x07, 0x57, 0x46, 0x52, 0x34, 0x30, 0x33, 0x31, 0x10, |
| 643 | 0x24, 0x00, 0x06, 0x4D, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10, |
| 644 | 0x42, 0x00, 0x06, 0x53, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10, |
| 645 | 0x54, 0x00, 0x08, 0x00, 0x06, 0x00, 0x50, 0xF2, 0x04, 0x00, |
| 646 | 0x01, 0x10, 0x11, 0x00, 0x06, 0x31, 0x31, 0x6E, 0x2D, 0x41, |
| 647 | 0x50, 0x10, 0x08, 0x00, 0x02, 0x01, 0x8E |
| 648 | }; |
| 649 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 650 | pJoinReq = vos_mem_malloc(msgLen); |
| 651 | if (NULL == pJoinReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 652 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 653 | p += log_sprintf( pMac,p,"sendSmeJoinReq: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 654 | return p; |
| 655 | } |
| 656 | |
| 657 | pBuf = (unsigned char *)pJoinReq; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 658 | vos_mem_copy(pBuf, (tANI_U8 *)msgDump, msgLen); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 659 | |
| 660 | msg.type = eWNI_SME_JOIN_REQ; |
| 661 | msg.bodyptr = pJoinReq; |
| 662 | msg.bodyval = 0; |
| 663 | limPostMsgApi(pMac, &msg); |
| 664 | |
| 665 | return p; |
| 666 | } |
| 667 | |
| 668 | |
| 669 | static char *printSessionInfo(tpAniSirGlobal pMac, char *p) |
| 670 | { |
| 671 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; |
| 672 | tANI_U8 i; |
| 673 | |
| 674 | p += log_sprintf( pMac, p, "Dump PE Session \n"); |
| 675 | |
| 676 | for(i=0; i < pMac->lim.maxBssId; i++) |
| 677 | { |
| 678 | if( pMac->lim.gpSession[i].valid ) |
| 679 | { |
| 680 | psessionEntry = &pMac->lim.gpSession[i]; |
| 681 | p += log_sprintf( pMac,p, "*****************************************\n"); |
| 682 | p += log_sprintf( pMac,p, " PE Session [%d] \n", i); |
| 683 | p += log_sprintf( pMac,p, "available: %d \n", psessionEntry->available); |
| 684 | p += log_sprintf( pMac,p, "peSessionId: %d, smeSessionId: %d, transactionId: %d \n", |
| 685 | psessionEntry->peSessionId, psessionEntry->smeSessionId, psessionEntry->smeSessionId); |
| 686 | p += log_sprintf( pMac,p, "bssId: %02X:%02X:%02X:%02X:%02X:%02X \n", |
| 687 | psessionEntry->bssId[0], psessionEntry->bssId[1], psessionEntry->bssId[2], |
| 688 | psessionEntry->bssId[3], psessionEntry->bssId[4], psessionEntry->bssId[5]); |
| 689 | p += log_sprintf( pMac,p, "selfMacAddr: %02X:%02X:%02X:%02X:%02X:%02X \n", |
| 690 | psessionEntry->selfMacAddr[0], psessionEntry->selfMacAddr[1], psessionEntry->selfMacAddr[2], |
| 691 | psessionEntry->selfMacAddr[3], psessionEntry->selfMacAddr[4], psessionEntry->selfMacAddr[5]); |
| 692 | p += log_sprintf( pMac,p, "bssIdx: %d \n", psessionEntry->bssIdx); |
| 693 | p += log_sprintf( pMac,p, "valid: %d \n", psessionEntry->valid); |
| 694 | p += log_sprintf( pMac,p, "limMlmState: (%d) %s ", psessionEntry->limMlmState, limMlmStateStr(psessionEntry->limMlmState) ); |
| 695 | p += log_sprintf( pMac,p, "limPrevMlmState: (%d) %s ", psessionEntry->limPrevMlmState, limMlmStateStr(psessionEntry->limMlmState) ); |
| 696 | p += log_sprintf( pMac,p, "limSmeState: (%d) %s ", psessionEntry->limSmeState, limSmeStateStr(psessionEntry->limSmeState) ); |
| 697 | p += log_sprintf( pMac,p, "limPrevSmeState: (%d) %s ", psessionEntry->limPrevSmeState, limSmeStateStr(psessionEntry->limPrevSmeState) ); |
| 698 | p += log_sprintf( pMac,p, "limSystemRole: (%d) %s \n", psessionEntry->limSystemRole, getRole(psessionEntry->limSystemRole) ); |
| 699 | p += log_sprintf( pMac,p, "bssType: (%d) %s \n", psessionEntry->bssType, limBssTypeStr(psessionEntry->bssType)); |
| 700 | p += log_sprintf( pMac,p, "operMode: %d \n", psessionEntry->operMode); |
| 701 | p += log_sprintf( pMac,p, "dot11mode: %d \n", psessionEntry->dot11mode); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 702 | p += log_sprintf( pMac,p, "htCapability: %d \n", psessionEntry->htCapability); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 703 | p += log_sprintf( pMac,p, "limRFBand: %d \n", psessionEntry->limRFBand); |
| 704 | p += log_sprintf( pMac,p, "limIbssActive: %d \n", psessionEntry->limIbssActive); |
| 705 | p += log_sprintf( pMac,p, "limCurrentAuthType: %d \n", psessionEntry->limCurrentAuthType); |
| 706 | p += log_sprintf( pMac,p, "limCurrentBssCaps: %d \n", psessionEntry->limCurrentBssCaps); |
| 707 | p += log_sprintf( pMac,p, "limCurrentBssQosCaps: %d \n", psessionEntry->limCurrentBssQosCaps); |
| 708 | p += log_sprintf( pMac,p, "limCurrentBssPropCap: %d \n", psessionEntry->limCurrentBssPropCap); |
| 709 | p += log_sprintf( pMac,p, "limSentCapsChangeNtf: %d \n", psessionEntry->limSentCapsChangeNtf); |
| 710 | p += log_sprintf( pMac,p, "LimAID: %d \n", psessionEntry->limAID); |
| 711 | p += log_sprintf( pMac,p, "ReassocbssId: %02X:%02X:%02X:%02X:%02X:%02X \n", |
| 712 | psessionEntry->limReAssocbssId[0], psessionEntry->limReAssocbssId[1], psessionEntry->limReAssocbssId[2], |
| 713 | psessionEntry->limReAssocbssId[3], psessionEntry->limReAssocbssId[4], psessionEntry->limReAssocbssId[5]); |
| 714 | p += log_sprintf( pMac,p, "limReassocChannelId: %d \n", psessionEntry->limReassocChannelId); |
| 715 | p += log_sprintf( pMac,p, "limReassocBssCaps: %d \n", psessionEntry->limReassocBssCaps); |
| 716 | p += log_sprintf( pMac,p, "limReassocBssQosCaps: %d \n", psessionEntry->limReassocBssQosCaps); |
| 717 | p += log_sprintf( pMac,p, "limReassocBssPropCap: %d \n", psessionEntry->limReassocBssPropCap); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 718 | p += log_sprintf( pMac,p, "********************************************\n"); |
| 719 | } |
| 720 | } |
| 721 | return p; |
| 722 | } |
| 723 | |
| 724 | void |
| 725 | limSetEdcaBcastACMFlag(tpAniSirGlobal pMac, tANI_U32 ac, tANI_U32 acmFlag) |
| 726 | { |
| 727 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 728 | psessionEntry->gLimEdcaParamsBC[ac].aci.acm = (tANI_U8)acmFlag; |
| 729 | psessionEntry->gLimEdcaParamSetCount++; |
| 730 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 731 | } |
| 732 | |
| 733 | static char * |
| 734 | limDumpEdcaParams(tpAniSirGlobal pMac, char *p) |
| 735 | { |
| 736 | tANI_U8 i = 0; |
| 737 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 738 | p += log_sprintf( pMac,p, "EDCA parameter set count = %d\n", psessionEntry->gLimEdcaParamSetCount); |
| 739 | p += log_sprintf( pMac,p, "Broadcast parameters\n"); |
| 740 | p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n"); |
| 741 | for(i = 0; i < MAX_NUM_AC; i++) |
| 742 | { |
| 743 | //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters. |
| 744 | p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i, |
| 745 | psessionEntry->gLimEdcaParamsBC[i].aci.aci, psessionEntry->gLimEdcaParamsBC[i].aci.acm, |
| 746 | psessionEntry->gLimEdcaParamsBC[i].aci.aifsn, psessionEntry->gLimEdcaParamsBC[i].cw.max, |
| 747 | psessionEntry->gLimEdcaParamsBC[i].cw.min, psessionEntry->gLimEdcaParamsBC[i].txoplimit); |
| 748 | } |
| 749 | |
| 750 | p += log_sprintf( pMac,p, "\nLocal parameters\n"); |
| 751 | p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n"); |
| 752 | for(i = 0; i < MAX_NUM_AC; i++) |
| 753 | { |
| 754 | //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters. |
| 755 | p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i, |
| 756 | psessionEntry->gLimEdcaParams[i].aci.aci, psessionEntry->gLimEdcaParams[i].aci.acm, |
| 757 | psessionEntry->gLimEdcaParams[i].aci.aifsn, psessionEntry->gLimEdcaParams[i].cw.max, |
| 758 | psessionEntry->gLimEdcaParams[i].cw.min, psessionEntry->gLimEdcaParams[i].txoplimit); |
| 759 | } |
| 760 | |
| 761 | return p; |
| 762 | } |
| 763 | |
| 764 | |
| 765 | static char* limDumpTspecEntry(tpAniSirGlobal pMac, char *p, tANI_U32 tspecEntryNo) |
| 766 | { |
| 767 | tpLimTspecInfo pTspecList; |
| 768 | if(tspecEntryNo >= LIM_NUM_TSPEC_MAX) |
| 769 | { |
| 770 | p += log_sprintf( pMac,p, "Tspec Entry no. %d is out of allowed range(0 .. %d)\n", |
| 771 | tspecEntryNo, (LIM_NUM_TSPEC_MAX - 1)); |
| 772 | return p; |
| 773 | } |
| 774 | pTspecList = &pMac->lim.tspecInfo[tspecEntryNo]; |
| 775 | if (pTspecList->inuse) |
| 776 | p += log_sprintf( pMac,p, "Entry %d is VALID\n", tspecEntryNo); |
| 777 | else |
| 778 | { |
| 779 | p += log_sprintf( pMac,p, "Entry %d is UNUSED\n", tspecEntryNo); |
| 780 | return p; |
| 781 | } |
| 782 | p += log_sprintf( pMac,p, "\tSta %0x:%0x:%0x:%0x:%0x:%0x, AID %d, Index %d\n", |
| 783 | pTspecList->staAddr[0], pTspecList->staAddr[1], |
| 784 | pTspecList->staAddr[2], pTspecList->staAddr[3], |
| 785 | pTspecList->staAddr[4], pTspecList->staAddr[5], |
| 786 | pTspecList->assocId, pTspecList->idx); |
| 787 | p += log_sprintf( pMac,p, "\tType %d, Length %d, ackPolicy %d, userPrio %d, accessPolicy = %d, Dir %d, tsid %d\n", |
| 788 | pTspecList->tspec.type, pTspecList->tspec.length, |
| 789 | pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio, |
| 790 | pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction, |
| 791 | pTspecList->tspec.tsinfo.traffic.tsid); |
| 792 | p += log_sprintf( pMac,p, "\tPsb %d, Agg %d, TrafficType %d, schedule %d; msduSz: nom %d, max %d\n", |
| 793 | pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation, |
| 794 | pTspecList->tspec.tsinfo.traffic.trafficType, pTspecList->tspec.tsinfo.schedule.schedule, |
| 795 | pTspecList->tspec.nomMsduSz, pTspecList->tspec.maxMsduSz); |
| 796 | p += log_sprintf( pMac,p, "\tSvcInt: Min %d, Max %d; dataRate: Min %d, mean %d, peak %d\n", |
| 797 | pTspecList->tspec.minSvcInterval, pTspecList->tspec.maxSvcInterval, |
| 798 | pTspecList->tspec.minDataRate, pTspecList->tspec.meanDataRate, |
| 799 | pTspecList->tspec.peakDataRate); |
| 800 | p += log_sprintf( pMac,p, "\tmaxBurstSz %d, delayBound %d, minPhyRate %d, surplusBw %d, mediumTime %d\n", |
| 801 | pTspecList->tspec.maxBurstSz, pTspecList->tspec.delayBound, |
| 802 | pTspecList->tspec.minPhyRate, pTspecList->tspec.surplusBw, |
| 803 | pTspecList->tspec.mediumTime); |
| 804 | |
| 805 | return p; |
| 806 | } |
| 807 | |
| 808 | static char* dumpTspecTableSummary(tpAniSirGlobal pMac, tpLimTspecInfo pTspecList, char *p, int ctspec) |
| 809 | { |
| 810 | p += log_sprintf( pMac, p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", |
| 811 | ctspec, pTspecList->idx, pTspecList->assocId, |
| 812 | pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio, |
| 813 | pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation, |
| 814 | pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction, |
| 815 | pTspecList->tspec.tsinfo.traffic.tsid, pTspecList->tspec.tsinfo.traffic.trafficType); |
| 816 | |
| 817 | return p; |
| 818 | } |
| 819 | |
| 820 | |
| 821 | static char* limDumpDphTableSummary(tpAniSirGlobal pMac,char *p) |
| 822 | { |
| 823 | tANI_U8 i, j; |
| 824 | p += log_sprintf( pMac,p, "DPH Table dump\n"); |
| 825 | |
| 826 | for(j=0; j < pMac->lim.maxBssId; j++) |
| 827 | { |
| 828 | /* Find first free room in session table */ |
| 829 | if(pMac->lim.gpSession[j].valid) |
| 830 | { |
| 831 | p += log_sprintf( pMac,p, "aid staId bssid encPol qosMode wme 11e wsm staaddr\n"); |
| 832 | for(i = 0; i < pMac->lim.gpSession[j].dph.dphHashTable.size; i++) |
| 833 | { |
| 834 | if (pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].added) |
| 835 | { |
| 836 | p += log_sprintf( pMac,p, "%d %d %d %d %d %d %d %d %x:%x:%x:%x:%x:%x\n", |
| 837 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].assocId, |
| 838 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staIndex, |
| 839 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].bssId, |
| 840 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].encPolicy, |
| 841 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].qosMode, |
| 842 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wmeEnabled, |
| 843 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].lleEnabled, |
| 844 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wsmEnabled, |
| 845 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAuthenticated, |
| 846 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[0], |
| 847 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[1], |
| 848 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[2], |
| 849 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[3], |
| 850 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[4], |
| 851 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[5]); |
| 852 | } |
| 853 | } |
| 854 | } |
| 855 | } |
| 856 | return p; |
| 857 | } |
| 858 | |
| 859 | // add the specified tspec to the tspec list |
| 860 | static char* limDumpTsecTable( tpAniSirGlobal pMac, char* p) |
| 861 | { |
| 862 | int ctspec; |
| 863 | tpLimTspecInfo pTspecList = &pMac->lim.tspecInfo[0]; |
| 864 | |
| 865 | p += log_sprintf( pMac,p, "=======LIM TSPEC TABLE DUMP\n"); |
| 866 | p += log_sprintf( pMac,p, "Num\tIdx\tAID\tAckPol\tUP\tPSB\tAgg\tAccessPol\tDir\tTSID\ttraffic\n"); |
| 867 | |
| 868 | for (ctspec = 0; ctspec < LIM_NUM_TSPEC_MAX; ctspec++, pTspecList++) |
| 869 | { |
| 870 | if (pTspecList->inuse) |
| 871 | p = dumpTspecTableSummary(pMac, pTspecList, p, ctspec); |
| 872 | } |
| 873 | return p; |
| 874 | } |
| 875 | |
| 876 | static char * |
| 877 | dump_lim_tspec_table( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 878 | { |
| 879 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 880 | p = limDumpTsecTable(pMac, p); |
| 881 | return p; |
| 882 | } |
| 883 | |
| 884 | static char * |
| 885 | dump_lim_tspec_entry( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 886 | { |
| 887 | (void) arg2; (void) arg3; (void) arg4; |
| 888 | p = limDumpTspecEntry(pMac, p, arg1); |
| 889 | return p; |
| 890 | } |
| 891 | |
| 892 | static char * |
| 893 | dump_lim_dph_table_summary( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 894 | { |
| 895 | (void) arg2; (void) arg3; (void) arg4; |
| 896 | p = limDumpDphTableSummary(pMac, p); |
| 897 | return p; |
| 898 | } |
| 899 | |
| 900 | |
| 901 | static char * |
| 902 | dump_lim_link_monitor_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 903 | { |
| 904 | tANI_U32 ind, val; |
| 905 | |
| 906 | (void) arg2; (void) arg3; (void) arg4; |
| 907 | p += log_sprintf( pMac,p, "\n ----- LIM Heart Beat Stats ----- \n"); |
| 908 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in LinkEst State = %d\n", |
| 909 | pMac->lim.gLimHBfailureCntInLinkEstState); |
| 910 | p += log_sprintf( pMac,p, "No. of Probe Failures after HB failed = %d\n", |
| 911 | pMac->lim.gLimProbeFailureAfterHBfailedCnt); |
| 912 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in Other States = %d\n", |
| 913 | pMac->lim.gLimHBfailureCntInOtherStates); |
| 914 | |
| 915 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val) == eSIR_SUCCESS) |
| 916 | p += log_sprintf( pMac,p, "Cfg HeartBeat Threshold = %d\n", val); |
| 917 | |
| 918 | p += log_sprintf( pMac,p, "# Beacons Rcvd in HB interval # of times\n"); |
| 919 | |
| 920 | for (ind = 1; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++) |
| 921 | { |
| 922 | p += log_sprintf( pMac,p, "\t\t\t\t\t\t\t\t%2d\t\t\t\t\t\t\t\t\t\t\t%8d\n", ind, |
| 923 | pMac->lim.gLimHeartBeatBeaconStats[ind]); |
| 924 | } |
| 925 | p += log_sprintf( pMac,p, "\t\t\t\t\t\t\t\t%2d>\t\t\t\t\t\t\t\t\t\t%8d\n", |
| 926 | MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL-1, |
| 927 | pMac->lim.gLimHeartBeatBeaconStats[0]); |
| 928 | |
| 929 | if (arg1 != 0) |
| 930 | { |
| 931 | for (ind = 0; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++) |
| 932 | pMac->lim.gLimHeartBeatBeaconStats[ind] = 0; |
| 933 | |
| 934 | pMac->lim.gLimHBfailureCntInLinkEstState = 0; |
| 935 | pMac->lim.gLimProbeFailureAfterHBfailedCnt = 0; |
| 936 | pMac->lim.gLimHBfailureCntInOtherStates = 0; |
| 937 | |
| 938 | p += log_sprintf( pMac,p, "\nReset HeartBeat Statistics\n"); |
| 939 | } |
| 940 | return p; |
| 941 | } |
| 942 | |
| 943 | static char * |
| 944 | dump_lim_edca_params( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 945 | { |
| 946 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 947 | p = limDumpEdcaParams(pMac, p); |
| 948 | return p; |
| 949 | } |
| 950 | |
| 951 | static char * |
| 952 | dump_lim_acm_set( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 953 | { |
| 954 | (void) arg3; (void) arg4; |
| 955 | limSetEdcaBcastACMFlag(pMac, arg1 /*ac(0..3)*/, arg2 /*(acmFlag = 1 to set ACM*/); |
| 956 | return p; |
| 957 | } |
| 958 | |
| 959 | static char * |
| 960 | dump_lim_bgscan_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 961 | { |
| 962 | (void) arg2; (void) arg3; (void) arg4; |
| 963 | pMac->lim.gLimForceBackgroundScanDisable = (arg1 == 0) ? 1 : 0; |
| 964 | p += log_sprintf( pMac,p, "Bgnd scan is now %s\n", |
| 965 | (pMac->lim.gLimForceBackgroundScanDisable) ? "Disabled" : "On"); |
| 966 | return p; |
| 967 | } |
| 968 | |
| 969 | static char * |
| 970 | dump_lim_linkmonitor_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 971 | { |
| 972 | (void) arg2; (void) arg3; (void) arg4; |
| 973 | pMac->sys.gSysEnableLinkMonitorMode = (arg1 == 0) ? 0 : 1; |
| 974 | p += log_sprintf( pMac,p, "LinkMonitor mode enable = %s\n", |
| 975 | (pMac->sys.gSysEnableLinkMonitorMode) ? "On" : "Off"); |
| 976 | return p; |
| 977 | } |
| 978 | |
| 979 | static char * |
| 980 | dump_lim_proberesp_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 981 | { |
| 982 | (void) arg2; (void) arg3; (void) arg4; |
| 983 | pMac->lim.gLimProbeRespDisableFlag = (arg1 == 0) ? 0 : 1; |
| 984 | p += log_sprintf( pMac,p, "ProbeResponse mode disable = %s\n", |
| 985 | (pMac->lim.gLimProbeRespDisableFlag) ? "On" : "Off"); |
| 986 | return p; |
| 987 | } |
| 988 | |
| 989 | static char * |
| 990 | dump_lim_add_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 991 | { |
| 992 | #ifdef FIXME_GEN6 |
| 993 | tpDphHashNode pStaDs; |
| 994 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 995 | tSirMacAddr staMac = {0}; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 996 | tANI_U16 peerIdx; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 997 | if(arg2 > 5) |
| 998 | goto addStaFail; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 999 | peerIdx = limAssignPeerIdx(pMac, psessionEntry); |
| 1000 | pStaDs = dphGetHashEntry(pMac, peerIdx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1001 | if(NULL == pStaDs) |
| 1002 | { |
| 1003 | staMac[5] = (tANI_U8) arg1; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 1004 | pStaDs = dphAddHashEntry(pMac, staMac, peerIdx, &psessionEntry->dph.dphHashTable); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1005 | if(NULL == pStaDs) |
| 1006 | goto addStaFail; |
| 1007 | |
| 1008 | pStaDs->staType = STA_ENTRY_PEER; |
| 1009 | switch(arg2) |
| 1010 | { |
| 1011 | //11b station |
| 1012 | case 0: |
| 1013 | { |
| 1014 | pStaDs->mlmStaContext.htCapability = 0; |
| 1015 | pStaDs->erpEnabled = 0; |
| 1016 | p += log_sprintf( pMac,p, "11b"); |
| 1017 | } |
| 1018 | break; |
| 1019 | //11g station |
| 1020 | case 1: |
| 1021 | { |
| 1022 | pStaDs->mlmStaContext.htCapability = 0; |
| 1023 | pStaDs->erpEnabled = 1; |
| 1024 | p += log_sprintf( pMac,p, "11g"); |
| 1025 | } |
| 1026 | break; |
| 1027 | //ht20 station non-GF |
| 1028 | case 2: |
| 1029 | { |
| 1030 | pStaDs->mlmStaContext.htCapability = 1; |
| 1031 | pStaDs->erpEnabled = 1; |
| 1032 | pStaDs->htSupportedChannelWidthSet = 0; |
| 1033 | pStaDs->htGreenfield = 0; |
| 1034 | p += log_sprintf( pMac,p, "HT20 non-GF"); |
| 1035 | } |
| 1036 | break; |
| 1037 | //ht20 station GF |
| 1038 | case 3: |
| 1039 | { |
| 1040 | pStaDs->mlmStaContext.htCapability = 1; |
| 1041 | pStaDs->erpEnabled = 1; |
| 1042 | pStaDs->htSupportedChannelWidthSet = 0; |
| 1043 | pStaDs->htGreenfield = 1; |
| 1044 | p += log_sprintf( pMac,p, "HT20 GF"); |
| 1045 | } |
| 1046 | break; |
| 1047 | //ht40 station non-GF |
| 1048 | case 4: |
| 1049 | { |
| 1050 | pStaDs->mlmStaContext.htCapability = 1; |
| 1051 | pStaDs->erpEnabled = 1; |
| 1052 | pStaDs->htSupportedChannelWidthSet = 1; |
| 1053 | pStaDs->htGreenfield = 0; |
| 1054 | p += log_sprintf( pMac,p, "HT40 non-GF"); |
| 1055 | } |
| 1056 | break; |
| 1057 | //ht40 station GF |
| 1058 | case 5: |
| 1059 | { |
| 1060 | pStaDs->mlmStaContext.htCapability = 1; |
| 1061 | pStaDs->erpEnabled = 1; |
| 1062 | pStaDs->htSupportedChannelWidthSet = 1; |
| 1063 | pStaDs->htGreenfield = 1; |
| 1064 | p += log_sprintf( pMac,p, "HT40 GF"); |
| 1065 | } |
| 1066 | break; |
| 1067 | default: |
| 1068 | { |
| 1069 | p += log_sprintf( pMac,p, "arg2 not in range [0..3]. Station not added.\n"); |
| 1070 | goto addStaFail; |
| 1071 | } |
| 1072 | break; |
| 1073 | } |
| 1074 | |
| 1075 | pStaDs->added = 1; |
| 1076 | p += log_sprintf( pMac,p, " station with mac address 00:00:00:00:00:%x added.\n", (tANI_U8)arg1); |
| 1077 | limAddSta(pMac, pStaDs,psessionEntry); |
| 1078 | } |
| 1079 | else |
| 1080 | { |
| 1081 | addStaFail: |
| 1082 | p += log_sprintf( pMac,p, "Could not add station\n"); |
| 1083 | p += log_sprintf( pMac,p, "arg1: 6th byte of the station MAC address\n"); |
| 1084 | p += log_sprintf( pMac,p, "arg2[0..5] : station type as described below\n"); |
| 1085 | p += log_sprintf( pMac,p, "\t 0: 11b, 1: 11g, 2: HT20 non-GF, 3: HT20 GF, 4: HT40 non-GF, 5: HT40 GF\n"); |
| 1086 | } |
| 1087 | #endif |
| 1088 | return p; |
| 1089 | } |
| 1090 | |
| 1091 | static char * |
| 1092 | dump_lim_del_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1093 | { |
| 1094 | |
| 1095 | tpDphHashNode pStaDs; |
| 1096 | tLimMlmDisassocInd mlmDisassocInd; |
| 1097 | tpPESession psessionEntry; |
| 1098 | tANI_U8 reasonCode = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON; |
| 1099 | |
| 1100 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 1101 | { |
| 1102 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
| 1103 | return p; |
| 1104 | } |
| 1105 | |
| 1106 | pStaDs = dphGetHashEntry(pMac, (tANI_U16)arg1, &psessionEntry->dph.dphHashTable); |
| 1107 | |
| 1108 | if(NULL == pStaDs) |
| 1109 | { |
| 1110 | p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1); |
| 1111 | return p; |
| 1112 | } |
| 1113 | |
| 1114 | if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) |
| 1115 | { |
| 1116 | p += log_sprintf( pMac,p, "received Disassoc frame from peer that is in state %X \n", pStaDs->mlmStaContext.mlmState); |
| 1117 | return p; |
| 1118 | } |
| 1119 | |
| 1120 | pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC; |
| 1121 | pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes) reasonCode; |
| 1122 | |
| 1123 | // Issue Disassoc Indication to SME. |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1124 | vos_mem_copy((tANI_U8 *) &mlmDisassocInd.peerMacAddr, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1125 | (tANI_U8 *) pStaDs->staAddr, sizeof(tSirMacAddr)); |
| 1126 | mlmDisassocInd.reasonCode = reasonCode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1127 | mlmDisassocInd.disassocTrigger = eLIM_PEER_ENTITY_DISASSOC; |
| 1128 | |
| 1129 | mlmDisassocInd.sessionId = psessionEntry->peSessionId; |
| 1130 | |
| 1131 | limPostSmeMessage(pMac, LIM_MLM_DISASSOC_IND, (tANI_U32 *) &mlmDisassocInd); |
| 1132 | // Receive path cleanup |
| 1133 | limCleanupRxPath(pMac, pStaDs,psessionEntry); |
| 1134 | return p; |
| 1135 | } |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | static char * |
| 1141 | set_lim_prot_cfg( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1142 | { |
| 1143 | |
| 1144 | /********************************** |
| 1145 | * Protection Enable |
| 1146 | * |
| 1147 | *LOWER byte for associated stations |
| 1148 | *UPPER byte for overlapping stations. |
| 1149 | *11g ==> protection from 11g |
| 1150 | *11b ==> protection from 11b |
| 1151 | *each byte will have the following info |
| 1152 | *bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 |
| 1153 | *reserved reserved RIFS Lsig n-GF ht20 11g 11b |
| 1154 | ********************************** |
| 1155 | WNI_CFG_PROTECTION_ENABLED I 4 9 |
| 1156 | V RW NP RESTART |
| 1157 | LIM |
| 1158 | 0 0xff 0xff |
| 1159 | V RW NP RESTART |
| 1160 | LIM |
| 1161 | 0 0xffff 0xffff |
| 1162 | |
| 1163 | #ENUM FROM_llB 0 |
| 1164 | #ENUM FROM_llG 1 |
| 1165 | #ENUM HT_20 2 |
| 1166 | #ENUM NON_GF 3 |
| 1167 | #ENUM LSIG_TXOP 4 |
| 1168 | #ENUM RIFS 5 |
| 1169 | #ENUM OLBC_FROM_llB 8 |
| 1170 | #ENUM OLBC_FROM_llG 9 |
| 1171 | #ENUM OLBC_HT20 10 |
| 1172 | #ENUM OLBC_NON_GF 11 |
| 1173 | #ENUM OLBC_LSIG_TXOP 12 |
| 1174 | #ENUM OLBC_RIFS 13 |
| 1175 | ******************************************/ |
| 1176 | if(1 == arg1) |
| 1177 | dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, 0xff, arg3, arg4, p); |
| 1178 | else if(2 == arg1) |
| 1179 | dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, arg2 & 0xff, arg3, arg4, p); |
| 1180 | else |
| 1181 | { |
| 1182 | p += log_sprintf( pMac,p, "To set protection config:\n"); |
| 1183 | p += log_sprintf( pMac,p, "arg1: operation type(1 -> set to Default 0xff, 2-> set to a arg2, else print help)\n"); |
| 1184 | } |
| 1185 | return p; |
| 1186 | } |
| 1187 | |
| 1188 | |
| 1189 | static char * |
| 1190 | dump_lim_set_protection_control( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1191 | { |
| 1192 | dump_cfg_set(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, arg1, arg2, arg3, p); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1193 | limSetCfgProtection(pMac, NULL); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1194 | return p; |
| 1195 | } |
| 1196 | |
| 1197 | |
| 1198 | static char * |
| 1199 | dump_lim_send_SM_Power_Mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1200 | { |
| 1201 | tSirMsgQ msg; |
| 1202 | tpSirMbMsg pMBMsg; |
| 1203 | tSirMacHTMIMOPowerSaveState state; |
| 1204 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1205 | p += log_sprintf( pMac,p, "%s: Verifying the Arguments\n", __func__); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1206 | if ((arg1 > 3) || (arg1 == 2)) |
| 1207 | { |
| 1208 | p += log_sprintf( pMac,p, "Invalid Argument , enter one of the valid states\n"); |
| 1209 | return p; |
| 1210 | } |
| 1211 | |
| 1212 | state = (tSirMacHTMIMOPowerSaveState) arg1; |
| 1213 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1214 | pMBMsg = vos_mem_malloc(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState)); |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 1215 | if (NULL == pMBMsg) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1216 | { |
| 1217 | p += log_sprintf( pMac,p, "pMBMsg is NULL\n"); |
| 1218 | return p; |
| 1219 | } |
| 1220 | pMBMsg->type = eWNI_PMC_SMPS_STATE_IND; |
| 1221 | pMBMsg->msgLen = (tANI_U16)(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState)); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1222 | vos_mem_copy(pMBMsg->data, &state, sizeof(tSirMacHTMIMOPowerSaveState)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1223 | |
| 1224 | msg.type = eWNI_PMC_SMPS_STATE_IND; |
| 1225 | msg.bodyptr = pMBMsg; |
| 1226 | msg.bodyval = 0; |
| 1227 | |
| 1228 | if (limPostMsgApi(pMac, &msg) != TX_SUCCESS) |
| 1229 | { |
| 1230 | p += log_sprintf( pMac,p, "Updating the SMPower Request has failed \n"); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1231 | vos_mem_free(pMBMsg); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1232 | } |
| 1233 | else |
| 1234 | { |
| 1235 | p += log_sprintf( pMac,p, "Updating the SMPower Request is Done \n"); |
| 1236 | } |
| 1237 | |
| 1238 | return p; |
| 1239 | } |
| 1240 | |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | static char * |
| 1245 | dump_lim_addba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1246 | { |
| 1247 | tSirRetStatus status; |
| 1248 | tpDphHashNode pSta; |
| 1249 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1250 | |
| 1251 | |
| 1252 | (void) arg4; |
| 1253 | |
| 1254 | // Get DPH Sta entry for this ASSOC ID |
| 1255 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable); |
| 1256 | if( NULL == pSta ) |
| 1257 | { |
| 1258 | p += log_sprintf( pMac, p, |
| 1259 | "\n%s: Could not find entry in DPH table for assocId = %d\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1260 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1261 | arg1 ); |
| 1262 | } |
| 1263 | else |
| 1264 | { |
| 1265 | status = limPostMlmAddBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U16) arg3,psessionEntry); |
| 1266 | p += log_sprintf( pMac, p, |
| 1267 | "\n%s: Attempted to send an ADDBA Req to STA Index %d, for TID %d. Send Status = %s\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1268 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1269 | pSta->staIndex, |
| 1270 | arg2, |
| 1271 | limResultCodeStr( status )); |
| 1272 | } |
| 1273 | |
| 1274 | return p; |
| 1275 | } |
| 1276 | |
| 1277 | static char * |
| 1278 | dump_lim_delba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1279 | { |
| 1280 | tSirRetStatus status; |
| 1281 | tpDphHashNode pSta; |
| 1282 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1283 | |
| 1284 | // Get DPH Sta entry for this ASSOC ID |
| 1285 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable ); |
| 1286 | if( NULL == pSta ) |
| 1287 | { |
| 1288 | p += log_sprintf( pMac, p, |
| 1289 | "\n%s: Could not find entry in DPH table for assocId = %d\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1290 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1291 | arg1 ); |
| 1292 | } |
| 1293 | else |
| 1294 | { |
| 1295 | status = limPostMlmDelBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U8) arg3, (tANI_U16) arg4 ,psessionEntry); |
| 1296 | p += log_sprintf( pMac, p, |
| 1297 | "\n%s: Attempted to send a DELBA Ind to STA Index %d, " |
| 1298 | "as the BA \"%s\" for TID %d, with Reason code %d. " |
| 1299 | "Send Status = %s\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1300 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1301 | pSta->staIndex, |
| 1302 | (arg2 == 1)? "Initiator": "Recipient", |
| 1303 | arg3, // TID |
| 1304 | arg4, // Reason Code |
| 1305 | limResultCodeStr( status )); |
| 1306 | } |
| 1307 | |
| 1308 | return p; |
| 1309 | } |
| 1310 | |
| 1311 | static char * |
| 1312 | dump_lim_ba_timeout( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1313 | { |
| 1314 | |
| 1315 | /* FIXME: NO HAL IN UMAC for PRIMA */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1316 | |
| 1317 | p += log_sprintf( pMac, p, |
| 1318 | "\n%s: Attempted to trigger a BA Timeout Ind to STA Index %d, for TID %d, Direction %d\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1319 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1320 | arg1, // STA index |
| 1321 | arg2, // TID |
| 1322 | arg3 ); // BA Direction |
| 1323 | |
| 1324 | return p; |
| 1325 | } |
| 1326 | |
| 1327 | static char * |
| 1328 | dump_lim_list_active_ba( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1329 | { |
| 1330 | tANI_U32 i; |
| 1331 | tpDphHashNode pSta; |
| 1332 | |
| 1333 | //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1334 | |
| 1335 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH |
| 1336 | |
| 1337 | (void) arg2; (void) arg3; (void) arg4; |
| 1338 | |
| 1339 | // Get DPH Sta entry for this ASSOC ID |
| 1340 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable); |
| 1341 | if( NULL == pSta ) |
| 1342 | { |
| 1343 | p += log_sprintf( pMac, p, |
| 1344 | "\n%s: Could not find entry in DPH table for assocId = %d\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1345 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1346 | arg1 ); |
| 1347 | } |
| 1348 | else |
| 1349 | { |
| 1350 | p += log_sprintf( pMac, p, |
| 1351 | "\nList of Active BA sessions for STA Index %d with Assoc ID %d\n", |
| 1352 | pSta->staIndex, |
| 1353 | arg1 ); |
| 1354 | |
| 1355 | p += log_sprintf( pMac, p, "TID\tRxBA\tTxBA\tRxBufferSize\tTxBufferSize\tRxBATimeout\tTxBATimeout\n"); |
| 1356 | for( i = 0; i < STACFG_MAX_TC; i ++ ) |
| 1357 | p += log_sprintf( pMac, p, |
| 1358 | "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", |
| 1359 | i, // TID |
| 1360 | pSta->tcCfg[i].fUseBARx, |
| 1361 | pSta->tcCfg[i].fUseBATx, |
| 1362 | pSta->tcCfg[i].rxBufSize, |
| 1363 | pSta->tcCfg[i].txBufSize, |
| 1364 | pSta->tcCfg[i].tuRxBAWaitTimeout, |
| 1365 | pSta->tcCfg[i].tuTxBAWaitTimeout ); |
| 1366 | } |
| 1367 | |
| 1368 | return p; |
| 1369 | } |
| 1370 | |
| 1371 | |
| 1372 | static char * |
| 1373 | dump_lim_AddBA_DeclineStat( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1374 | { |
| 1375 | |
| 1376 | int Tid, Enable=(arg1 & 0x1); |
| 1377 | tANI_U8 val; |
| 1378 | |
| 1379 | if (arg1 > 1) { |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1380 | log_sprintf( pMac,p, "%s:Invalid Value is entered for Enable/Disable \n", __func__ ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1381 | arg1 &= 1; |
| 1382 | } |
| 1383 | |
| 1384 | val = pMac->lim.gAddBA_Declined; |
| 1385 | |
| 1386 | if (arg2 > 7) { |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1387 | log_sprintf( pMac,p, "%s:Invalid Value is entered for Tid \n", __func__ ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1388 | Tid = arg2 & 0x7; |
| 1389 | } else |
| 1390 | Tid = arg2; |
| 1391 | |
| 1392 | |
| 1393 | if ( Enable) |
| 1394 | val |= Enable << Tid; |
| 1395 | else |
| 1396 | val &= ~(0x1 << Tid); |
| 1397 | |
| 1398 | if (cfgSetInt(pMac, (tANI_U16)WNI_CFG_ADDBA_REQ_DECLINE, (tANI_U32) val) != eSIR_SUCCESS) |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1399 | log_sprintf( pMac,p, "%s:Config Set for ADDBA REQ Decline has failed \n", __func__ ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1400 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1401 | log_sprintf( pMac,p, "%s:Decline value %d is being set for TID %d ,\n \tAddBA_Decline Cfg value is %d \n", __func__ , arg1, Tid, (int) val); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1402 | |
| 1403 | return p; |
| 1404 | } |
| 1405 | static char * |
| 1406 | dump_lim_set_dot11_mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1407 | { |
| 1408 | |
| 1409 | tpPESession psessionEntry =&pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1410 | dump_cfg_set(pMac, WNI_CFG_DOT11_MODE, arg1, arg2, arg3, p); |
| 1411 | if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) || |
| 1412 | (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE)) |
| 1413 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 1414 | p += log_sprintf( pMac,p, "The Dot11 Mode is set to %s", limDot11ModeStr(pMac, (tANI_U8)psessionEntry->dot11mode)); |
| 1415 | return p; |
| 1416 | } |
| 1417 | |
| 1418 | |
| 1419 | static char* dump_lim_update_cb_Mode(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1420 | { |
| 1421 | tANI_U32 localPwrConstraint; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1422 | tpPESession psessionEntry = peFindSessionBySessionId(pMac, arg1); |
| 1423 | |
| 1424 | if (psessionEntry == NULL) |
| 1425 | { |
| 1426 | p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", arg1); |
| 1427 | return p; |
| 1428 | } |
| 1429 | |
| 1430 | if ( !psessionEntry->htCapability ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1431 | { |
| 1432 | p += log_sprintf( pMac,p, "Error: Dot11 mode is non-HT, can not change the CB mode.\n"); |
| 1433 | return p; |
| 1434 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1435 | |
| 1436 | psessionEntry->htSupportedChannelWidthSet = arg2?1:0; |
| 1437 | psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet; |
| 1438 | psessionEntry->htSecondaryChannelOffset = arg2; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1439 | |
| 1440 | if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1441 | arg2 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1442 | p += log_sprintf(pMac,p, "cfgSetInt failed for WNI_CFG_CHANNEL_BONDING_MODE\n"); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1443 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1444 | wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1445 | |
| 1446 | limSendSwitchChnlParams(pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1447 | (tPowerdBm) localPwrConstraint, psessionEntry->peSessionId); |
| 1448 | if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) || |
| 1449 | (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE)) |
| 1450 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 1451 | return p; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1452 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1453 | } |
| 1454 | |
| 1455 | static char* dump_lim_abort_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1456 | { |
| 1457 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1458 | //csrScanAbortMacScan(pMac); |
| 1459 | return p; |
| 1460 | |
| 1461 | } |
| 1462 | |
| 1463 | static char* dump_lim_start_stop_bg_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1464 | { |
| 1465 | (void) arg2; (void) arg3; (void) arg4; |
| 1466 | |
| 1467 | if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer)) |
| 1468 | { |
| 1469 | limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER); |
| 1470 | } |
| 1471 | |
| 1472 | if(arg1 == 1) |
| 1473 | { |
| 1474 | if (tx_timer_activate( |
| 1475 | &pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS) |
| 1476 | { |
| 1477 | pMac->lim.gLimBackgroundScanTerminate = TRUE; |
| 1478 | } |
| 1479 | else |
| 1480 | { |
| 1481 | pMac->lim.gLimBackgroundScanTerminate = FALSE; |
| 1482 | pMac->lim.gLimBackgroundScanDisable = false; |
| 1483 | pMac->lim.gLimForceBackgroundScanDisable = false; |
| 1484 | } |
| 1485 | } |
| 1486 | else |
| 1487 | { |
| 1488 | pMac->lim.gLimBackgroundScanTerminate = TRUE; |
| 1489 | pMac->lim.gLimBackgroundScanChannelId = 0; |
| 1490 | pMac->lim.gLimBackgroundScanDisable = true; |
| 1491 | pMac->lim.gLimForceBackgroundScanDisable = true; |
| 1492 | } |
| 1493 | return p; |
| 1494 | |
| 1495 | } |
| 1496 | |
| 1497 | static char* |
| 1498 | dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1499 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1500 | tpAniGetPEStatsReq pReq; |
| 1501 | tANI_U32 statsMask; |
| 1502 | |
| 1503 | (void) arg2; (void) arg3; (void) arg4; |
| 1504 | |
| 1505 | |
| 1506 | switch(arg1) |
| 1507 | { |
| 1508 | case 1: |
| 1509 | statsMask = PE_SUMMARY_STATS_INFO; |
| 1510 | break; |
| 1511 | case 2: |
| 1512 | statsMask = PE_GLOBAL_CLASS_A_STATS_INFO; |
| 1513 | break; |
| 1514 | case 3: |
| 1515 | statsMask = PE_GLOBAL_CLASS_B_STATS_INFO; |
| 1516 | break; |
| 1517 | case 4: |
| 1518 | statsMask = PE_GLOBAL_CLASS_C_STATS_INFO; |
| 1519 | break; |
| 1520 | case 5: |
| 1521 | statsMask = PE_PER_STA_STATS_INFO; |
| 1522 | break; |
Sushant Kaushik | 3320057 | 2015-08-05 16:46:20 +0530 | [diff] [blame] | 1523 | case 6: |
| 1524 | statsMask = PE_PER_TX_PKT_STATS_INFO; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1525 | default: |
| 1526 | return p; |
| 1527 | } |
| 1528 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1529 | pReq = vos_mem_malloc(sizeof(tAniGetPEStatsReq)); |
| 1530 | if (NULL == pReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1531 | { |
| 1532 | p += log_sprintf( pMac,p, "Error: Unable to allocate memory.\n"); |
| 1533 | return p; |
| 1534 | } |
| 1535 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1536 | vos_mem_set(pReq, sizeof(*pReq), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1537 | |
| 1538 | pReq->msgType = eWNI_SME_GET_STATISTICS_REQ; |
| 1539 | pReq->statsMask = statsMask; |
| 1540 | pReq->staId = (tANI_U16)arg2; |
| 1541 | |
| 1542 | pMac->lim.gLimRspReqd = eANI_BOOLEAN_TRUE; |
| 1543 | limPostSmeMessage(pMac, eWNI_SME_GET_STATISTICS_REQ, (tANI_U32 *) pReq); |
| 1544 | |
| 1545 | return p; |
| 1546 | |
| 1547 | } |
| 1548 | |
| 1549 | extern char* setLOGLevel( tpAniSirGlobal pMac, char *p, tANI_U32 module, tANI_U32 level ); |
| 1550 | static char * |
| 1551 | dump_lim_set_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1552 | { |
| 1553 | p = setLOGLevel(pMac, p, arg1, arg2); |
| 1554 | return p; |
| 1555 | } |
| 1556 | |
| 1557 | static char * |
| 1558 | dump_lim_update_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1559 | { |
| 1560 | vos_trace_setLevel( arg1, arg2 ); |
| 1561 | return p; |
| 1562 | } |
| 1563 | |
| 1564 | static char * |
| 1565 | dump_lim_scan_req_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1566 | { |
| 1567 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1568 | p = sendSmeScanReq(pMac, p); |
| 1569 | return p; |
| 1570 | } |
| 1571 | |
| 1572 | static char * |
| 1573 | dump_lim_send_start_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1574 | { |
| 1575 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1576 | p = sendSmeStartBssReq(pMac, p,arg1); |
| 1577 | return p; |
| 1578 | } |
| 1579 | |
| 1580 | static char * |
| 1581 | dump_lim_send_join_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1582 | { |
| 1583 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1584 | p = sendSmeJoinReq(pMac, p); |
| 1585 | return p; |
| 1586 | } |
| 1587 | |
| 1588 | static char * |
| 1589 | dump_lim_send_disassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1590 | { |
| 1591 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1592 | |
| 1593 | p = sendSmeDisAssocReq(pMac, p, arg1 ,arg2); |
| 1594 | return p; |
| 1595 | } |
| 1596 | |
| 1597 | static char * |
| 1598 | dump_lim_stop_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1599 | { |
| 1600 | (void) arg2; (void) arg3; (void) arg4; |
| 1601 | p = sendSmeStopBssReq(pMac, p, arg1); |
| 1602 | return p; |
| 1603 | } |
| 1604 | |
| 1605 | |
| 1606 | static char * |
| 1607 | dump_lim_session_print( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1608 | { |
| 1609 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1610 | p = printSessionInfo(pMac, p); |
| 1611 | return p; |
| 1612 | } |
| 1613 | |
| 1614 | static char * |
| 1615 | dump_lim_sme_reassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1616 | { |
| 1617 | tANI_U32 sessionId = arg1; |
| 1618 | tCsrRoamModifyProfileFields modifyProfileFields; |
| 1619 | tANI_U32 roamId; |
| 1620 | |
| 1621 | (void) arg2; (void) arg3; (void) arg4; |
| 1622 | |
| 1623 | if( CSR_IS_SESSION_VALID( pMac, sessionId ) ) |
| 1624 | { |
| 1625 | if(HAL_STATUS_SUCCESS(sme_AcquireGlobalLock( &pMac->sme ))) |
| 1626 | { |
| 1627 | csrGetModifyProfileFields(pMac, sessionId, &modifyProfileFields); |
| 1628 | csrReassoc( pMac, sessionId, &modifyProfileFields, &roamId, 0); |
| 1629 | sme_ReleaseGlobalLock( &pMac->sme ); |
| 1630 | } |
| 1631 | } |
| 1632 | else |
| 1633 | { |
| 1634 | p += log_sprintf( pMac,p, "Invalid session = %d\n", sessionId); |
| 1635 | } |
| 1636 | |
| 1637 | return p; |
| 1638 | } |
| 1639 | |
| 1640 | static char * |
| 1641 | dump_lim_dot11h_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1642 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1643 | return p; |
| 1644 | } |
| 1645 | |
| 1646 | static char * |
| 1647 | dump_lim_enable_measurement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1648 | { |
| 1649 | (void) arg2; (void) arg3; (void) arg4; |
| 1650 | |
| 1651 | if (arg1) |
| 1652 | { |
| 1653 | pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_TRUE; |
| 1654 | p += log_sprintf(pMac, p, "Measurement enabled\n"); |
| 1655 | } |
| 1656 | else |
| 1657 | { |
| 1658 | pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_FALSE; |
| 1659 | p += log_sprintf(pMac, p, "Measurement disabled\n"); |
| 1660 | } |
| 1661 | |
| 1662 | return p; |
| 1663 | } |
| 1664 | |
| 1665 | static char * |
| 1666 | dump_lim_enable_quietIE( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1667 | { |
| 1668 | (void) arg2; (void) arg3; (void) arg4; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1669 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1670 | if (arg1) |
| 1671 | { |
| 1672 | pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_TRUE; |
| 1673 | p += log_sprintf(pMac, p, "QuietIE enabled\n"); |
| 1674 | } |
| 1675 | else |
| 1676 | { |
| 1677 | pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE; |
| 1678 | p += log_sprintf(pMac, p, "QuietIE disabled\n"); |
| 1679 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1680 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1681 | |
| 1682 | return p; |
| 1683 | } |
| 1684 | |
| 1685 | static char * |
| 1686 | dump_lim_disable_enable_scan( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1687 | { |
| 1688 | (void) arg2; (void) arg3; (void) arg4; |
| 1689 | |
| 1690 | if (arg1) |
| 1691 | { |
| 1692 | pMac->lim.fScanDisabled = 1; |
| 1693 | p += log_sprintf(pMac, p, "Scan disabled\n"); |
| 1694 | } |
| 1695 | else |
| 1696 | { |
| 1697 | pMac->lim.fScanDisabled = 0; |
| 1698 | p += log_sprintf(pMac, p, "scan enabled\n"); |
| 1699 | } |
| 1700 | |
| 1701 | return p; |
| 1702 | } |
| 1703 | |
| 1704 | static char *finishScan(tpAniSirGlobal pMac, char *p) |
| 1705 | { |
| 1706 | tSirMsgQ msg; |
| 1707 | |
| 1708 | p += log_sprintf( pMac,p, "logDump finishScan \n"); |
| 1709 | |
| 1710 | msg.type = SIR_LIM_MIN_CHANNEL_TIMEOUT; |
| 1711 | msg.bodyval = 0; |
| 1712 | msg.bodyptr = NULL; |
| 1713 | |
| 1714 | limPostMsgApi(pMac, &msg); |
| 1715 | return p; |
| 1716 | } |
| 1717 | |
| 1718 | |
| 1719 | static char * |
| 1720 | dump_lim_info( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1721 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1722 | (void) arg2; (void) arg3; (void) arg4; |
| 1723 | p = dumpLim( pMac, p, arg1); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1724 | return p; |
| 1725 | } |
| 1726 | |
| 1727 | static char * |
| 1728 | dump_lim_finishscan_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1729 | { |
| 1730 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1731 | p = finishScan(pMac, p); |
| 1732 | return p; |
| 1733 | } |
| 1734 | |
| 1735 | static char * |
| 1736 | dump_lim_prb_rsp_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1737 | { |
| 1738 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1739 | p = testLimSendProbeRsp( pMac, p ); |
| 1740 | return p; |
| 1741 | } |
| 1742 | |
| 1743 | static char * |
| 1744 | dump_sch_beacon_trigger( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1745 | { |
| 1746 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1747 | p = triggerBeaconGen(pMac, p); |
| 1748 | return p; |
| 1749 | } |
| 1750 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1751 | static char* dump_lim_set_scan_in_powersave( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1752 | { |
| 1753 | p += log_sprintf( pMac,p, "logDump set scan in powersave to %d \n", arg1); |
| 1754 | dump_cfg_set(pMac, WNI_CFG_SCAN_IN_POWERSAVE, arg1, arg2, arg3, p); |
| 1755 | return p; |
| 1756 | } |
| 1757 | |
| 1758 | #if defined WLAN_FEATURE_VOWIFI |
| 1759 | static char * |
| 1760 | dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1761 | { |
| 1762 | tpPESession psessionEntry; |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1763 | tSirMacRadioMeasureReport *pRRMReport = |
| 1764 | vos_mem_malloc(4*sizeof(tSirMacRadioMeasureReport)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1765 | tANI_U8 num = (tANI_U8)(arg4 > 4 ? 4 : arg4); |
| 1766 | tANI_U8 i; |
| 1767 | |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1768 | if (!pRRMReport) |
| 1769 | { |
| 1770 | p += log_sprintf(pMac, p, |
| 1771 | "Unable to allocate memory to process command\n"); |
| 1772 | goto done; |
| 1773 | } |
| 1774 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1775 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 1776 | { |
| 1777 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1778 | goto done; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1779 | } |
| 1780 | switch (arg3) |
| 1781 | { |
| 1782 | case 0: |
| 1783 | /* send two reports with incapable bit set */ |
| 1784 | pRRMReport[0].type = 6; |
| 1785 | pRRMReport[1].type = 7; |
| 1786 | limSendRadioMeasureReportActionFrame( pMac, 1, 2, &pRRMReport[0], psessionEntry->bssId, psessionEntry ); |
| 1787 | break; |
| 1788 | case 1: |
| 1789 | for ( i = 0 ; i < num ; i++ ) |
| 1790 | { |
| 1791 | pRRMReport[i].type = 5; |
| 1792 | if ( i == 3 ) |
| 1793 | pRRMReport[i].refused = 1; |
| 1794 | else |
| 1795 | pRRMReport[i].refused = 0; |
| 1796 | |
| 1797 | pRRMReport[i].report.beaconReport.regClass = 32; |
| 1798 | pRRMReport[i].report.beaconReport.channel = i; |
| 1799 | pRRMReport[i].report.beaconReport.measDuration = 23; |
| 1800 | pRRMReport[i].report.beaconReport.phyType = i << 4; //some value. |
| 1801 | pRRMReport[i].report.beaconReport.bcnProbeRsp = 1; |
| 1802 | pRRMReport[i].report.beaconReport.rsni = 10; |
| 1803 | pRRMReport[i].report.beaconReport.rcpi = 40; |
| 1804 | |
| 1805 | pRRMReport[i].report.beaconReport.bssid[0] = 0x00; |
| 1806 | pRRMReport[i].report.beaconReport.bssid[1] = 0xAA; |
| 1807 | pRRMReport[i].report.beaconReport.bssid[2] = 0xBB; |
| 1808 | pRRMReport[i].report.beaconReport.bssid[3] = 0xCC; |
| 1809 | pRRMReport[i].report.beaconReport.bssid[4] = 0x00; |
| 1810 | pRRMReport[i].report.beaconReport.bssid[5] = 0x01 << i; |
| 1811 | |
| 1812 | |
| 1813 | pRRMReport[i].report.beaconReport.antennaId = 10; |
| 1814 | pRRMReport[i].report.beaconReport.parentTSF = 0x1234; |
| 1815 | |
| 1816 | pRRMReport[i].report.beaconReport.numIes = i * 10; |
| 1817 | { |
| 1818 | tANI_U8 j; |
| 1819 | for( j = 0; j < pRRMReport[i].report.beaconReport.numIes ; j++ ) |
| 1820 | { |
| 1821 | pRRMReport[i].report.beaconReport.Ies[j] = j + i; //Junk values. |
| 1822 | } |
| 1823 | } |
| 1824 | |
| 1825 | } |
| 1826 | limSendRadioMeasureReportActionFrame( pMac, 1, num, &pRRMReport[0], psessionEntry->bssId, psessionEntry ); |
| 1827 | break; |
| 1828 | case 2: |
| 1829 | //send Neighbor request. |
| 1830 | { |
| 1831 | tSirMacNeighborReportReq neighbor; |
| 1832 | neighbor.dialogToken = 2; |
| 1833 | neighbor.ssid_present = (tANI_U8) arg4; |
| 1834 | neighbor.ssid.length = 5; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1835 | vos_mem_copy(neighbor.ssid.ssId, "abcde", 5); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1836 | |
| 1837 | limSendNeighborReportRequestFrame( pMac, &neighbor, psessionEntry->bssId, psessionEntry ); |
| 1838 | |
| 1839 | } |
| 1840 | |
| 1841 | break; |
| 1842 | case 3: |
| 1843 | //send Link measure report. |
| 1844 | { |
| 1845 | tSirMacLinkReport link; |
| 1846 | link.dialogToken = 4; |
| 1847 | link.txPower = 34; |
| 1848 | link.rxAntenna = 2; |
| 1849 | link.txAntenna = 1; |
| 1850 | link.rcpi = 9; |
| 1851 | link.rsni = 3; |
| 1852 | limSendLinkReportActionFrame( pMac, &link, psessionEntry->bssId, psessionEntry ); |
| 1853 | } |
| 1854 | break; |
| 1855 | default: |
| 1856 | break; |
| 1857 | } |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1858 | |
| 1859 | done: |
| 1860 | vos_mem_free(pRRMReport); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1861 | return p; |
| 1862 | } |
| 1863 | |
| 1864 | static char * |
| 1865 | dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1866 | { |
| 1867 | tpPESession psessionEntry; |
| 1868 | tANI_U32 status; |
| 1869 | |
| 1870 | tANI_U8 size[] = { |
| 1871 | 0x2C, |
| 1872 | 0x2F, |
| 1873 | 0x25, |
| 1874 | 0x2C, |
| 1875 | 0x1C, |
| 1876 | 0x05 |
| 1877 | }; |
| 1878 | |
| 1879 | tANI_U8 pBody[][100] = { |
| 1880 | { |
| 1881 | /*Beacon Request 0*/ |
| 1882 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1883 | //Measurement request IE |
| 1884 | 0x26, 0x25, 0x01, 0x00, |
| 1885 | //Beacon request type |
| 1886 | 0x05, |
| 1887 | //Beacon request starts here |
| 1888 | 0x0C, 0x01, 0x30, 0x00, 0x14, 0x00, 0x01, |
| 1889 | //BSSID |
| 1890 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1891 | //SSID |
| 1892 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1893 | //Reporting Condition |
| 1894 | 0x01, 0x02, 0x00, 0x00, |
| 1895 | //Reporting Detail |
| 1896 | 0x02, 0x01, 0x1, |
| 1897 | //Request IE |
| 1898 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD |
| 1899 | }, |
| 1900 | { |
| 1901 | /*Beacon Request 1*/ |
| 1902 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1903 | //Measurement request IE |
| 1904 | 0x26, 0x28, 0x01, 0x00, |
| 1905 | //Beacon request type |
| 1906 | 0x05, |
| 1907 | //Beacon request starts here |
| 1908 | 0x0C, 0xFF, 0x30, 0x00, 0x14, 0x00, 0x01, |
| 1909 | //BSSID |
| 1910 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1911 | //SSID |
| 1912 | /* 0x00, 0x08, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40, 0x41, 0x42, */ |
| 1913 | //Reporting Condition |
| 1914 | 0x01, 0x02, 0x00, 0x00, |
| 1915 | //Reporting Detail |
| 1916 | 0x02, 0x01, 0x1, |
| 1917 | //Request IE |
| 1918 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD, |
| 1919 | //AP channel report |
| 1920 | 0x33, 0x03, 0x0C, 0x01, 0x06, |
| 1921 | 0x33, 0x03, 0x0C, 0x24, 0x30, |
| 1922 | }, |
| 1923 | { |
| 1924 | /*Beacon Request 2*/ |
| 1925 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1926 | //Measurement request IE |
| 1927 | 0x26, 0x1E, 0x01, 0x00, |
| 1928 | //Beacon request type |
| 1929 | 0x05, |
| 1930 | //Beacon request starts here |
| 1931 | 0x0C, 0x00, 0x30, 0x00, 0x14, 0x00, 0x02, |
| 1932 | //BSSID |
| 1933 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1934 | //SSID |
| 1935 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1936 | //0x00, 0x08, 0x41, 0x53, 0x54, 0x2D, 0x57, 0x41, 0x50, 0x49, |
| 1937 | //Reporting Condition |
| 1938 | 0x01, 0x02, 0x00, 0x00, |
| 1939 | //Reporting Detail |
| 1940 | 0x02, 0x01, 0x0 |
| 1941 | //Request IE |
| 1942 | }, |
| 1943 | { |
| 1944 | /*Beacon Request 3*/ |
| 1945 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1946 | //Measurement request IE |
| 1947 | 0x26, 0x25, 0x01, 0x00, |
| 1948 | //Beacon request type |
| 1949 | 0x05, |
| 1950 | //Beacon request starts here |
| 1951 | 0x0C, 0x01, 0x30, 0x00, 0x69, 0x00, 0x00, |
| 1952 | //BSSID |
| 1953 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1954 | //SSID |
| 1955 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1956 | //Reporting Condition |
| 1957 | 0x01, 0x02, 0x00, 0x00, |
| 1958 | //Reporting Detail |
| 1959 | 0x02, 0x01, 0x1, |
| 1960 | //Request IE |
| 1961 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD |
| 1962 | }, |
| 1963 | { |
| 1964 | /*Neighbor report*/ |
| 1965 | 0x05, 0x05, 0x01, |
| 1966 | //Measurement request IE |
| 1967 | 0x34, 0x17, |
| 1968 | //BSSID |
| 1969 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1970 | //BSSID INFOo |
| 1971 | 0xED, 0x01, 0x00, 0x00, |
| 1972 | //Reg class, channel, Phy type |
| 1973 | 0x20, 0x01, 0x02, |
| 1974 | //TSF Info |
| 1975 | 0x01, 0x04, 0x02, 0x00, 0x60, 0x00, |
| 1976 | //Condensed country |
| 1977 | 0x02, 0x02, 0x62, 0x63 |
| 1978 | }, |
| 1979 | { |
| 1980 | /* Link measurement request */ |
| 1981 | 0x05, 0x02, 0x00, |
| 1982 | //Txpower used |
| 1983 | 0x00, |
| 1984 | //Max Tx Power |
| 1985 | 0x00 |
| 1986 | } |
| 1987 | }; |
| 1988 | |
| 1989 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 1990 | { |
| 1991 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
| 1992 | return p; |
| 1993 | } |
| 1994 | switch (arg2) |
| 1995 | { |
| 1996 | case 0: |
| 1997 | case 1: |
| 1998 | case 2: |
| 1999 | case 3: |
| 2000 | { |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2001 | tDot11fRadioMeasurementRequest *frm = |
| 2002 | vos_mem_malloc(sizeof(tDot11fRadioMeasurementRequest)); |
| 2003 | if (!frm) |
| 2004 | { |
| 2005 | p += log_sprintf(pMac, p, |
| 2006 | "Unable to allocate memory to process command\n"); |
| 2007 | break; |
| 2008 | } |
| 2009 | if( (status = dot11fUnpackRadioMeasurementRequest( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2010 | p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status); |
| 2011 | else |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2012 | rrmProcessRadioMeasurementRequest( pMac, psessionEntry->bssId, frm, psessionEntry ); |
| 2013 | vos_mem_free(frm); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2014 | } |
| 2015 | break; |
| 2016 | case 4: |
| 2017 | { |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2018 | tDot11fNeighborReportResponse *frm = |
| 2019 | vos_mem_malloc(sizeof(tDot11fNeighborReportResponse)); |
| 2020 | if (!frm) |
| 2021 | { |
| 2022 | p += log_sprintf(pMac, p, |
| 2023 | "Unable to allocate memory to process command\n"); |
| 2024 | break; |
| 2025 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2026 | pBody[arg2][2] = (tANI_U8)arg3; //Dialog Token |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2027 | if( (status = dot11fUnpackNeighborReportResponse( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2028 | p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status); |
| 2029 | else |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2030 | rrmProcessNeighborReportResponse( pMac, frm, psessionEntry ); |
| 2031 | vos_mem_free(frm); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2032 | } |
| 2033 | break; |
| 2034 | case 5: |
| 2035 | { |
| 2036 | // FIXME. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2037 | } |
| 2038 | break; |
| 2039 | case 6: |
| 2040 | { |
| 2041 | tPowerdBm localConstraint = (tPowerdBm) arg3; |
| 2042 | tPowerdBm maxTxPower = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); |
| 2043 | maxTxPower = VOS_MIN( maxTxPower, maxTxPower-localConstraint ); |
| 2044 | if( maxTxPower != psessionEntry->maxTxPower ) |
| 2045 | { |
| 2046 | rrmSendSetMaxTxPowerReq( pMac, maxTxPower, psessionEntry ); |
| 2047 | psessionEntry->maxTxPower = maxTxPower; |
| 2048 | } |
| 2049 | } |
| 2050 | break; |
| 2051 | default: |
| 2052 | p += log_sprintf( pMac, p, "Invalid option" ); |
| 2053 | break; |
| 2054 | } |
| 2055 | return p; |
| 2056 | } |
| 2057 | #endif |
| 2058 | |
| 2059 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 2060 | #ifdef RSSI_HACK |
| 2061 | /* This dump command is needed to set the RSSI values in TL while testing handoff. Handoff code was tested |
| 2062 | * using this dump command. Whatever the value gives as the first parameter will be considered as the average |
| 2063 | * RSSI by TL and invokes corresponding callback registered by the clients */ |
| 2064 | extern int dumpCmdRSSI; |
| 2065 | static char * |
| 2066 | dump_lim_set_tl_data_pkt_rssi( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2067 | { |
| 2068 | dumpCmdRSSI = arg1; |
| 2069 | limLog(pMac, LOGE, FL("Setting TL data packet RSSI to %d"), dumpCmdRSSI); |
| 2070 | return p; |
| 2071 | } |
| 2072 | #endif |
| 2073 | #endif |
| 2074 | |
| 2075 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 2076 | /* This command is used to trigger FT Preauthentication with the AP with BSSID below */ |
| 2077 | static char * |
| 2078 | dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2079 | { |
| 2080 | static tANI_U8 macAddr[6] = {0x00, 0xde, 0xad, 0xaf, 0xaf, 0x04}; |
| 2081 | tpPESession psessionEntry; |
| 2082 | tSirMsgQ msg; |
| 2083 | tpSirFTPreAuthReq pftPreAuthReq; |
| 2084 | tANI_U16 auth_req_len = 0; |
| 2085 | tCsrRoamConnectedProfile Profile; |
| 2086 | |
| 2087 | csrRoamCopyConnectProfile(pMac, arg2, &Profile); |
| 2088 | |
| 2089 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 2090 | { |
| 2091 | p += log_sprintf( pMac, |
| 2092 | p,"Session does not exist usage: 363 <0> sessionid channel \n"); |
| 2093 | return p; |
| 2094 | } |
| 2095 | |
| 2096 | switch (arg1) |
| 2097 | { |
| 2098 | case 0: |
| 2099 | // Send Pre-auth event |
| 2100 | { |
| 2101 | /*----------------*/ |
| 2102 | p += log_sprintf( pMac,p, "Preparing Pre Auth Req message\n"); |
| 2103 | auth_req_len = sizeof(tSirFTPreAuthReq); |
| 2104 | |
| 2105 | pftPreAuthReq = vos_mem_malloc(auth_req_len); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2106 | if (NULL == pftPreAuthReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2107 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2108 | p += log_sprintf( pMac,p,"Pre auth dump: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2109 | return p; |
| 2110 | } |
| 2111 | pftPreAuthReq->pbssDescription = vos_mem_malloc(sizeof(Profile.pBssDesc->length)+ |
| 2112 | Profile.pBssDesc->length); |
| 2113 | |
| 2114 | pftPreAuthReq->messageType = eWNI_SME_FT_PRE_AUTH_REQ; |
| 2115 | pftPreAuthReq->length = auth_req_len + sizeof(Profile.pBssDesc->length) + |
| 2116 | Profile.pBssDesc->length; |
| 2117 | pftPreAuthReq->preAuthchannelNum = 6; |
| 2118 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2119 | vos_mem_copy((void *) &pftPreAuthReq->currbssId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2120 | (void *)psessionEntry->bssId, 6); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2121 | vos_mem_copy((void *) &pftPreAuthReq->preAuthbssId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2122 | (void *)macAddr, 6); |
| 2123 | pftPreAuthReq->ft_ies_length = (tANI_U16)pMac->ft.ftSmeContext.auth_ft_ies_length; |
| 2124 | |
| 2125 | // Also setup the mac address in sme context. |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2126 | vos_mem_copy(pMac->ft.ftSmeContext.preAuthbssId, macAddr, 6); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2127 | |
| 2128 | vos_mem_copy(pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies, |
| 2129 | pMac->ft.ftSmeContext.auth_ft_ies_length); |
| 2130 | |
| 2131 | vos_mem_copy(Profile.pBssDesc->bssId, macAddr, 6); |
| 2132 | |
| 2133 | p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n"); |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2134 | p += log_sprintf( pMac, p, "%s: length = %d\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2135 | (int)pMac->ft.ftSmeContext.auth_ft_ies_length); |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2136 | p += log_sprintf( pMac, p, "%s: length = %02x\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2137 | (int)pMac->ft.ftSmeContext.auth_ft_ies[0]); |
| 2138 | p += log_sprintf( pMac, p, "%s: Auth Req %02x %02x %02x\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2139 | __func__, pftPreAuthReq->ft_ies[0], |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2140 | pftPreAuthReq->ft_ies[1], pftPreAuthReq->ft_ies[2]); |
| 2141 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2142 | p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2143 | psessionEntry->bssId[0], |
| 2144 | psessionEntry->bssId[1], psessionEntry->bssId[2]); |
Jeff Johnson | 0fe596e | 2017-09-19 08:36:48 -0700 | [diff] [blame^] | 2145 | p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %pK\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2146 | pftPreAuthReq->currbssId[0], |
| 2147 | pftPreAuthReq->currbssId[1], |
| 2148 | pftPreAuthReq->currbssId[2], pftPreAuthReq); |
| 2149 | |
| 2150 | Profile.pBssDesc->channelId = (tANI_U8)arg3; |
| 2151 | vos_mem_copy((void *)pftPreAuthReq->pbssDescription, (void *)Profile.pBssDesc, |
| 2152 | Profile.pBssDesc->length); |
| 2153 | |
| 2154 | msg.type = eWNI_SME_FT_PRE_AUTH_REQ; |
| 2155 | msg.bodyptr = pftPreAuthReq; |
| 2156 | msg.bodyval = 0; |
| 2157 | |
| 2158 | p += log_sprintf( pMac, p, "limPostMsgApi(eWNI_SME_FT_PRE_AUTH_REQ) \n"); |
| 2159 | limPostMsgApi(pMac, &msg); |
| 2160 | } |
| 2161 | break; |
| 2162 | |
| 2163 | default: |
| 2164 | break; |
| 2165 | } |
| 2166 | return p; |
| 2167 | } |
| 2168 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2169 | static char * |
| 2170 | dump_lim_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2171 | { |
| 2172 | tpPESession psessionEntry; |
| 2173 | tANI_U8 nMode = arg2; |
| 2174 | tANI_U8 nNewChannel = arg3; |
| 2175 | tANI_U8 nCount = arg4; |
| 2176 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2177 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2178 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2179 | { |
| 2180 | p += log_sprintf( pMac, |
| 2181 | p,"Session does not exist usage: 363 <0> sessionid channel \n"); |
Mahesh Kumar Kalikot Veetil | 2aad8d8 | 2013-02-07 12:31:28 -0800 | [diff] [blame] | 2182 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!"); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2183 | return p; |
| 2184 | } |
| 2185 | |
| 2186 | limSendChannelSwitchMgmtFrame( pMac, peer, nMode, nNewChannel, nCount, psessionEntry ); |
| 2187 | |
| 2188 | psessionEntry->gLimChannelSwitch.switchCount = nCount; |
| 2189 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING; |
| 2190 | psessionEntry->gLimChannelSwitch.switchMode = nMode; |
| 2191 | psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel; |
| 2192 | |
| 2193 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2194 | limSendBeaconInd(pMac, psessionEntry); |
| 2195 | |
| 2196 | return p; |
| 2197 | } |
| 2198 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2199 | #ifdef WLAN_FEATURE_11AC |
| 2200 | static char * |
| 2201 | dump_lim_vht_opmode_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2202 | { |
| 2203 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
| 2204 | tANI_U8 nMode = arg2; |
| 2205 | tpPESession psessionEntry; |
| 2206 | |
| 2207 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2208 | { |
| 2209 | p += log_sprintf( pMac, |
| 2210 | p,"Session does not exist usage: 366 <0> sessionid channel \n"); |
| 2211 | return p; |
| 2212 | } |
| 2213 | |
| 2214 | limSendVHTOpmodeNotificationFrame(pMac, peer, nMode,psessionEntry); |
| 2215 | |
| 2216 | psessionEntry->gLimOperatingMode.present = 1; |
| 2217 | psessionEntry->gLimOperatingMode.chanWidth = nMode; |
| 2218 | psessionEntry->gLimOperatingMode.rxNSS = 0; |
| 2219 | psessionEntry->gLimOperatingMode.rxNSSType = 0; |
| 2220 | |
| 2221 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2222 | limSendBeaconInd(pMac, psessionEntry); |
| 2223 | |
| 2224 | return p; |
| 2225 | } |
Madan Mohan Koyyalamudi | c6226de | 2012-09-18 16:33:31 -0700 | [diff] [blame] | 2226 | |
| 2227 | static char * |
| 2228 | dump_lim_vht_channel_switch_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2229 | { |
| 2230 | tpPESession psessionEntry; |
| 2231 | tANI_U8 nChanWidth = arg2; |
| 2232 | tANI_U8 nNewChannel = arg3; |
| 2233 | tANI_U8 ncbMode = arg4; |
| 2234 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
| 2235 | |
| 2236 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2237 | { |
| 2238 | p += log_sprintf( pMac, |
| 2239 | p,"Session does not exist usage: 367 <0> sessionid channel \n"); |
Mahesh Kumar Kalikot Veetil | 2aad8d8 | 2013-02-07 12:31:28 -0800 | [diff] [blame] | 2240 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!"); |
Madan Mohan Koyyalamudi | c6226de | 2012-09-18 16:33:31 -0700 | [diff] [blame] | 2241 | return p; |
| 2242 | } |
| 2243 | |
| 2244 | limSendVHTChannelSwitchMgmtFrame( pMac, peer, nChanWidth, nNewChannel, (ncbMode+1), psessionEntry ); |
| 2245 | |
| 2246 | psessionEntry->gLimChannelSwitch.switchCount = 0; |
| 2247 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING; |
| 2248 | psessionEntry->gLimChannelSwitch.switchMode = 1; |
| 2249 | psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel; |
| 2250 | psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = nChanWidth; |
| 2251 | psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,(ncbMode+1),nChanWidth); |
| 2252 | psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = 0; |
| 2253 | |
| 2254 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2255 | limSendBeaconInd(pMac, psessionEntry); |
| 2256 | |
| 2257 | return p; |
| 2258 | } |
| 2259 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2260 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2261 | static char * |
| 2262 | dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2263 | { |
| 2264 | tpPESession psessionEntry; |
| 2265 | |
| 2266 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2267 | { |
| 2268 | p += log_sprintf( pMac, |
| 2269 | p,"Session does not exist usage: 363 <0> sessionid channel \n"); |
Mahesh Kumar Kalikot Veetil | 2aad8d8 | 2013-02-07 12:31:28 -0800 | [diff] [blame] | 2270 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!"); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2271 | return p; |
| 2272 | } |
| 2273 | psessionEntry->gLimChannelSwitch.switchCount = 0; |
| 2274 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT; |
| 2275 | psessionEntry->gLimChannelSwitch.switchMode = 0; |
| 2276 | psessionEntry->gLimChannelSwitch.primaryChannel = 0; |
| 2277 | |
| 2278 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2279 | limSendBeaconInd(pMac, psessionEntry); |
| 2280 | |
| 2281 | return p; |
| 2282 | } |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2283 | |
| 2284 | |
| 2285 | static char * |
| 2286 | dump_lim_mcc_policy_maker(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2287 | { |
| 2288 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "dump_lim_mcc_policy_maker arg = %d",arg1); |
| 2289 | |
| 2290 | if(arg1 == 0) //Disable feature completely |
| 2291 | { |
| 2292 | WDA_TrafficStatsTimerActivate(FALSE); |
| 2293 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE, |
| 2294 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2295 | { |
| 2296 | limLog( pMac, LOGE, FL("Could not get WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2297 | } |
| 2298 | } |
| 2299 | else if(arg1 == 1) //Enable feature |
| 2300 | { |
| 2301 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, |
| 2302 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2303 | { |
| 2304 | limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2305 | } |
| 2306 | } |
| 2307 | else if(arg1 == 2) //Enable feature and activate periodic timer |
| 2308 | { |
| 2309 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, |
| 2310 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2311 | { |
| 2312 | limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2313 | } |
| 2314 | WDA_TrafficStatsTimerActivate(TRUE); |
| 2315 | } |
| 2316 | else if(arg1 == 3) //Enable only stats collection - Used for unit testing |
| 2317 | { |
| 2318 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "Enabling Traffic Stats in DTS"); |
| 2319 | WDI_DS_ActivateTrafficStats(); |
| 2320 | } |
| 2321 | else if(arg1 == 4) //Send current stats snapshot to Riva -- Used for unit testing |
| 2322 | { |
| 2323 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2324 | tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext); |
| 2325 | ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, NULL, eANI_BOOLEAN_FALSE); |
Kiran Kumar Lokere | a4db3dc | 2013-03-25 18:05:24 -0700 | [diff] [blame] | 2326 | if(pWDA != NULL) |
| 2327 | { |
| 2328 | WDA_TimerTrafficStatsInd(pWDA); |
| 2329 | } |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2330 | WDA_TrafficStatsTimerActivate(FALSE); |
| 2331 | ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE,NULL, eANI_BOOLEAN_FALSE); |
| 2332 | } |
| 2333 | else if (arg1 == 5) //Change the periodicity of TX stats timer |
| 2334 | { |
| 2335 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2336 | tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext); |
Kiran Kumar Lokere | a4db3dc | 2013-03-25 18:05:24 -0700 | [diff] [blame] | 2337 | if (pWDA != NULL && tx_timer_change(&pWDA->wdaTimers.trafficStatsTimer, arg2/10, arg2/10) != TX_SUCCESS) |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2338 | { |
| 2339 | limLog(pMac, LOGP, FL("Disable timer before changing timeout value")); |
| 2340 | } |
| 2341 | } |
| 2342 | return p; |
| 2343 | } |
| 2344 | |
Ravi Kumar Vaishnav | b765240 | 2013-01-18 19:05:15 -0800 | [diff] [blame] | 2345 | #ifdef WLANTL_DEBUG |
| 2346 | /* API to print number of pkts received based on rate index */ |
| 2347 | /* arg1 = station Id */ |
| 2348 | /* arg2 = BOOLEAN value to either or not flush the counters */ |
| 2349 | static char * |
| 2350 | dump_lim_get_pkts_rcvd_per_rate_idx( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2351 | { |
| 2352 | /* if anything other than 1, then we need not flush the counters */ |
| 2353 | if( arg2 != 1) |
| 2354 | arg2 = FALSE; |
| 2355 | |
| 2356 | WLANTLPrintPktsRcvdPerRateIdx(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2); |
| 2357 | return p; |
| 2358 | } |
| 2359 | |
| 2360 | /* API to print number of pkts received based on rssi */ |
| 2361 | /* arg1 = station Id */ |
| 2362 | /* arg2 = BOOLEAN value to either or not flush the counters */ |
| 2363 | static char * |
| 2364 | dump_lim_get_pkts_rcvd_per_rssi_values( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2365 | { |
| 2366 | /* if anything other than 1, then we need not flush the counters */ |
| 2367 | if( arg2 != 1) |
| 2368 | arg2 = FALSE; |
| 2369 | |
| 2370 | WLANTLPrintPktsRcvdPerRssi(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2); |
| 2371 | return p; |
| 2372 | } |
| 2373 | #endif |
| 2374 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 2375 | #ifdef WLAN_FEATURE_RMC |
| 2376 | |
| 2377 | static char * |
| 2378 | dump_lim_enable_rmc_data_path |
| 2379 | ( |
| 2380 | tpAniSirGlobal pMac, |
| 2381 | tANI_U32 arg1, |
| 2382 | tANI_U32 arg2, |
| 2383 | tANI_U32 arg3, |
| 2384 | tANI_U32 arg4, |
| 2385 | char *p |
| 2386 | ) |
| 2387 | { |
| 2388 | v_MACADDR_t rmcTransmitterAddr; |
| 2389 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2390 | |
| 2391 | rmcTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24); |
| 2392 | rmcTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16); |
| 2393 | rmcTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8); |
| 2394 | rmcTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF)); |
| 2395 | rmcTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24); |
| 2396 | rmcTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16); |
| 2397 | |
| 2398 | limLog(pMac, LOGE, |
| 2399 | FL("Enable RMC data path for MCAST transmitter:" MAC_ADDRESS_STR), |
| 2400 | MAC_ADDR_ARRAY( rmcTransmitterAddr.bytes)); |
| 2401 | |
| 2402 | /*Input format is in MAC address fromat for example |
| 2403 | iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMC for |
| 2404 | MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/ |
| 2405 | |
| 2406 | /*Enable TL data path*/ |
| 2407 | WLANTL_EnableRMC( pVosContext, &rmcTransmitterAddr ); |
| 2408 | |
| 2409 | return p; |
| 2410 | } |
| 2411 | |
| 2412 | static char * |
| 2413 | dump_lim_disable_rmc_data_path |
| 2414 | ( |
| 2415 | tpAniSirGlobal pMac, |
| 2416 | tANI_U32 arg1, |
| 2417 | tANI_U32 arg2, |
| 2418 | tANI_U32 arg3, |
| 2419 | tANI_U32 arg4, |
| 2420 | char *p |
| 2421 | ) |
| 2422 | { |
| 2423 | v_MACADDR_t rmcTransmitterAddr; |
| 2424 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2425 | |
| 2426 | rmcTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24); |
| 2427 | rmcTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16); |
| 2428 | rmcTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8); |
| 2429 | rmcTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF)); |
| 2430 | rmcTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24); |
| 2431 | rmcTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16); |
| 2432 | |
| 2433 | |
| 2434 | limLog(pMac, LOGE, |
| 2435 | FL("Disable RMC data path for MCAST transmitter:" MAC_ADDRESS_STR), |
| 2436 | MAC_ADDR_ARRAY( rmcTransmitterAddr.bytes)); |
| 2437 | |
| 2438 | /*Input format is in MAC address fromat for example |
| 2439 | iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMC for |
| 2440 | MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/ |
| 2441 | |
| 2442 | /*Disable TL data path*/ |
| 2443 | WLANTL_DisableRMC( pVosContext, &rmcTransmitterAddr ); |
| 2444 | |
| 2445 | return p; |
| 2446 | } |
| 2447 | |
| 2448 | static char * |
| 2449 | dump_lim_rmc_status(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2450 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2451 | { |
| 2452 | limRmcDumpStatus(pMac); |
| 2453 | return p; |
| 2454 | } |
| 2455 | |
| 2456 | static char * |
| 2457 | dump_set_mcast_dup_detect(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2458 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2459 | { |
| 2460 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2461 | v_U8_t enable; |
| 2462 | |
| 2463 | enable = (tANI_U8)arg1; |
| 2464 | |
| 2465 | /* Enable or Disable Multicast Duplicate Detection */ |
| 2466 | WLANTL_SetMcastDuplicateDetection( pVosContext, enable); |
| 2467 | |
| 2468 | return p; |
| 2469 | } |
| 2470 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2471 | |
| 2472 | static char * |
| 2473 | dump_set_max_probe_req(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2474 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2475 | { |
| 2476 | if ((arg1 <= 0) || (arg1 > 4)){ |
| 2477 | limLog(pMac, LOGE, |
| 2478 | FL("invalid number. valid range 1 - 4 \n")); |
| 2479 | return p; |
| 2480 | } |
| 2481 | pMac->lim.maxProbe = arg1; |
| 2482 | return p; |
| 2483 | } |
Viral Modi | f45f767 | 2013-09-06 13:29:06 -0700 | [diff] [blame] | 2484 | /* API to fill Rate Info based on mac efficiency |
| 2485 | * arg 1: mac efficiency to be used to calculate mac thorughput for a given rate index |
| 2486 | * arg 2: starting rateIndex to apply the macEfficiency to |
| 2487 | * arg 3: ending rateIndex to apply the macEfficiency to |
| 2488 | */ |
| 2489 | static char * |
| 2490 | dump_limRateInfoBasedOnMacEff(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2491 | { |
| 2492 | limLog(pMac, LOGE, FL("arg1 %u, arg2 %u, arg3 %u"), arg1, arg2, arg3); |
| 2493 | WDTS_FillRateInfo((tANI_U8)(arg1), (tANI_U16)(arg2), (tANI_U16)(arg3)); |
| 2494 | return p; |
| 2495 | } |
| 2496 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2497 | static tDumpFuncEntry limMenuDumpTable[] = { |
| 2498 | {0, "PE (300-499)", NULL}, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2499 | {300, "LIM: Dump state(s)/statistics <session id>", dump_lim_info}, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2500 | {301, "PE.LIM: dump TSPEC Table", dump_lim_tspec_table}, |
| 2501 | {302, "PE.LIM: dump specified TSPEC entry (id)", dump_lim_tspec_entry}, |
| 2502 | {303, "PE.LIM: dump EDCA params", dump_lim_edca_params}, |
| 2503 | {304, "PE.LIM: dump DPH table summary", dump_lim_dph_table_summary}, |
| 2504 | {305, "PE.LIM: dump link monitor stats", dump_lim_link_monitor_stats}, |
| 2505 | {306, "PE.LIM:dump Set the BAR Decline stat(arg1= 1/0 (enable/disable) arg2 =TID", dump_lim_AddBA_DeclineStat}, |
| 2506 | {307, "PE: LIM: dump CSR Send ReAssocReq", dump_lim_sme_reassoc_req}, |
| 2507 | {308, "PE:LIM: dump all 11H related data", dump_lim_dot11h_stats}, |
| 2508 | {309, "PE:LIM: dump to enable Measurement on AP", dump_lim_enable_measurement}, |
| 2509 | {310, "PE:LIM: dump to enable QuietIE on AP", dump_lim_enable_quietIE}, |
| 2510 | {311, "PE:LIM: disable/enable scan 1(disable)", dump_lim_disable_enable_scan}, |
| 2511 | {320, "PE.LIM: send sme scan request", dump_lim_scan_req_send}, |
| 2512 | |
| 2513 | |
| 2514 | /*FIXME_GEN6*/ |
| 2515 | /* This dump command is more of generic dump cmd and hence it should |
| 2516 | * be moved to logDump.c |
| 2517 | */ |
| 2518 | {321, "PE:LIM: Set Log Level <VOS Module> <VOS Log Level>", dump_lim_update_log_level}, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2519 | {331, "PE.LIM: Send finish scan to LIM", dump_lim_finishscan_send}, |
| 2520 | {332, "PE.LIM: force probe rsp send from LIM", dump_lim_prb_rsp_send}, |
| 2521 | {333, "PE.SCH: Trigger to generate a beacon", dump_sch_beacon_trigger}, |
| 2522 | {335, "PE.LIM: set ACM flag (0..3)", dump_lim_acm_set}, |
| 2523 | {336, "PE.LIM: Send an ADDBA Req to peer MAC arg1=aid,arg2=tid, arg3=ssn", dump_lim_addba_req}, |
| 2524 | {337, "PE.LIM: Send a DELBA Ind to peer MAC arg1=aid,arg2=recipient(0)/initiator(1),arg3=tid,arg4=reasonCode", dump_lim_delba_req}, |
| 2525 | {338, "PE.LIM: Trigger a BA timeout for STA index", dump_lim_ba_timeout}, |
| 2526 | {339, "PE.LIM: List active BA session(s) for AssocID", dump_lim_list_active_ba}, |
| 2527 | {340, "PE.LIM: Set background scan flag (0-disable, 1-enable)",dump_lim_bgscan_toggle}, |
| 2528 | {341, "PE.LIM: Set link monitoring mode", dump_lim_linkmonitor_toggle}, |
| 2529 | {342, "PE.LIM: AddSta <6th byte of station Mac>", dump_lim_add_sta}, |
| 2530 | {343, "PE.LIM: DelSta <aid>", dump_lim_del_sta}, |
| 2531 | {344, "PE.LIM: Set probe respond flag", dump_lim_proberesp_toggle}, |
| 2532 | {345, "PE.LIM: set protection config bitmap", set_lim_prot_cfg}, |
| 2533 | {346, "PE:LIM: Set the Dot11 Mode", dump_lim_set_dot11_mode}, |
| 2534 | {347, "PE:Enable or Disable Protection", dump_lim_set_protection_control}, |
| 2535 | {348, "PE:LIM: Send SM Power Mode Action frame", dump_lim_send_SM_Power_Mode}, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2536 | {349, "PE: LIM: Change CB Mode <session id> <sec chnl offset>",dump_lim_update_cb_Mode}, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2537 | {350, "PE: LIM: abort scan", dump_lim_abort_scan}, |
| 2538 | {351, "PE: LIM: Start stop BG scan", dump_lim_start_stop_bg_scan}, |
| 2539 | {352, "PE: LIM: PE statistics <scanmask>", dump_lim_get_pe_statistics}, |
| 2540 | {353, "PE: LIM: Set MAC log level <Mac Module ID> <Log Level>", dump_lim_set_log_level}, |
| 2541 | {354, "PE: LIM: Set Scan in Power Save <0-disable, 1-enable>", dump_lim_set_scan_in_powersave}, |
| 2542 | {355, "PE.LIM: send sme start BSS request", dump_lim_send_start_bss_req}, |
| 2543 | {356, "PE.LIM: dump pesession info ", dump_lim_session_print}, |
| 2544 | {357, "PE.LIM: send DisAssocRequest", dump_lim_send_disassoc_req}, |
| 2545 | {358, "PE.LIM: send sme stop bss request <session ID>", dump_lim_stop_bss_req}, |
| 2546 | {359, "PE.LIM: send sme join request", dump_lim_send_join_req}, |
| 2547 | #if defined WLAN_FEATURE_VOWIFI |
| 2548 | {360, "PE.LIM: send an RRM action frame", dump_lim_send_rrm_action}, |
| 2549 | {361, "PE.LIM: unpack an RRM action frame", dump_lim_unpack_rrm_action}, |
| 2550 | #endif |
| 2551 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 2552 | #ifdef RSSI_HACK |
| 2553 | {362, "TL Set current RSSI", dump_lim_set_tl_data_pkt_rssi}, |
| 2554 | #endif |
| 2555 | #endif |
| 2556 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 2557 | {363, "PE.LIM: trigger pre auth/reassoc event", dump_lim_ft_event}, |
| 2558 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2559 | {364, "PE.LIM: Send a channel switch announcement", dump_lim_channel_switch_announcement}, |
| 2560 | {365, "PE.LIM: Cancel channel switch announcement", dump_lim_cancel_channel_switch_announcement}, |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2561 | #ifdef WLAN_FEATURE_11AC |
| 2562 | {366, "PE.LIM: Send a VHT OPMode Action Frame", dump_lim_vht_opmode_notification}, |
Madan Mohan Koyyalamudi | c6226de | 2012-09-18 16:33:31 -0700 | [diff] [blame] | 2563 | {367, "PE.LIM: Send a VHT Channel Switch Announcement", dump_lim_vht_channel_switch_notification}, |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2564 | {368, "PE.LIM: MCC Policy Maker", dump_lim_mcc_policy_maker}, |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2565 | #endif |
Ravi Kumar Vaishnav | b765240 | 2013-01-18 19:05:15 -0800 | [diff] [blame] | 2566 | #ifdef WLANTL_DEBUG |
| 2567 | {369, "PE.LIM: pkts/rateIdx: iwpriv wlan0 dump 368 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rate_idx}, |
| 2568 | {370, "PE.LIM: pkts/rssi: : iwpriv wlan0 dump 369 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rssi_values}, |
| 2569 | #endif |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 2570 | #ifdef WLAN_FEATURE_RMC |
| 2571 | {371, "PE.LIM: Enable RMC data path in TL for input MCAST addr", |
| 2572 | dump_lim_enable_rmc_data_path }, |
| 2573 | {372, "PE.LIM: Disable RMC data path in TL for input MCAST addr", |
| 2574 | dump_lim_disable_rmc_data_path }, |
| 2575 | {373, "PE.LIM: Dump RMC transmitter and ruler status", dump_lim_rmc_status }, |
| 2576 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2577 | {374, "PE.LIM: MAS RX stats MAC eff <MAC eff in percentage>", dump_limRateInfoBasedOnMacEff}, |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 2578 | #ifdef WLAN_FEATURE_RMC |
| 2579 | {375, "PE.LIM: Enable(1)/Disable(0) RMC duplicate detection", dump_set_mcast_dup_detect }, |
| 2580 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2581 | {376, "PE.LIM: max number of probe per scan", dump_set_max_probe_req }, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2582 | }; |
| 2583 | |
| 2584 | |
| 2585 | |
| 2586 | void limDumpInit(tpAniSirGlobal pMac) |
| 2587 | { |
| 2588 | logDumpRegisterTable( pMac, &limMenuDumpTable[0], |
| 2589 | sizeof(limMenuDumpTable)/sizeof(limMenuDumpTable[0]) ); |
| 2590 | } |
| 2591 | |
| 2592 | |
| 2593 | #endif //#if defined(ANI_LOGDUMP) |
| 2594 | |