Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Vignesh Viswanathan | ada4de7 | 2018-08-17 11:45:34 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2013, 2016-2018 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????? |
Vignesh Viswanathan | ada4de7 | 2018-08-17 11:45:34 +0530 | [diff] [blame] | 728 | if (ac >= MAX_NUM_AC) |
| 729 | return; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 730 | psessionEntry->gLimEdcaParamsBC[ac].aci.acm = (tANI_U8)acmFlag; |
| 731 | psessionEntry->gLimEdcaParamSetCount++; |
| 732 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 733 | } |
| 734 | |
| 735 | static char * |
| 736 | limDumpEdcaParams(tpAniSirGlobal pMac, char *p) |
| 737 | { |
| 738 | tANI_U8 i = 0; |
| 739 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 740 | p += log_sprintf( pMac,p, "EDCA parameter set count = %d\n", psessionEntry->gLimEdcaParamSetCount); |
| 741 | p += log_sprintf( pMac,p, "Broadcast parameters\n"); |
| 742 | p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n"); |
| 743 | for(i = 0; i < MAX_NUM_AC; i++) |
| 744 | { |
| 745 | //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters. |
| 746 | p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i, |
| 747 | psessionEntry->gLimEdcaParamsBC[i].aci.aci, psessionEntry->gLimEdcaParamsBC[i].aci.acm, |
| 748 | psessionEntry->gLimEdcaParamsBC[i].aci.aifsn, psessionEntry->gLimEdcaParamsBC[i].cw.max, |
| 749 | psessionEntry->gLimEdcaParamsBC[i].cw.min, psessionEntry->gLimEdcaParamsBC[i].txoplimit); |
| 750 | } |
| 751 | |
| 752 | p += log_sprintf( pMac,p, "\nLocal parameters\n"); |
| 753 | p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n"); |
| 754 | for(i = 0; i < MAX_NUM_AC; i++) |
| 755 | { |
| 756 | //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters. |
| 757 | p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i, |
| 758 | psessionEntry->gLimEdcaParams[i].aci.aci, psessionEntry->gLimEdcaParams[i].aci.acm, |
| 759 | psessionEntry->gLimEdcaParams[i].aci.aifsn, psessionEntry->gLimEdcaParams[i].cw.max, |
| 760 | psessionEntry->gLimEdcaParams[i].cw.min, psessionEntry->gLimEdcaParams[i].txoplimit); |
| 761 | } |
| 762 | |
| 763 | return p; |
| 764 | } |
| 765 | |
| 766 | |
| 767 | static char* limDumpTspecEntry(tpAniSirGlobal pMac, char *p, tANI_U32 tspecEntryNo) |
| 768 | { |
| 769 | tpLimTspecInfo pTspecList; |
| 770 | if(tspecEntryNo >= LIM_NUM_TSPEC_MAX) |
| 771 | { |
| 772 | p += log_sprintf( pMac,p, "Tspec Entry no. %d is out of allowed range(0 .. %d)\n", |
| 773 | tspecEntryNo, (LIM_NUM_TSPEC_MAX - 1)); |
| 774 | return p; |
| 775 | } |
| 776 | pTspecList = &pMac->lim.tspecInfo[tspecEntryNo]; |
| 777 | if (pTspecList->inuse) |
| 778 | p += log_sprintf( pMac,p, "Entry %d is VALID\n", tspecEntryNo); |
| 779 | else |
| 780 | { |
| 781 | p += log_sprintf( pMac,p, "Entry %d is UNUSED\n", tspecEntryNo); |
| 782 | return p; |
| 783 | } |
| 784 | p += log_sprintf( pMac,p, "\tSta %0x:%0x:%0x:%0x:%0x:%0x, AID %d, Index %d\n", |
| 785 | pTspecList->staAddr[0], pTspecList->staAddr[1], |
| 786 | pTspecList->staAddr[2], pTspecList->staAddr[3], |
| 787 | pTspecList->staAddr[4], pTspecList->staAddr[5], |
| 788 | pTspecList->assocId, pTspecList->idx); |
| 789 | p += log_sprintf( pMac,p, "\tType %d, Length %d, ackPolicy %d, userPrio %d, accessPolicy = %d, Dir %d, tsid %d\n", |
| 790 | pTspecList->tspec.type, pTspecList->tspec.length, |
| 791 | pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio, |
| 792 | pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction, |
| 793 | pTspecList->tspec.tsinfo.traffic.tsid); |
| 794 | p += log_sprintf( pMac,p, "\tPsb %d, Agg %d, TrafficType %d, schedule %d; msduSz: nom %d, max %d\n", |
| 795 | pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation, |
| 796 | pTspecList->tspec.tsinfo.traffic.trafficType, pTspecList->tspec.tsinfo.schedule.schedule, |
| 797 | pTspecList->tspec.nomMsduSz, pTspecList->tspec.maxMsduSz); |
| 798 | p += log_sprintf( pMac,p, "\tSvcInt: Min %d, Max %d; dataRate: Min %d, mean %d, peak %d\n", |
| 799 | pTspecList->tspec.minSvcInterval, pTspecList->tspec.maxSvcInterval, |
| 800 | pTspecList->tspec.minDataRate, pTspecList->tspec.meanDataRate, |
| 801 | pTspecList->tspec.peakDataRate); |
| 802 | p += log_sprintf( pMac,p, "\tmaxBurstSz %d, delayBound %d, minPhyRate %d, surplusBw %d, mediumTime %d\n", |
| 803 | pTspecList->tspec.maxBurstSz, pTspecList->tspec.delayBound, |
| 804 | pTspecList->tspec.minPhyRate, pTspecList->tspec.surplusBw, |
| 805 | pTspecList->tspec.mediumTime); |
| 806 | |
| 807 | return p; |
| 808 | } |
| 809 | |
| 810 | static char* dumpTspecTableSummary(tpAniSirGlobal pMac, tpLimTspecInfo pTspecList, char *p, int ctspec) |
| 811 | { |
| 812 | 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", |
| 813 | ctspec, pTspecList->idx, pTspecList->assocId, |
| 814 | pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio, |
| 815 | pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation, |
| 816 | pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction, |
| 817 | pTspecList->tspec.tsinfo.traffic.tsid, pTspecList->tspec.tsinfo.traffic.trafficType); |
| 818 | |
| 819 | return p; |
| 820 | } |
| 821 | |
| 822 | |
| 823 | static char* limDumpDphTableSummary(tpAniSirGlobal pMac,char *p) |
| 824 | { |
| 825 | tANI_U8 i, j; |
| 826 | p += log_sprintf( pMac,p, "DPH Table dump\n"); |
| 827 | |
| 828 | for(j=0; j < pMac->lim.maxBssId; j++) |
| 829 | { |
| 830 | /* Find first free room in session table */ |
| 831 | if(pMac->lim.gpSession[j].valid) |
| 832 | { |
| 833 | p += log_sprintf( pMac,p, "aid staId bssid encPol qosMode wme 11e wsm staaddr\n"); |
| 834 | for(i = 0; i < pMac->lim.gpSession[j].dph.dphHashTable.size; i++) |
| 835 | { |
| 836 | if (pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].added) |
| 837 | { |
| 838 | p += log_sprintf( pMac,p, "%d %d %d %d %d %d %d %d %x:%x:%x:%x:%x:%x\n", |
| 839 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].assocId, |
| 840 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staIndex, |
| 841 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].bssId, |
| 842 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].encPolicy, |
| 843 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].qosMode, |
| 844 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wmeEnabled, |
| 845 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].lleEnabled, |
| 846 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wsmEnabled, |
| 847 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAuthenticated, |
| 848 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[0], |
| 849 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[1], |
| 850 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[2], |
| 851 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[3], |
| 852 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[4], |
| 853 | pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[5]); |
| 854 | } |
| 855 | } |
| 856 | } |
| 857 | } |
| 858 | return p; |
| 859 | } |
| 860 | |
| 861 | // add the specified tspec to the tspec list |
| 862 | static char* limDumpTsecTable( tpAniSirGlobal pMac, char* p) |
| 863 | { |
| 864 | int ctspec; |
| 865 | tpLimTspecInfo pTspecList = &pMac->lim.tspecInfo[0]; |
| 866 | |
| 867 | p += log_sprintf( pMac,p, "=======LIM TSPEC TABLE DUMP\n"); |
| 868 | p += log_sprintf( pMac,p, "Num\tIdx\tAID\tAckPol\tUP\tPSB\tAgg\tAccessPol\tDir\tTSID\ttraffic\n"); |
| 869 | |
| 870 | for (ctspec = 0; ctspec < LIM_NUM_TSPEC_MAX; ctspec++, pTspecList++) |
| 871 | { |
| 872 | if (pTspecList->inuse) |
| 873 | p = dumpTspecTableSummary(pMac, pTspecList, p, ctspec); |
| 874 | } |
| 875 | return p; |
| 876 | } |
| 877 | |
| 878 | static char * |
| 879 | dump_lim_tspec_table( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 880 | { |
| 881 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 882 | p = limDumpTsecTable(pMac, p); |
| 883 | return p; |
| 884 | } |
| 885 | |
| 886 | static char * |
| 887 | dump_lim_tspec_entry( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 888 | { |
| 889 | (void) arg2; (void) arg3; (void) arg4; |
| 890 | p = limDumpTspecEntry(pMac, p, arg1); |
| 891 | return p; |
| 892 | } |
| 893 | |
| 894 | static char * |
| 895 | dump_lim_dph_table_summary( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 896 | { |
| 897 | (void) arg2; (void) arg3; (void) arg4; |
| 898 | p = limDumpDphTableSummary(pMac, p); |
| 899 | return p; |
| 900 | } |
| 901 | |
| 902 | |
| 903 | static char * |
| 904 | dump_lim_link_monitor_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 905 | { |
| 906 | tANI_U32 ind, val; |
| 907 | |
| 908 | (void) arg2; (void) arg3; (void) arg4; |
| 909 | p += log_sprintf( pMac,p, "\n ----- LIM Heart Beat Stats ----- \n"); |
| 910 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in LinkEst State = %d\n", |
| 911 | pMac->lim.gLimHBfailureCntInLinkEstState); |
| 912 | p += log_sprintf( pMac,p, "No. of Probe Failures after HB failed = %d\n", |
| 913 | pMac->lim.gLimProbeFailureAfterHBfailedCnt); |
| 914 | p += log_sprintf( pMac,p, "No. of HeartBeat Failures in Other States = %d\n", |
| 915 | pMac->lim.gLimHBfailureCntInOtherStates); |
| 916 | |
| 917 | if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val) == eSIR_SUCCESS) |
| 918 | p += log_sprintf( pMac,p, "Cfg HeartBeat Threshold = %d\n", val); |
| 919 | |
| 920 | p += log_sprintf( pMac,p, "# Beacons Rcvd in HB interval # of times\n"); |
| 921 | |
| 922 | for (ind = 1; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++) |
| 923 | { |
| 924 | 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, |
| 925 | pMac->lim.gLimHeartBeatBeaconStats[ind]); |
| 926 | } |
| 927 | 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", |
| 928 | MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL-1, |
| 929 | pMac->lim.gLimHeartBeatBeaconStats[0]); |
| 930 | |
| 931 | if (arg1 != 0) |
| 932 | { |
| 933 | for (ind = 0; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++) |
| 934 | pMac->lim.gLimHeartBeatBeaconStats[ind] = 0; |
| 935 | |
| 936 | pMac->lim.gLimHBfailureCntInLinkEstState = 0; |
| 937 | pMac->lim.gLimProbeFailureAfterHBfailedCnt = 0; |
| 938 | pMac->lim.gLimHBfailureCntInOtherStates = 0; |
| 939 | |
| 940 | p += log_sprintf( pMac,p, "\nReset HeartBeat Statistics\n"); |
| 941 | } |
| 942 | return p; |
| 943 | } |
| 944 | |
| 945 | static char * |
| 946 | dump_lim_edca_params( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 947 | { |
| 948 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 949 | p = limDumpEdcaParams(pMac, p); |
| 950 | return p; |
| 951 | } |
| 952 | |
| 953 | static char * |
| 954 | dump_lim_acm_set( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 955 | { |
| 956 | (void) arg3; (void) arg4; |
| 957 | limSetEdcaBcastACMFlag(pMac, arg1 /*ac(0..3)*/, arg2 /*(acmFlag = 1 to set ACM*/); |
| 958 | return p; |
| 959 | } |
| 960 | |
| 961 | static char * |
| 962 | dump_lim_bgscan_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 963 | { |
| 964 | (void) arg2; (void) arg3; (void) arg4; |
| 965 | pMac->lim.gLimForceBackgroundScanDisable = (arg1 == 0) ? 1 : 0; |
| 966 | p += log_sprintf( pMac,p, "Bgnd scan is now %s\n", |
| 967 | (pMac->lim.gLimForceBackgroundScanDisable) ? "Disabled" : "On"); |
| 968 | return p; |
| 969 | } |
| 970 | |
| 971 | static char * |
| 972 | dump_lim_linkmonitor_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 973 | { |
| 974 | (void) arg2; (void) arg3; (void) arg4; |
| 975 | pMac->sys.gSysEnableLinkMonitorMode = (arg1 == 0) ? 0 : 1; |
| 976 | p += log_sprintf( pMac,p, "LinkMonitor mode enable = %s\n", |
| 977 | (pMac->sys.gSysEnableLinkMonitorMode) ? "On" : "Off"); |
| 978 | return p; |
| 979 | } |
| 980 | |
| 981 | static char * |
| 982 | dump_lim_proberesp_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 983 | { |
| 984 | (void) arg2; (void) arg3; (void) arg4; |
| 985 | pMac->lim.gLimProbeRespDisableFlag = (arg1 == 0) ? 0 : 1; |
| 986 | p += log_sprintf( pMac,p, "ProbeResponse mode disable = %s\n", |
| 987 | (pMac->lim.gLimProbeRespDisableFlag) ? "On" : "Off"); |
| 988 | return p; |
| 989 | } |
| 990 | |
| 991 | static char * |
| 992 | dump_lim_add_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 993 | { |
| 994 | #ifdef FIXME_GEN6 |
| 995 | tpDphHashNode pStaDs; |
| 996 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 997 | tSirMacAddr staMac = {0}; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 998 | tANI_U16 peerIdx; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 999 | if(arg2 > 5) |
| 1000 | goto addStaFail; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 1001 | peerIdx = limAssignPeerIdx(pMac, psessionEntry); |
| 1002 | pStaDs = dphGetHashEntry(pMac, peerIdx); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1003 | if(NULL == pStaDs) |
| 1004 | { |
| 1005 | staMac[5] = (tANI_U8) arg1; |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 1006 | pStaDs = dphAddHashEntry(pMac, staMac, peerIdx, &psessionEntry->dph.dphHashTable); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1007 | if(NULL == pStaDs) |
| 1008 | goto addStaFail; |
| 1009 | |
| 1010 | pStaDs->staType = STA_ENTRY_PEER; |
| 1011 | switch(arg2) |
| 1012 | { |
| 1013 | //11b station |
| 1014 | case 0: |
| 1015 | { |
| 1016 | pStaDs->mlmStaContext.htCapability = 0; |
| 1017 | pStaDs->erpEnabled = 0; |
| 1018 | p += log_sprintf( pMac,p, "11b"); |
| 1019 | } |
| 1020 | break; |
| 1021 | //11g station |
| 1022 | case 1: |
| 1023 | { |
| 1024 | pStaDs->mlmStaContext.htCapability = 0; |
| 1025 | pStaDs->erpEnabled = 1; |
| 1026 | p += log_sprintf( pMac,p, "11g"); |
| 1027 | } |
| 1028 | break; |
| 1029 | //ht20 station non-GF |
| 1030 | case 2: |
| 1031 | { |
| 1032 | pStaDs->mlmStaContext.htCapability = 1; |
| 1033 | pStaDs->erpEnabled = 1; |
| 1034 | pStaDs->htSupportedChannelWidthSet = 0; |
| 1035 | pStaDs->htGreenfield = 0; |
| 1036 | p += log_sprintf( pMac,p, "HT20 non-GF"); |
| 1037 | } |
| 1038 | break; |
| 1039 | //ht20 station GF |
| 1040 | case 3: |
| 1041 | { |
| 1042 | pStaDs->mlmStaContext.htCapability = 1; |
| 1043 | pStaDs->erpEnabled = 1; |
| 1044 | pStaDs->htSupportedChannelWidthSet = 0; |
| 1045 | pStaDs->htGreenfield = 1; |
| 1046 | p += log_sprintf( pMac,p, "HT20 GF"); |
| 1047 | } |
| 1048 | break; |
| 1049 | //ht40 station non-GF |
| 1050 | case 4: |
| 1051 | { |
| 1052 | pStaDs->mlmStaContext.htCapability = 1; |
| 1053 | pStaDs->erpEnabled = 1; |
| 1054 | pStaDs->htSupportedChannelWidthSet = 1; |
| 1055 | pStaDs->htGreenfield = 0; |
| 1056 | p += log_sprintf( pMac,p, "HT40 non-GF"); |
| 1057 | } |
| 1058 | break; |
| 1059 | //ht40 station GF |
| 1060 | case 5: |
| 1061 | { |
| 1062 | pStaDs->mlmStaContext.htCapability = 1; |
| 1063 | pStaDs->erpEnabled = 1; |
| 1064 | pStaDs->htSupportedChannelWidthSet = 1; |
| 1065 | pStaDs->htGreenfield = 1; |
| 1066 | p += log_sprintf( pMac,p, "HT40 GF"); |
| 1067 | } |
| 1068 | break; |
| 1069 | default: |
| 1070 | { |
| 1071 | p += log_sprintf( pMac,p, "arg2 not in range [0..3]. Station not added.\n"); |
| 1072 | goto addStaFail; |
| 1073 | } |
| 1074 | break; |
| 1075 | } |
| 1076 | |
| 1077 | pStaDs->added = 1; |
| 1078 | p += log_sprintf( pMac,p, " station with mac address 00:00:00:00:00:%x added.\n", (tANI_U8)arg1); |
| 1079 | limAddSta(pMac, pStaDs,psessionEntry); |
| 1080 | } |
| 1081 | else |
| 1082 | { |
| 1083 | addStaFail: |
| 1084 | p += log_sprintf( pMac,p, "Could not add station\n"); |
| 1085 | p += log_sprintf( pMac,p, "arg1: 6th byte of the station MAC address\n"); |
| 1086 | p += log_sprintf( pMac,p, "arg2[0..5] : station type as described below\n"); |
| 1087 | 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"); |
| 1088 | } |
| 1089 | #endif |
| 1090 | return p; |
| 1091 | } |
| 1092 | |
| 1093 | static char * |
| 1094 | dump_lim_del_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1095 | { |
| 1096 | |
| 1097 | tpDphHashNode pStaDs; |
| 1098 | tLimMlmDisassocInd mlmDisassocInd; |
| 1099 | tpPESession psessionEntry; |
| 1100 | tANI_U8 reasonCode = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON; |
| 1101 | |
| 1102 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 1103 | { |
| 1104 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
| 1105 | return p; |
| 1106 | } |
| 1107 | |
| 1108 | pStaDs = dphGetHashEntry(pMac, (tANI_U16)arg1, &psessionEntry->dph.dphHashTable); |
| 1109 | |
| 1110 | if(NULL == pStaDs) |
| 1111 | { |
| 1112 | p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1); |
| 1113 | return p; |
| 1114 | } |
| 1115 | |
| 1116 | if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) |
| 1117 | { |
| 1118 | p += log_sprintf( pMac,p, "received Disassoc frame from peer that is in state %X \n", pStaDs->mlmStaContext.mlmState); |
| 1119 | return p; |
| 1120 | } |
| 1121 | |
| 1122 | pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC; |
| 1123 | pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes) reasonCode; |
| 1124 | |
| 1125 | // Issue Disassoc Indication to SME. |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1126 | vos_mem_copy((tANI_U8 *) &mlmDisassocInd.peerMacAddr, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1127 | (tANI_U8 *) pStaDs->staAddr, sizeof(tSirMacAddr)); |
| 1128 | mlmDisassocInd.reasonCode = reasonCode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1129 | mlmDisassocInd.disassocTrigger = eLIM_PEER_ENTITY_DISASSOC; |
| 1130 | |
| 1131 | mlmDisassocInd.sessionId = psessionEntry->peSessionId; |
| 1132 | |
| 1133 | limPostSmeMessage(pMac, LIM_MLM_DISASSOC_IND, (tANI_U32 *) &mlmDisassocInd); |
| 1134 | // Receive path cleanup |
| 1135 | limCleanupRxPath(pMac, pStaDs,psessionEntry); |
| 1136 | return p; |
| 1137 | } |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | static char * |
| 1143 | set_lim_prot_cfg( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1144 | { |
| 1145 | |
| 1146 | /********************************** |
| 1147 | * Protection Enable |
| 1148 | * |
| 1149 | *LOWER byte for associated stations |
| 1150 | *UPPER byte for overlapping stations. |
| 1151 | *11g ==> protection from 11g |
| 1152 | *11b ==> protection from 11b |
| 1153 | *each byte will have the following info |
| 1154 | *bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 |
| 1155 | *reserved reserved RIFS Lsig n-GF ht20 11g 11b |
| 1156 | ********************************** |
| 1157 | WNI_CFG_PROTECTION_ENABLED I 4 9 |
| 1158 | V RW NP RESTART |
| 1159 | LIM |
| 1160 | 0 0xff 0xff |
| 1161 | V RW NP RESTART |
| 1162 | LIM |
| 1163 | 0 0xffff 0xffff |
| 1164 | |
| 1165 | #ENUM FROM_llB 0 |
| 1166 | #ENUM FROM_llG 1 |
| 1167 | #ENUM HT_20 2 |
| 1168 | #ENUM NON_GF 3 |
| 1169 | #ENUM LSIG_TXOP 4 |
| 1170 | #ENUM RIFS 5 |
| 1171 | #ENUM OLBC_FROM_llB 8 |
| 1172 | #ENUM OLBC_FROM_llG 9 |
| 1173 | #ENUM OLBC_HT20 10 |
| 1174 | #ENUM OLBC_NON_GF 11 |
| 1175 | #ENUM OLBC_LSIG_TXOP 12 |
| 1176 | #ENUM OLBC_RIFS 13 |
| 1177 | ******************************************/ |
| 1178 | if(1 == arg1) |
| 1179 | dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, 0xff, arg3, arg4, p); |
| 1180 | else if(2 == arg1) |
| 1181 | dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, arg2 & 0xff, arg3, arg4, p); |
| 1182 | else |
| 1183 | { |
| 1184 | p += log_sprintf( pMac,p, "To set protection config:\n"); |
| 1185 | p += log_sprintf( pMac,p, "arg1: operation type(1 -> set to Default 0xff, 2-> set to a arg2, else print help)\n"); |
| 1186 | } |
| 1187 | return p; |
| 1188 | } |
| 1189 | |
| 1190 | |
| 1191 | static char * |
| 1192 | dump_lim_set_protection_control( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1193 | { |
| 1194 | 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] | 1195 | limSetCfgProtection(pMac, NULL); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1196 | return p; |
| 1197 | } |
| 1198 | |
| 1199 | |
| 1200 | static char * |
| 1201 | dump_lim_send_SM_Power_Mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1202 | { |
| 1203 | tSirMsgQ msg; |
| 1204 | tpSirMbMsg pMBMsg; |
| 1205 | tSirMacHTMIMOPowerSaveState state; |
| 1206 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1207 | p += log_sprintf( pMac,p, "%s: Verifying the Arguments\n", __func__); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1208 | if ((arg1 > 3) || (arg1 == 2)) |
| 1209 | { |
| 1210 | p += log_sprintf( pMac,p, "Invalid Argument , enter one of the valid states\n"); |
| 1211 | return p; |
| 1212 | } |
| 1213 | |
| 1214 | state = (tSirMacHTMIMOPowerSaveState) arg1; |
| 1215 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1216 | pMBMsg = vos_mem_malloc(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState)); |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 1217 | if (NULL == pMBMsg) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1218 | { |
| 1219 | p += log_sprintf( pMac,p, "pMBMsg is NULL\n"); |
| 1220 | return p; |
| 1221 | } |
| 1222 | pMBMsg->type = eWNI_PMC_SMPS_STATE_IND; |
| 1223 | pMBMsg->msgLen = (tANI_U16)(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState)); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1224 | vos_mem_copy(pMBMsg->data, &state, sizeof(tSirMacHTMIMOPowerSaveState)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1225 | |
| 1226 | msg.type = eWNI_PMC_SMPS_STATE_IND; |
| 1227 | msg.bodyptr = pMBMsg; |
| 1228 | msg.bodyval = 0; |
| 1229 | |
| 1230 | if (limPostMsgApi(pMac, &msg) != TX_SUCCESS) |
| 1231 | { |
| 1232 | p += log_sprintf( pMac,p, "Updating the SMPower Request has failed \n"); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1233 | vos_mem_free(pMBMsg); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1234 | } |
| 1235 | else |
| 1236 | { |
| 1237 | p += log_sprintf( pMac,p, "Updating the SMPower Request is Done \n"); |
| 1238 | } |
| 1239 | |
| 1240 | return p; |
| 1241 | } |
| 1242 | |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | static char * |
| 1247 | dump_lim_addba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1248 | { |
| 1249 | tSirRetStatus status; |
| 1250 | tpDphHashNode pSta; |
| 1251 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1252 | |
| 1253 | |
| 1254 | (void) arg4; |
| 1255 | |
| 1256 | // Get DPH Sta entry for this ASSOC ID |
| 1257 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable); |
| 1258 | if( NULL == pSta ) |
| 1259 | { |
| 1260 | p += log_sprintf( pMac, p, |
| 1261 | "\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] | 1262 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1263 | arg1 ); |
| 1264 | } |
| 1265 | else |
| 1266 | { |
| 1267 | status = limPostMlmAddBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U16) arg3,psessionEntry); |
| 1268 | p += log_sprintf( pMac, p, |
| 1269 | "\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] | 1270 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1271 | pSta->staIndex, |
| 1272 | arg2, |
| 1273 | limResultCodeStr( status )); |
| 1274 | } |
| 1275 | |
| 1276 | return p; |
| 1277 | } |
| 1278 | |
| 1279 | static char * |
| 1280 | dump_lim_delba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1281 | { |
| 1282 | tSirRetStatus status; |
| 1283 | tpDphHashNode pSta; |
| 1284 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1285 | |
| 1286 | // Get DPH Sta entry for this ASSOC ID |
| 1287 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable ); |
| 1288 | if( NULL == pSta ) |
| 1289 | { |
| 1290 | p += log_sprintf( pMac, p, |
| 1291 | "\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] | 1292 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1293 | arg1 ); |
| 1294 | } |
| 1295 | else |
| 1296 | { |
| 1297 | status = limPostMlmDelBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U8) arg3, (tANI_U16) arg4 ,psessionEntry); |
| 1298 | p += log_sprintf( pMac, p, |
| 1299 | "\n%s: Attempted to send a DELBA Ind to STA Index %d, " |
| 1300 | "as the BA \"%s\" for TID %d, with Reason code %d. " |
| 1301 | "Send Status = %s\n", |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1302 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1303 | pSta->staIndex, |
| 1304 | (arg2 == 1)? "Initiator": "Recipient", |
| 1305 | arg3, // TID |
| 1306 | arg4, // Reason Code |
| 1307 | limResultCodeStr( status )); |
| 1308 | } |
| 1309 | |
| 1310 | return p; |
| 1311 | } |
| 1312 | |
| 1313 | static char * |
| 1314 | dump_lim_ba_timeout( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1315 | { |
| 1316 | |
| 1317 | /* FIXME: NO HAL IN UMAC for PRIMA */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1318 | |
| 1319 | p += log_sprintf( pMac, p, |
| 1320 | "\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] | 1321 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1322 | arg1, // STA index |
| 1323 | arg2, // TID |
| 1324 | arg3 ); // BA Direction |
| 1325 | |
| 1326 | return p; |
| 1327 | } |
| 1328 | |
| 1329 | static char * |
| 1330 | dump_lim_list_active_ba( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1331 | { |
| 1332 | tANI_U32 i; |
| 1333 | tpDphHashNode pSta; |
| 1334 | |
| 1335 | //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1336 | |
| 1337 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH |
| 1338 | |
| 1339 | (void) arg2; (void) arg3; (void) arg4; |
| 1340 | |
| 1341 | // Get DPH Sta entry for this ASSOC ID |
| 1342 | pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable); |
| 1343 | if( NULL == pSta ) |
| 1344 | { |
| 1345 | p += log_sprintf( pMac, p, |
| 1346 | "\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] | 1347 | __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1348 | arg1 ); |
| 1349 | } |
| 1350 | else |
| 1351 | { |
| 1352 | p += log_sprintf( pMac, p, |
| 1353 | "\nList of Active BA sessions for STA Index %d with Assoc ID %d\n", |
| 1354 | pSta->staIndex, |
| 1355 | arg1 ); |
| 1356 | |
| 1357 | p += log_sprintf( pMac, p, "TID\tRxBA\tTxBA\tRxBufferSize\tTxBufferSize\tRxBATimeout\tTxBATimeout\n"); |
| 1358 | for( i = 0; i < STACFG_MAX_TC; i ++ ) |
| 1359 | p += log_sprintf( pMac, p, |
| 1360 | "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", |
| 1361 | i, // TID |
| 1362 | pSta->tcCfg[i].fUseBARx, |
| 1363 | pSta->tcCfg[i].fUseBATx, |
| 1364 | pSta->tcCfg[i].rxBufSize, |
| 1365 | pSta->tcCfg[i].txBufSize, |
| 1366 | pSta->tcCfg[i].tuRxBAWaitTimeout, |
| 1367 | pSta->tcCfg[i].tuTxBAWaitTimeout ); |
| 1368 | } |
| 1369 | |
| 1370 | return p; |
| 1371 | } |
| 1372 | |
| 1373 | |
| 1374 | static char * |
| 1375 | dump_lim_AddBA_DeclineStat( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1376 | { |
| 1377 | |
| 1378 | int Tid, Enable=(arg1 & 0x1); |
| 1379 | tANI_U8 val; |
| 1380 | |
| 1381 | if (arg1 > 1) { |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1382 | 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] | 1383 | arg1 &= 1; |
| 1384 | } |
| 1385 | |
| 1386 | val = pMac->lim.gAddBA_Declined; |
| 1387 | |
| 1388 | if (arg2 > 7) { |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1389 | 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] | 1390 | Tid = arg2 & 0x7; |
| 1391 | } else |
| 1392 | Tid = arg2; |
| 1393 | |
| 1394 | |
| 1395 | if ( Enable) |
| 1396 | val |= Enable << Tid; |
| 1397 | else |
| 1398 | val &= ~(0x1 << Tid); |
| 1399 | |
| 1400 | 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] | 1401 | 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] | 1402 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 1403 | 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] | 1404 | |
| 1405 | return p; |
| 1406 | } |
| 1407 | static char * |
| 1408 | dump_lim_set_dot11_mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1409 | { |
| 1410 | |
| 1411 | tpPESession psessionEntry =&pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry????? |
| 1412 | dump_cfg_set(pMac, WNI_CFG_DOT11_MODE, arg1, arg2, arg3, p); |
| 1413 | if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) || |
| 1414 | (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE)) |
| 1415 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 1416 | p += log_sprintf( pMac,p, "The Dot11 Mode is set to %s", limDot11ModeStr(pMac, (tANI_U8)psessionEntry->dot11mode)); |
| 1417 | return p; |
| 1418 | } |
| 1419 | |
| 1420 | |
| 1421 | static char* dump_lim_update_cb_Mode(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1422 | { |
| 1423 | tANI_U32 localPwrConstraint; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1424 | tpPESession psessionEntry = peFindSessionBySessionId(pMac, arg1); |
| 1425 | |
| 1426 | if (psessionEntry == NULL) |
| 1427 | { |
| 1428 | p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", arg1); |
| 1429 | return p; |
| 1430 | } |
| 1431 | |
| 1432 | if ( !psessionEntry->htCapability ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1433 | { |
| 1434 | p += log_sprintf( pMac,p, "Error: Dot11 mode is non-HT, can not change the CB mode.\n"); |
| 1435 | return p; |
| 1436 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1437 | |
| 1438 | psessionEntry->htSupportedChannelWidthSet = arg2?1:0; |
| 1439 | psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet; |
| 1440 | psessionEntry->htSecondaryChannelOffset = arg2; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1441 | |
| 1442 | if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1443 | 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] | 1444 | 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] | 1445 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1446 | wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1447 | |
| 1448 | limSendSwitchChnlParams(pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1449 | (tPowerdBm) localPwrConstraint, psessionEntry->peSessionId); |
| 1450 | if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) || |
| 1451 | (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE)) |
| 1452 | schSetFixedBeaconFields(pMac,psessionEntry); |
| 1453 | return p; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1454 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1455 | } |
| 1456 | |
| 1457 | static char* dump_lim_abort_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1458 | { |
| 1459 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1460 | //csrScanAbortMacScan(pMac); |
| 1461 | return p; |
| 1462 | |
| 1463 | } |
| 1464 | |
| 1465 | static char* dump_lim_start_stop_bg_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1466 | { |
| 1467 | (void) arg2; (void) arg3; (void) arg4; |
| 1468 | |
| 1469 | if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer)) |
| 1470 | { |
| 1471 | limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER); |
| 1472 | } |
| 1473 | |
| 1474 | if(arg1 == 1) |
| 1475 | { |
| 1476 | if (tx_timer_activate( |
| 1477 | &pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS) |
| 1478 | { |
| 1479 | pMac->lim.gLimBackgroundScanTerminate = TRUE; |
| 1480 | } |
| 1481 | else |
| 1482 | { |
| 1483 | pMac->lim.gLimBackgroundScanTerminate = FALSE; |
| 1484 | pMac->lim.gLimBackgroundScanDisable = false; |
| 1485 | pMac->lim.gLimForceBackgroundScanDisable = false; |
| 1486 | } |
| 1487 | } |
| 1488 | else |
| 1489 | { |
| 1490 | pMac->lim.gLimBackgroundScanTerminate = TRUE; |
| 1491 | pMac->lim.gLimBackgroundScanChannelId = 0; |
| 1492 | pMac->lim.gLimBackgroundScanDisable = true; |
| 1493 | pMac->lim.gLimForceBackgroundScanDisable = true; |
| 1494 | } |
| 1495 | return p; |
| 1496 | |
| 1497 | } |
| 1498 | |
| 1499 | static char* |
| 1500 | dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1501 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1502 | tpAniGetPEStatsReq pReq; |
| 1503 | tANI_U32 statsMask; |
| 1504 | |
| 1505 | (void) arg2; (void) arg3; (void) arg4; |
| 1506 | |
| 1507 | |
| 1508 | switch(arg1) |
| 1509 | { |
| 1510 | case 1: |
| 1511 | statsMask = PE_SUMMARY_STATS_INFO; |
| 1512 | break; |
| 1513 | case 2: |
| 1514 | statsMask = PE_GLOBAL_CLASS_A_STATS_INFO; |
| 1515 | break; |
| 1516 | case 3: |
| 1517 | statsMask = PE_GLOBAL_CLASS_B_STATS_INFO; |
| 1518 | break; |
| 1519 | case 4: |
| 1520 | statsMask = PE_GLOBAL_CLASS_C_STATS_INFO; |
| 1521 | break; |
| 1522 | case 5: |
| 1523 | statsMask = PE_PER_STA_STATS_INFO; |
| 1524 | break; |
Sushant Kaushik | 3320057 | 2015-08-05 16:46:20 +0530 | [diff] [blame] | 1525 | case 6: |
| 1526 | statsMask = PE_PER_TX_PKT_STATS_INFO; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1527 | default: |
| 1528 | return p; |
| 1529 | } |
| 1530 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1531 | pReq = vos_mem_malloc(sizeof(tAniGetPEStatsReq)); |
| 1532 | if (NULL == pReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1533 | { |
| 1534 | p += log_sprintf( pMac,p, "Error: Unable to allocate memory.\n"); |
| 1535 | return p; |
| 1536 | } |
| 1537 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1538 | vos_mem_set(pReq, sizeof(*pReq), 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1539 | |
| 1540 | pReq->msgType = eWNI_SME_GET_STATISTICS_REQ; |
| 1541 | pReq->statsMask = statsMask; |
| 1542 | pReq->staId = (tANI_U16)arg2; |
| 1543 | |
| 1544 | pMac->lim.gLimRspReqd = eANI_BOOLEAN_TRUE; |
| 1545 | limPostSmeMessage(pMac, eWNI_SME_GET_STATISTICS_REQ, (tANI_U32 *) pReq); |
| 1546 | |
| 1547 | return p; |
| 1548 | |
| 1549 | } |
| 1550 | |
| 1551 | extern char* setLOGLevel( tpAniSirGlobal pMac, char *p, tANI_U32 module, tANI_U32 level ); |
| 1552 | static char * |
| 1553 | dump_lim_set_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1554 | { |
| 1555 | p = setLOGLevel(pMac, p, arg1, arg2); |
| 1556 | return p; |
| 1557 | } |
| 1558 | |
| 1559 | static char * |
| 1560 | dump_lim_update_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1561 | { |
| 1562 | vos_trace_setLevel( arg1, arg2 ); |
| 1563 | return p; |
| 1564 | } |
| 1565 | |
| 1566 | static char * |
| 1567 | dump_lim_scan_req_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1568 | { |
| 1569 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1570 | p = sendSmeScanReq(pMac, p); |
| 1571 | return p; |
| 1572 | } |
| 1573 | |
| 1574 | static char * |
| 1575 | dump_lim_send_start_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1576 | { |
| 1577 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1578 | p = sendSmeStartBssReq(pMac, p,arg1); |
| 1579 | return p; |
| 1580 | } |
| 1581 | |
| 1582 | static char * |
| 1583 | dump_lim_send_join_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1584 | { |
| 1585 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1586 | p = sendSmeJoinReq(pMac, p); |
| 1587 | return p; |
| 1588 | } |
| 1589 | |
| 1590 | static char * |
| 1591 | dump_lim_send_disassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1592 | { |
| 1593 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1594 | |
| 1595 | p = sendSmeDisAssocReq(pMac, p, arg1 ,arg2); |
| 1596 | return p; |
| 1597 | } |
| 1598 | |
| 1599 | static char * |
| 1600 | dump_lim_stop_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1601 | { |
| 1602 | (void) arg2; (void) arg3; (void) arg4; |
| 1603 | p = sendSmeStopBssReq(pMac, p, arg1); |
| 1604 | return p; |
| 1605 | } |
| 1606 | |
| 1607 | |
| 1608 | static char * |
| 1609 | dump_lim_session_print( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1610 | { |
| 1611 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1612 | p = printSessionInfo(pMac, p); |
| 1613 | return p; |
| 1614 | } |
| 1615 | |
| 1616 | static char * |
| 1617 | dump_lim_sme_reassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1618 | { |
| 1619 | tANI_U32 sessionId = arg1; |
| 1620 | tCsrRoamModifyProfileFields modifyProfileFields; |
| 1621 | tANI_U32 roamId; |
| 1622 | |
| 1623 | (void) arg2; (void) arg3; (void) arg4; |
| 1624 | |
| 1625 | if( CSR_IS_SESSION_VALID( pMac, sessionId ) ) |
| 1626 | { |
| 1627 | if(HAL_STATUS_SUCCESS(sme_AcquireGlobalLock( &pMac->sme ))) |
| 1628 | { |
| 1629 | csrGetModifyProfileFields(pMac, sessionId, &modifyProfileFields); |
| 1630 | csrReassoc( pMac, sessionId, &modifyProfileFields, &roamId, 0); |
| 1631 | sme_ReleaseGlobalLock( &pMac->sme ); |
| 1632 | } |
| 1633 | } |
| 1634 | else |
| 1635 | { |
| 1636 | p += log_sprintf( pMac,p, "Invalid session = %d\n", sessionId); |
| 1637 | } |
| 1638 | |
| 1639 | return p; |
| 1640 | } |
| 1641 | |
| 1642 | static char * |
| 1643 | dump_lim_dot11h_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1644 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1645 | return p; |
| 1646 | } |
| 1647 | |
| 1648 | static char * |
| 1649 | dump_lim_enable_measurement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1650 | { |
| 1651 | (void) arg2; (void) arg3; (void) arg4; |
| 1652 | |
| 1653 | if (arg1) |
| 1654 | { |
| 1655 | pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_TRUE; |
| 1656 | p += log_sprintf(pMac, p, "Measurement enabled\n"); |
| 1657 | } |
| 1658 | else |
| 1659 | { |
| 1660 | pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_FALSE; |
| 1661 | p += log_sprintf(pMac, p, "Measurement disabled\n"); |
| 1662 | } |
| 1663 | |
| 1664 | return p; |
| 1665 | } |
| 1666 | |
| 1667 | static char * |
| 1668 | dump_lim_enable_quietIE( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1669 | { |
| 1670 | (void) arg2; (void) arg3; (void) arg4; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1671 | #if 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1672 | if (arg1) |
| 1673 | { |
| 1674 | pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_TRUE; |
| 1675 | p += log_sprintf(pMac, p, "QuietIE enabled\n"); |
| 1676 | } |
| 1677 | else |
| 1678 | { |
| 1679 | pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE; |
| 1680 | p += log_sprintf(pMac, p, "QuietIE disabled\n"); |
| 1681 | } |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1682 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1683 | |
| 1684 | return p; |
| 1685 | } |
| 1686 | |
| 1687 | static char * |
| 1688 | dump_lim_disable_enable_scan( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1689 | { |
| 1690 | (void) arg2; (void) arg3; (void) arg4; |
| 1691 | |
| 1692 | if (arg1) |
| 1693 | { |
| 1694 | pMac->lim.fScanDisabled = 1; |
| 1695 | p += log_sprintf(pMac, p, "Scan disabled\n"); |
| 1696 | } |
| 1697 | else |
| 1698 | { |
| 1699 | pMac->lim.fScanDisabled = 0; |
| 1700 | p += log_sprintf(pMac, p, "scan enabled\n"); |
| 1701 | } |
| 1702 | |
| 1703 | return p; |
| 1704 | } |
| 1705 | |
| 1706 | static char *finishScan(tpAniSirGlobal pMac, char *p) |
| 1707 | { |
| 1708 | tSirMsgQ msg; |
| 1709 | |
| 1710 | p += log_sprintf( pMac,p, "logDump finishScan \n"); |
| 1711 | |
| 1712 | msg.type = SIR_LIM_MIN_CHANNEL_TIMEOUT; |
| 1713 | msg.bodyval = 0; |
| 1714 | msg.bodyptr = NULL; |
| 1715 | |
| 1716 | limPostMsgApi(pMac, &msg); |
| 1717 | return p; |
| 1718 | } |
| 1719 | |
| 1720 | |
| 1721 | static char * |
| 1722 | dump_lim_info( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1723 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1724 | (void) arg2; (void) arg3; (void) arg4; |
| 1725 | p = dumpLim( pMac, p, arg1); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1726 | return p; |
| 1727 | } |
| 1728 | |
| 1729 | static char * |
| 1730 | dump_lim_finishscan_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1731 | { |
| 1732 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1733 | p = finishScan(pMac, p); |
| 1734 | return p; |
| 1735 | } |
| 1736 | |
| 1737 | static char * |
| 1738 | dump_lim_prb_rsp_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1739 | { |
| 1740 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1741 | p = testLimSendProbeRsp( pMac, p ); |
| 1742 | return p; |
| 1743 | } |
| 1744 | |
| 1745 | static char * |
| 1746 | dump_sch_beacon_trigger( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1747 | { |
| 1748 | (void) arg1; (void) arg2; (void) arg3; (void) arg4; |
| 1749 | p = triggerBeaconGen(pMac, p); |
| 1750 | return p; |
| 1751 | } |
| 1752 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1753 | static char* dump_lim_set_scan_in_powersave( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1754 | { |
| 1755 | p += log_sprintf( pMac,p, "logDump set scan in powersave to %d \n", arg1); |
| 1756 | dump_cfg_set(pMac, WNI_CFG_SCAN_IN_POWERSAVE, arg1, arg2, arg3, p); |
| 1757 | return p; |
| 1758 | } |
| 1759 | |
| 1760 | #if defined WLAN_FEATURE_VOWIFI |
| 1761 | static char * |
| 1762 | dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1763 | { |
| 1764 | tpPESession psessionEntry; |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1765 | tSirMacRadioMeasureReport *pRRMReport = |
| 1766 | vos_mem_malloc(4*sizeof(tSirMacRadioMeasureReport)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1767 | tANI_U8 num = (tANI_U8)(arg4 > 4 ? 4 : arg4); |
| 1768 | tANI_U8 i; |
| 1769 | |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1770 | if (!pRRMReport) |
| 1771 | { |
| 1772 | p += log_sprintf(pMac, p, |
| 1773 | "Unable to allocate memory to process command\n"); |
| 1774 | goto done; |
| 1775 | } |
| 1776 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1777 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 1778 | { |
| 1779 | 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] | 1780 | goto done; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1781 | } |
| 1782 | switch (arg3) |
| 1783 | { |
| 1784 | case 0: |
| 1785 | /* send two reports with incapable bit set */ |
| 1786 | pRRMReport[0].type = 6; |
| 1787 | pRRMReport[1].type = 7; |
| 1788 | limSendRadioMeasureReportActionFrame( pMac, 1, 2, &pRRMReport[0], psessionEntry->bssId, psessionEntry ); |
| 1789 | break; |
| 1790 | case 1: |
| 1791 | for ( i = 0 ; i < num ; i++ ) |
| 1792 | { |
| 1793 | pRRMReport[i].type = 5; |
| 1794 | if ( i == 3 ) |
| 1795 | pRRMReport[i].refused = 1; |
| 1796 | else |
| 1797 | pRRMReport[i].refused = 0; |
| 1798 | |
| 1799 | pRRMReport[i].report.beaconReport.regClass = 32; |
| 1800 | pRRMReport[i].report.beaconReport.channel = i; |
| 1801 | pRRMReport[i].report.beaconReport.measDuration = 23; |
| 1802 | pRRMReport[i].report.beaconReport.phyType = i << 4; //some value. |
| 1803 | pRRMReport[i].report.beaconReport.bcnProbeRsp = 1; |
| 1804 | pRRMReport[i].report.beaconReport.rsni = 10; |
| 1805 | pRRMReport[i].report.beaconReport.rcpi = 40; |
| 1806 | |
| 1807 | pRRMReport[i].report.beaconReport.bssid[0] = 0x00; |
| 1808 | pRRMReport[i].report.beaconReport.bssid[1] = 0xAA; |
| 1809 | pRRMReport[i].report.beaconReport.bssid[2] = 0xBB; |
| 1810 | pRRMReport[i].report.beaconReport.bssid[3] = 0xCC; |
| 1811 | pRRMReport[i].report.beaconReport.bssid[4] = 0x00; |
| 1812 | pRRMReport[i].report.beaconReport.bssid[5] = 0x01 << i; |
| 1813 | |
| 1814 | |
| 1815 | pRRMReport[i].report.beaconReport.antennaId = 10; |
| 1816 | pRRMReport[i].report.beaconReport.parentTSF = 0x1234; |
| 1817 | |
| 1818 | pRRMReport[i].report.beaconReport.numIes = i * 10; |
| 1819 | { |
| 1820 | tANI_U8 j; |
| 1821 | for( j = 0; j < pRRMReport[i].report.beaconReport.numIes ; j++ ) |
| 1822 | { |
| 1823 | pRRMReport[i].report.beaconReport.Ies[j] = j + i; //Junk values. |
| 1824 | } |
| 1825 | } |
| 1826 | |
| 1827 | } |
| 1828 | limSendRadioMeasureReportActionFrame( pMac, 1, num, &pRRMReport[0], psessionEntry->bssId, psessionEntry ); |
| 1829 | break; |
| 1830 | case 2: |
| 1831 | //send Neighbor request. |
| 1832 | { |
| 1833 | tSirMacNeighborReportReq neighbor; |
| 1834 | neighbor.dialogToken = 2; |
| 1835 | neighbor.ssid_present = (tANI_U8) arg4; |
| 1836 | neighbor.ssid.length = 5; |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 1837 | vos_mem_copy(neighbor.ssid.ssId, "abcde", 5); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1838 | |
| 1839 | limSendNeighborReportRequestFrame( pMac, &neighbor, psessionEntry->bssId, psessionEntry ); |
| 1840 | |
| 1841 | } |
| 1842 | |
| 1843 | break; |
| 1844 | case 3: |
| 1845 | //send Link measure report. |
| 1846 | { |
| 1847 | tSirMacLinkReport link; |
| 1848 | link.dialogToken = 4; |
| 1849 | link.txPower = 34; |
| 1850 | link.rxAntenna = 2; |
| 1851 | link.txAntenna = 1; |
| 1852 | link.rcpi = 9; |
| 1853 | link.rsni = 3; |
| 1854 | limSendLinkReportActionFrame( pMac, &link, psessionEntry->bssId, psessionEntry ); |
| 1855 | } |
| 1856 | break; |
| 1857 | default: |
| 1858 | break; |
| 1859 | } |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 1860 | |
| 1861 | done: |
| 1862 | vos_mem_free(pRRMReport); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1863 | return p; |
| 1864 | } |
| 1865 | |
| 1866 | static char * |
| 1867 | dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 1868 | { |
| 1869 | tpPESession psessionEntry; |
| 1870 | tANI_U32 status; |
| 1871 | |
| 1872 | tANI_U8 size[] = { |
| 1873 | 0x2C, |
| 1874 | 0x2F, |
| 1875 | 0x25, |
| 1876 | 0x2C, |
| 1877 | 0x1C, |
| 1878 | 0x05 |
| 1879 | }; |
| 1880 | |
| 1881 | tANI_U8 pBody[][100] = { |
| 1882 | { |
| 1883 | /*Beacon Request 0*/ |
| 1884 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1885 | //Measurement request IE |
| 1886 | 0x26, 0x25, 0x01, 0x00, |
| 1887 | //Beacon request type |
| 1888 | 0x05, |
| 1889 | //Beacon request starts here |
| 1890 | 0x0C, 0x01, 0x30, 0x00, 0x14, 0x00, 0x01, |
| 1891 | //BSSID |
| 1892 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1893 | //SSID |
| 1894 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1895 | //Reporting Condition |
| 1896 | 0x01, 0x02, 0x00, 0x00, |
| 1897 | //Reporting Detail |
| 1898 | 0x02, 0x01, 0x1, |
| 1899 | //Request IE |
| 1900 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD |
| 1901 | }, |
| 1902 | { |
| 1903 | /*Beacon Request 1*/ |
| 1904 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1905 | //Measurement request IE |
| 1906 | 0x26, 0x28, 0x01, 0x00, |
| 1907 | //Beacon request type |
| 1908 | 0x05, |
| 1909 | //Beacon request starts here |
| 1910 | 0x0C, 0xFF, 0x30, 0x00, 0x14, 0x00, 0x01, |
| 1911 | //BSSID |
| 1912 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1913 | //SSID |
| 1914 | /* 0x00, 0x08, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40, 0x41, 0x42, */ |
| 1915 | //Reporting Condition |
| 1916 | 0x01, 0x02, 0x00, 0x00, |
| 1917 | //Reporting Detail |
| 1918 | 0x02, 0x01, 0x1, |
| 1919 | //Request IE |
| 1920 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD, |
| 1921 | //AP channel report |
| 1922 | 0x33, 0x03, 0x0C, 0x01, 0x06, |
| 1923 | 0x33, 0x03, 0x0C, 0x24, 0x30, |
| 1924 | }, |
| 1925 | { |
| 1926 | /*Beacon Request 2*/ |
| 1927 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1928 | //Measurement request IE |
| 1929 | 0x26, 0x1E, 0x01, 0x00, |
| 1930 | //Beacon request type |
| 1931 | 0x05, |
| 1932 | //Beacon request starts here |
| 1933 | 0x0C, 0x00, 0x30, 0x00, 0x14, 0x00, 0x02, |
| 1934 | //BSSID |
| 1935 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1936 | //SSID |
| 1937 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1938 | //0x00, 0x08, 0x41, 0x53, 0x54, 0x2D, 0x57, 0x41, 0x50, 0x49, |
| 1939 | //Reporting Condition |
| 1940 | 0x01, 0x02, 0x00, 0x00, |
| 1941 | //Reporting Detail |
| 1942 | 0x02, 0x01, 0x0 |
| 1943 | //Request IE |
| 1944 | }, |
| 1945 | { |
| 1946 | /*Beacon Request 3*/ |
| 1947 | 0x05, 0x00, 0x01, 0x00, 0x00, |
| 1948 | //Measurement request IE |
| 1949 | 0x26, 0x25, 0x01, 0x00, |
| 1950 | //Beacon request type |
| 1951 | 0x05, |
| 1952 | //Beacon request starts here |
| 1953 | 0x0C, 0x01, 0x30, 0x00, 0x69, 0x00, 0x00, |
| 1954 | //BSSID |
| 1955 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1956 | //SSID |
| 1957 | 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31, |
| 1958 | //Reporting Condition |
| 1959 | 0x01, 0x02, 0x00, 0x00, |
| 1960 | //Reporting Detail |
| 1961 | 0x02, 0x01, 0x1, |
| 1962 | //Request IE |
| 1963 | 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD |
| 1964 | }, |
| 1965 | { |
| 1966 | /*Neighbor report*/ |
| 1967 | 0x05, 0x05, 0x01, |
| 1968 | //Measurement request IE |
| 1969 | 0x34, 0x17, |
| 1970 | //BSSID |
| 1971 | 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF, |
| 1972 | //BSSID INFOo |
| 1973 | 0xED, 0x01, 0x00, 0x00, |
| 1974 | //Reg class, channel, Phy type |
| 1975 | 0x20, 0x01, 0x02, |
| 1976 | //TSF Info |
| 1977 | 0x01, 0x04, 0x02, 0x00, 0x60, 0x00, |
| 1978 | //Condensed country |
| 1979 | 0x02, 0x02, 0x62, 0x63 |
| 1980 | }, |
| 1981 | { |
| 1982 | /* Link measurement request */ |
| 1983 | 0x05, 0x02, 0x00, |
| 1984 | //Txpower used |
| 1985 | 0x00, |
| 1986 | //Max Tx Power |
| 1987 | 0x00 |
| 1988 | } |
| 1989 | }; |
| 1990 | |
| 1991 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 1992 | { |
| 1993 | p += log_sprintf( pMac,p,"Session does not exist for given session Id \n"); |
| 1994 | return p; |
| 1995 | } |
| 1996 | switch (arg2) |
| 1997 | { |
| 1998 | case 0: |
| 1999 | case 1: |
| 2000 | case 2: |
| 2001 | case 3: |
| 2002 | { |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2003 | tDot11fRadioMeasurementRequest *frm = |
| 2004 | vos_mem_malloc(sizeof(tDot11fRadioMeasurementRequest)); |
| 2005 | if (!frm) |
| 2006 | { |
| 2007 | p += log_sprintf(pMac, p, |
| 2008 | "Unable to allocate memory to process command\n"); |
| 2009 | break; |
| 2010 | } |
| 2011 | if( (status = dot11fUnpackRadioMeasurementRequest( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2012 | p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status); |
| 2013 | else |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2014 | rrmProcessRadioMeasurementRequest( pMac, psessionEntry->bssId, frm, psessionEntry ); |
| 2015 | vos_mem_free(frm); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2016 | } |
| 2017 | break; |
| 2018 | case 4: |
| 2019 | { |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2020 | tDot11fNeighborReportResponse *frm = |
| 2021 | vos_mem_malloc(sizeof(tDot11fNeighborReportResponse)); |
| 2022 | if (!frm) |
| 2023 | { |
| 2024 | p += log_sprintf(pMac, p, |
| 2025 | "Unable to allocate memory to process command\n"); |
| 2026 | break; |
| 2027 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2028 | pBody[arg2][2] = (tANI_U8)arg3; //Dialog Token |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2029 | if( (status = dot11fUnpackNeighborReportResponse( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2030 | p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status); |
| 2031 | else |
Madan Mohan Koyyalamudi | 8f207c1 | 2012-10-30 18:18:38 -0700 | [diff] [blame] | 2032 | rrmProcessNeighborReportResponse( pMac, frm, psessionEntry ); |
| 2033 | vos_mem_free(frm); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2034 | } |
| 2035 | break; |
| 2036 | case 5: |
| 2037 | { |
| 2038 | // FIXME. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2039 | } |
| 2040 | break; |
| 2041 | case 6: |
| 2042 | { |
| 2043 | tPowerdBm localConstraint = (tPowerdBm) arg3; |
| 2044 | tPowerdBm maxTxPower = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel ); |
| 2045 | maxTxPower = VOS_MIN( maxTxPower, maxTxPower-localConstraint ); |
| 2046 | if( maxTxPower != psessionEntry->maxTxPower ) |
| 2047 | { |
| 2048 | rrmSendSetMaxTxPowerReq( pMac, maxTxPower, psessionEntry ); |
| 2049 | psessionEntry->maxTxPower = maxTxPower; |
| 2050 | } |
| 2051 | } |
| 2052 | break; |
| 2053 | default: |
| 2054 | p += log_sprintf( pMac, p, "Invalid option" ); |
| 2055 | break; |
| 2056 | } |
| 2057 | return p; |
| 2058 | } |
| 2059 | #endif |
| 2060 | |
| 2061 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 2062 | #ifdef RSSI_HACK |
| 2063 | /* This dump command is needed to set the RSSI values in TL while testing handoff. Handoff code was tested |
| 2064 | * using this dump command. Whatever the value gives as the first parameter will be considered as the average |
| 2065 | * RSSI by TL and invokes corresponding callback registered by the clients */ |
| 2066 | extern int dumpCmdRSSI; |
| 2067 | static char * |
| 2068 | dump_lim_set_tl_data_pkt_rssi( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2069 | { |
| 2070 | dumpCmdRSSI = arg1; |
| 2071 | limLog(pMac, LOGE, FL("Setting TL data packet RSSI to %d"), dumpCmdRSSI); |
| 2072 | return p; |
| 2073 | } |
| 2074 | #endif |
| 2075 | #endif |
| 2076 | |
| 2077 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 2078 | /* This command is used to trigger FT Preauthentication with the AP with BSSID below */ |
| 2079 | static char * |
| 2080 | dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2081 | { |
| 2082 | static tANI_U8 macAddr[6] = {0x00, 0xde, 0xad, 0xaf, 0xaf, 0x04}; |
| 2083 | tpPESession psessionEntry; |
| 2084 | tSirMsgQ msg; |
| 2085 | tpSirFTPreAuthReq pftPreAuthReq; |
| 2086 | tANI_U16 auth_req_len = 0; |
| 2087 | tCsrRoamConnectedProfile Profile; |
| 2088 | |
| 2089 | csrRoamCopyConnectProfile(pMac, arg2, &Profile); |
| 2090 | |
| 2091 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL) |
| 2092 | { |
| 2093 | p += log_sprintf( pMac, |
| 2094 | p,"Session does not exist usage: 363 <0> sessionid channel \n"); |
| 2095 | return p; |
| 2096 | } |
| 2097 | |
| 2098 | switch (arg1) |
| 2099 | { |
| 2100 | case 0: |
| 2101 | // Send Pre-auth event |
| 2102 | { |
| 2103 | /*----------------*/ |
| 2104 | p += log_sprintf( pMac,p, "Preparing Pre Auth Req message\n"); |
| 2105 | auth_req_len = sizeof(tSirFTPreAuthReq); |
| 2106 | |
| 2107 | pftPreAuthReq = vos_mem_malloc(auth_req_len); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2108 | if (NULL == pftPreAuthReq) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2109 | { |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2110 | p += log_sprintf( pMac,p,"Pre auth dump: AllocateMemory() failed \n"); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2111 | return p; |
| 2112 | } |
| 2113 | pftPreAuthReq->pbssDescription = vos_mem_malloc(sizeof(Profile.pBssDesc->length)+ |
| 2114 | Profile.pBssDesc->length); |
| 2115 | |
| 2116 | pftPreAuthReq->messageType = eWNI_SME_FT_PRE_AUTH_REQ; |
| 2117 | pftPreAuthReq->length = auth_req_len + sizeof(Profile.pBssDesc->length) + |
| 2118 | Profile.pBssDesc->length; |
| 2119 | pftPreAuthReq->preAuthchannelNum = 6; |
| 2120 | |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2121 | vos_mem_copy((void *) &pftPreAuthReq->currbssId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2122 | (void *)psessionEntry->bssId, 6); |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2123 | vos_mem_copy((void *) &pftPreAuthReq->preAuthbssId, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2124 | (void *)macAddr, 6); |
| 2125 | pftPreAuthReq->ft_ies_length = (tANI_U16)pMac->ft.ftSmeContext.auth_ft_ies_length; |
| 2126 | |
| 2127 | // Also setup the mac address in sme context. |
Bansidhar Gopalachari | 2f7395d | 2013-07-12 11:24:23 +0530 | [diff] [blame] | 2128 | vos_mem_copy(pMac->ft.ftSmeContext.preAuthbssId, macAddr, 6); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2129 | |
| 2130 | vos_mem_copy(pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies, |
| 2131 | pMac->ft.ftSmeContext.auth_ft_ies_length); |
| 2132 | |
| 2133 | vos_mem_copy(Profile.pBssDesc->bssId, macAddr, 6); |
| 2134 | |
| 2135 | p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n"); |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2136 | p += log_sprintf( pMac, p, "%s: length = %d\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2137 | (int)pMac->ft.ftSmeContext.auth_ft_ies_length); |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2138 | p += log_sprintf( pMac, p, "%s: length = %02x\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2139 | (int)pMac->ft.ftSmeContext.auth_ft_ies[0]); |
| 2140 | 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] | 2141 | __func__, pftPreAuthReq->ft_ies[0], |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2142 | pftPreAuthReq->ft_ies[1], pftPreAuthReq->ft_ies[2]); |
| 2143 | |
Madan Mohan Koyyalamudi | 87054ba | 2012-11-02 13:24:12 -0700 | [diff] [blame] | 2144 | p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2145 | psessionEntry->bssId[0], |
| 2146 | psessionEntry->bssId[1], psessionEntry->bssId[2]); |
Jeff Johnson | 0fe596e | 2017-09-19 08:36:48 -0700 | [diff] [blame] | 2147 | 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] | 2148 | pftPreAuthReq->currbssId[0], |
| 2149 | pftPreAuthReq->currbssId[1], |
| 2150 | pftPreAuthReq->currbssId[2], pftPreAuthReq); |
| 2151 | |
| 2152 | Profile.pBssDesc->channelId = (tANI_U8)arg3; |
| 2153 | vos_mem_copy((void *)pftPreAuthReq->pbssDescription, (void *)Profile.pBssDesc, |
| 2154 | Profile.pBssDesc->length); |
| 2155 | |
| 2156 | msg.type = eWNI_SME_FT_PRE_AUTH_REQ; |
| 2157 | msg.bodyptr = pftPreAuthReq; |
| 2158 | msg.bodyval = 0; |
| 2159 | |
| 2160 | p += log_sprintf( pMac, p, "limPostMsgApi(eWNI_SME_FT_PRE_AUTH_REQ) \n"); |
| 2161 | limPostMsgApi(pMac, &msg); |
| 2162 | } |
| 2163 | break; |
| 2164 | |
| 2165 | default: |
| 2166 | break; |
| 2167 | } |
| 2168 | return p; |
| 2169 | } |
| 2170 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2171 | static char * |
| 2172 | dump_lim_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2173 | { |
| 2174 | tpPESession psessionEntry; |
| 2175 | tANI_U8 nMode = arg2; |
| 2176 | tANI_U8 nNewChannel = arg3; |
| 2177 | tANI_U8 nCount = arg4; |
| 2178 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2179 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2180 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2181 | { |
| 2182 | p += log_sprintf( pMac, |
| 2183 | 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] | 2184 | 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] | 2185 | return p; |
| 2186 | } |
| 2187 | |
| 2188 | limSendChannelSwitchMgmtFrame( pMac, peer, nMode, nNewChannel, nCount, psessionEntry ); |
| 2189 | |
| 2190 | psessionEntry->gLimChannelSwitch.switchCount = nCount; |
| 2191 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING; |
| 2192 | psessionEntry->gLimChannelSwitch.switchMode = nMode; |
| 2193 | psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel; |
| 2194 | |
| 2195 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2196 | limSendBeaconInd(pMac, psessionEntry); |
| 2197 | |
| 2198 | return p; |
| 2199 | } |
| 2200 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2201 | #ifdef WLAN_FEATURE_11AC |
| 2202 | static char * |
| 2203 | dump_lim_vht_opmode_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2204 | { |
| 2205 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
| 2206 | tANI_U8 nMode = arg2; |
| 2207 | tpPESession psessionEntry; |
| 2208 | |
| 2209 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2210 | { |
| 2211 | p += log_sprintf( pMac, |
| 2212 | p,"Session does not exist usage: 366 <0> sessionid channel \n"); |
| 2213 | return p; |
| 2214 | } |
| 2215 | |
| 2216 | limSendVHTOpmodeNotificationFrame(pMac, peer, nMode,psessionEntry); |
| 2217 | |
| 2218 | psessionEntry->gLimOperatingMode.present = 1; |
| 2219 | psessionEntry->gLimOperatingMode.chanWidth = nMode; |
| 2220 | psessionEntry->gLimOperatingMode.rxNSS = 0; |
| 2221 | psessionEntry->gLimOperatingMode.rxNSSType = 0; |
| 2222 | |
| 2223 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2224 | limSendBeaconInd(pMac, psessionEntry); |
| 2225 | |
| 2226 | return p; |
| 2227 | } |
Madan Mohan Koyyalamudi | c6226de | 2012-09-18 16:33:31 -0700 | [diff] [blame] | 2228 | |
| 2229 | static char * |
| 2230 | dump_lim_vht_channel_switch_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2231 | { |
| 2232 | tpPESession psessionEntry; |
| 2233 | tANI_U8 nChanWidth = arg2; |
| 2234 | tANI_U8 nNewChannel = arg3; |
| 2235 | tANI_U8 ncbMode = arg4; |
| 2236 | tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
| 2237 | |
| 2238 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2239 | { |
| 2240 | p += log_sprintf( pMac, |
| 2241 | 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] | 2242 | 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] | 2243 | return p; |
| 2244 | } |
| 2245 | |
| 2246 | limSendVHTChannelSwitchMgmtFrame( pMac, peer, nChanWidth, nNewChannel, (ncbMode+1), psessionEntry ); |
| 2247 | |
| 2248 | psessionEntry->gLimChannelSwitch.switchCount = 0; |
| 2249 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING; |
| 2250 | psessionEntry->gLimChannelSwitch.switchMode = 1; |
| 2251 | psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel; |
| 2252 | psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = nChanWidth; |
| 2253 | psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,(ncbMode+1),nChanWidth); |
| 2254 | psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = 0; |
| 2255 | |
| 2256 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2257 | limSendBeaconInd(pMac, psessionEntry); |
| 2258 | |
| 2259 | return p; |
| 2260 | } |
| 2261 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2262 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2263 | static char * |
| 2264 | dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2265 | { |
| 2266 | tpPESession psessionEntry; |
| 2267 | |
| 2268 | if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL) |
| 2269 | { |
| 2270 | p += log_sprintf( pMac, |
| 2271 | 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] | 2272 | 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] | 2273 | return p; |
| 2274 | } |
| 2275 | psessionEntry->gLimChannelSwitch.switchCount = 0; |
| 2276 | psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT; |
| 2277 | psessionEntry->gLimChannelSwitch.switchMode = 0; |
| 2278 | psessionEntry->gLimChannelSwitch.primaryChannel = 0; |
| 2279 | |
| 2280 | schSetFixedBeaconFields(pMac, psessionEntry); |
| 2281 | limSendBeaconInd(pMac, psessionEntry); |
| 2282 | |
| 2283 | return p; |
| 2284 | } |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2285 | |
| 2286 | |
| 2287 | static char * |
| 2288 | dump_lim_mcc_policy_maker(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2289 | { |
| 2290 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "dump_lim_mcc_policy_maker arg = %d",arg1); |
| 2291 | |
| 2292 | if(arg1 == 0) //Disable feature completely |
| 2293 | { |
| 2294 | WDA_TrafficStatsTimerActivate(FALSE); |
| 2295 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE, |
| 2296 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2297 | { |
| 2298 | limLog( pMac, LOGE, FL("Could not get WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2299 | } |
| 2300 | } |
| 2301 | else if(arg1 == 1) //Enable feature |
| 2302 | { |
| 2303 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, |
| 2304 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2305 | { |
| 2306 | limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2307 | } |
| 2308 | } |
| 2309 | else if(arg1 == 2) //Enable feature and activate periodic timer |
| 2310 | { |
| 2311 | if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, |
| 2312 | NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE) |
| 2313 | { |
| 2314 | limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED")); |
| 2315 | } |
| 2316 | WDA_TrafficStatsTimerActivate(TRUE); |
| 2317 | } |
| 2318 | else if(arg1 == 3) //Enable only stats collection - Used for unit testing |
| 2319 | { |
| 2320 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "Enabling Traffic Stats in DTS"); |
| 2321 | WDI_DS_ActivateTrafficStats(); |
| 2322 | } |
| 2323 | else if(arg1 == 4) //Send current stats snapshot to Riva -- Used for unit testing |
| 2324 | { |
| 2325 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2326 | tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext); |
| 2327 | 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] | 2328 | if(pWDA != NULL) |
| 2329 | { |
| 2330 | WDA_TimerTrafficStatsInd(pWDA); |
| 2331 | } |
Madan Mohan Koyyalamudi | 01cba04 | 2013-01-10 21:56:05 -0800 | [diff] [blame] | 2332 | WDA_TrafficStatsTimerActivate(FALSE); |
| 2333 | ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE,NULL, eANI_BOOLEAN_FALSE); |
| 2334 | } |
| 2335 | else if (arg1 == 5) //Change the periodicity of TX stats timer |
| 2336 | { |
| 2337 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2338 | tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext); |
Kiran Kumar Lokere | a4db3dc | 2013-03-25 18:05:24 -0700 | [diff] [blame] | 2339 | 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] | 2340 | { |
| 2341 | limLog(pMac, LOGP, FL("Disable timer before changing timeout value")); |
| 2342 | } |
| 2343 | } |
| 2344 | return p; |
| 2345 | } |
| 2346 | |
Ravi Kumar Vaishnav | b765240 | 2013-01-18 19:05:15 -0800 | [diff] [blame] | 2347 | #ifdef WLANTL_DEBUG |
| 2348 | /* API to print number of pkts received based on rate index */ |
| 2349 | /* arg1 = station Id */ |
| 2350 | /* arg2 = BOOLEAN value to either or not flush the counters */ |
| 2351 | static char * |
| 2352 | dump_lim_get_pkts_rcvd_per_rate_idx( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2353 | { |
| 2354 | /* if anything other than 1, then we need not flush the counters */ |
| 2355 | if( arg2 != 1) |
| 2356 | arg2 = FALSE; |
| 2357 | |
| 2358 | WLANTLPrintPktsRcvdPerRateIdx(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2); |
| 2359 | return p; |
| 2360 | } |
| 2361 | |
| 2362 | /* API to print number of pkts received based on rssi */ |
| 2363 | /* arg1 = station Id */ |
| 2364 | /* arg2 = BOOLEAN value to either or not flush the counters */ |
| 2365 | static char * |
| 2366 | dump_lim_get_pkts_rcvd_per_rssi_values( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2367 | { |
| 2368 | /* if anything other than 1, then we need not flush the counters */ |
| 2369 | if( arg2 != 1) |
| 2370 | arg2 = FALSE; |
| 2371 | |
| 2372 | WLANTLPrintPktsRcvdPerRssi(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2); |
| 2373 | return p; |
| 2374 | } |
| 2375 | #endif |
| 2376 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 2377 | #ifdef WLAN_FEATURE_RMC |
| 2378 | |
| 2379 | static char * |
| 2380 | dump_lim_enable_rmc_data_path |
| 2381 | ( |
| 2382 | tpAniSirGlobal pMac, |
| 2383 | tANI_U32 arg1, |
| 2384 | tANI_U32 arg2, |
| 2385 | tANI_U32 arg3, |
| 2386 | tANI_U32 arg4, |
| 2387 | char *p |
| 2388 | ) |
| 2389 | { |
| 2390 | v_MACADDR_t rmcTransmitterAddr; |
| 2391 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2392 | |
| 2393 | rmcTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24); |
| 2394 | rmcTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16); |
| 2395 | rmcTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8); |
| 2396 | rmcTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF)); |
| 2397 | rmcTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24); |
| 2398 | rmcTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16); |
| 2399 | |
| 2400 | limLog(pMac, LOGE, |
| 2401 | FL("Enable RMC data path for MCAST transmitter:" MAC_ADDRESS_STR), |
| 2402 | MAC_ADDR_ARRAY( rmcTransmitterAddr.bytes)); |
| 2403 | |
| 2404 | /*Input format is in MAC address fromat for example |
| 2405 | iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMC for |
| 2406 | MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/ |
| 2407 | |
| 2408 | /*Enable TL data path*/ |
| 2409 | WLANTL_EnableRMC( pVosContext, &rmcTransmitterAddr ); |
| 2410 | |
| 2411 | return p; |
| 2412 | } |
| 2413 | |
| 2414 | static char * |
| 2415 | dump_lim_disable_rmc_data_path |
| 2416 | ( |
| 2417 | tpAniSirGlobal pMac, |
| 2418 | tANI_U32 arg1, |
| 2419 | tANI_U32 arg2, |
| 2420 | tANI_U32 arg3, |
| 2421 | tANI_U32 arg4, |
| 2422 | char *p |
| 2423 | ) |
| 2424 | { |
| 2425 | v_MACADDR_t rmcTransmitterAddr; |
| 2426 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2427 | |
| 2428 | rmcTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24); |
| 2429 | rmcTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16); |
| 2430 | rmcTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8); |
| 2431 | rmcTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF)); |
| 2432 | rmcTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24); |
| 2433 | rmcTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16); |
| 2434 | |
| 2435 | |
| 2436 | limLog(pMac, LOGE, |
| 2437 | FL("Disable RMC data path for MCAST transmitter:" MAC_ADDRESS_STR), |
| 2438 | MAC_ADDR_ARRAY( rmcTransmitterAddr.bytes)); |
| 2439 | |
| 2440 | /*Input format is in MAC address fromat for example |
| 2441 | iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMC for |
| 2442 | MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/ |
| 2443 | |
| 2444 | /*Disable TL data path*/ |
| 2445 | WLANTL_DisableRMC( pVosContext, &rmcTransmitterAddr ); |
| 2446 | |
| 2447 | return p; |
| 2448 | } |
| 2449 | |
| 2450 | static char * |
| 2451 | dump_lim_rmc_status(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2452 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2453 | { |
| 2454 | limRmcDumpStatus(pMac); |
| 2455 | return p; |
| 2456 | } |
| 2457 | |
| 2458 | static char * |
| 2459 | dump_set_mcast_dup_detect(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2460 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2461 | { |
| 2462 | v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); |
| 2463 | v_U8_t enable; |
| 2464 | |
| 2465 | enable = (tANI_U8)arg1; |
| 2466 | |
| 2467 | /* Enable or Disable Multicast Duplicate Detection */ |
| 2468 | WLANTL_SetMcastDuplicateDetection( pVosContext, enable); |
| 2469 | |
| 2470 | return p; |
| 2471 | } |
| 2472 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2473 | |
| 2474 | static char * |
| 2475 | dump_set_max_probe_req(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, |
| 2476 | tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2477 | { |
| 2478 | if ((arg1 <= 0) || (arg1 > 4)){ |
| 2479 | limLog(pMac, LOGE, |
| 2480 | FL("invalid number. valid range 1 - 4 \n")); |
| 2481 | return p; |
| 2482 | } |
| 2483 | pMac->lim.maxProbe = arg1; |
| 2484 | return p; |
| 2485 | } |
Viral Modi | f45f767 | 2013-09-06 13:29:06 -0700 | [diff] [blame] | 2486 | /* API to fill Rate Info based on mac efficiency |
| 2487 | * arg 1: mac efficiency to be used to calculate mac thorughput for a given rate index |
| 2488 | * arg 2: starting rateIndex to apply the macEfficiency to |
| 2489 | * arg 3: ending rateIndex to apply the macEfficiency to |
| 2490 | */ |
| 2491 | static char * |
| 2492 | dump_limRateInfoBasedOnMacEff(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p) |
| 2493 | { |
| 2494 | limLog(pMac, LOGE, FL("arg1 %u, arg2 %u, arg3 %u"), arg1, arg2, arg3); |
| 2495 | WDTS_FillRateInfo((tANI_U8)(arg1), (tANI_U16)(arg2), (tANI_U16)(arg3)); |
| 2496 | return p; |
| 2497 | } |
| 2498 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2499 | static tDumpFuncEntry limMenuDumpTable[] = { |
| 2500 | {0, "PE (300-499)", NULL}, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2501 | {300, "LIM: Dump state(s)/statistics <session id>", dump_lim_info}, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2502 | {301, "PE.LIM: dump TSPEC Table", dump_lim_tspec_table}, |
| 2503 | {302, "PE.LIM: dump specified TSPEC entry (id)", dump_lim_tspec_entry}, |
| 2504 | {303, "PE.LIM: dump EDCA params", dump_lim_edca_params}, |
| 2505 | {304, "PE.LIM: dump DPH table summary", dump_lim_dph_table_summary}, |
| 2506 | {305, "PE.LIM: dump link monitor stats", dump_lim_link_monitor_stats}, |
| 2507 | {306, "PE.LIM:dump Set the BAR Decline stat(arg1= 1/0 (enable/disable) arg2 =TID", dump_lim_AddBA_DeclineStat}, |
| 2508 | {307, "PE: LIM: dump CSR Send ReAssocReq", dump_lim_sme_reassoc_req}, |
| 2509 | {308, "PE:LIM: dump all 11H related data", dump_lim_dot11h_stats}, |
| 2510 | {309, "PE:LIM: dump to enable Measurement on AP", dump_lim_enable_measurement}, |
| 2511 | {310, "PE:LIM: dump to enable QuietIE on AP", dump_lim_enable_quietIE}, |
| 2512 | {311, "PE:LIM: disable/enable scan 1(disable)", dump_lim_disable_enable_scan}, |
| 2513 | {320, "PE.LIM: send sme scan request", dump_lim_scan_req_send}, |
| 2514 | |
| 2515 | |
| 2516 | /*FIXME_GEN6*/ |
| 2517 | /* This dump command is more of generic dump cmd and hence it should |
| 2518 | * be moved to logDump.c |
| 2519 | */ |
| 2520 | {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] | 2521 | {331, "PE.LIM: Send finish scan to LIM", dump_lim_finishscan_send}, |
| 2522 | {332, "PE.LIM: force probe rsp send from LIM", dump_lim_prb_rsp_send}, |
| 2523 | {333, "PE.SCH: Trigger to generate a beacon", dump_sch_beacon_trigger}, |
| 2524 | {335, "PE.LIM: set ACM flag (0..3)", dump_lim_acm_set}, |
| 2525 | {336, "PE.LIM: Send an ADDBA Req to peer MAC arg1=aid,arg2=tid, arg3=ssn", dump_lim_addba_req}, |
| 2526 | {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}, |
| 2527 | {338, "PE.LIM: Trigger a BA timeout for STA index", dump_lim_ba_timeout}, |
| 2528 | {339, "PE.LIM: List active BA session(s) for AssocID", dump_lim_list_active_ba}, |
| 2529 | {340, "PE.LIM: Set background scan flag (0-disable, 1-enable)",dump_lim_bgscan_toggle}, |
| 2530 | {341, "PE.LIM: Set link monitoring mode", dump_lim_linkmonitor_toggle}, |
| 2531 | {342, "PE.LIM: AddSta <6th byte of station Mac>", dump_lim_add_sta}, |
| 2532 | {343, "PE.LIM: DelSta <aid>", dump_lim_del_sta}, |
| 2533 | {344, "PE.LIM: Set probe respond flag", dump_lim_proberesp_toggle}, |
| 2534 | {345, "PE.LIM: set protection config bitmap", set_lim_prot_cfg}, |
| 2535 | {346, "PE:LIM: Set the Dot11 Mode", dump_lim_set_dot11_mode}, |
| 2536 | {347, "PE:Enable or Disable Protection", dump_lim_set_protection_control}, |
| 2537 | {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] | 2538 | {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] | 2539 | {350, "PE: LIM: abort scan", dump_lim_abort_scan}, |
| 2540 | {351, "PE: LIM: Start stop BG scan", dump_lim_start_stop_bg_scan}, |
| 2541 | {352, "PE: LIM: PE statistics <scanmask>", dump_lim_get_pe_statistics}, |
| 2542 | {353, "PE: LIM: Set MAC log level <Mac Module ID> <Log Level>", dump_lim_set_log_level}, |
| 2543 | {354, "PE: LIM: Set Scan in Power Save <0-disable, 1-enable>", dump_lim_set_scan_in_powersave}, |
| 2544 | {355, "PE.LIM: send sme start BSS request", dump_lim_send_start_bss_req}, |
| 2545 | {356, "PE.LIM: dump pesession info ", dump_lim_session_print}, |
| 2546 | {357, "PE.LIM: send DisAssocRequest", dump_lim_send_disassoc_req}, |
| 2547 | {358, "PE.LIM: send sme stop bss request <session ID>", dump_lim_stop_bss_req}, |
| 2548 | {359, "PE.LIM: send sme join request", dump_lim_send_join_req}, |
| 2549 | #if defined WLAN_FEATURE_VOWIFI |
| 2550 | {360, "PE.LIM: send an RRM action frame", dump_lim_send_rrm_action}, |
| 2551 | {361, "PE.LIM: unpack an RRM action frame", dump_lim_unpack_rrm_action}, |
| 2552 | #endif |
| 2553 | #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING |
| 2554 | #ifdef RSSI_HACK |
| 2555 | {362, "TL Set current RSSI", dump_lim_set_tl_data_pkt_rssi}, |
| 2556 | #endif |
| 2557 | #endif |
| 2558 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 2559 | {363, "PE.LIM: trigger pre auth/reassoc event", dump_lim_ft_event}, |
| 2560 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2561 | {364, "PE.LIM: Send a channel switch announcement", dump_lim_channel_switch_announcement}, |
| 2562 | {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] | 2563 | #ifdef WLAN_FEATURE_11AC |
| 2564 | {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] | 2565 | {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] | 2566 | {368, "PE.LIM: MCC Policy Maker", dump_lim_mcc_policy_maker}, |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 2567 | #endif |
Ravi Kumar Vaishnav | b765240 | 2013-01-18 19:05:15 -0800 | [diff] [blame] | 2568 | #ifdef WLANTL_DEBUG |
| 2569 | {369, "PE.LIM: pkts/rateIdx: iwpriv wlan0 dump 368 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rate_idx}, |
| 2570 | {370, "PE.LIM: pkts/rssi: : iwpriv wlan0 dump 369 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rssi_values}, |
| 2571 | #endif |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 2572 | #ifdef WLAN_FEATURE_RMC |
| 2573 | {371, "PE.LIM: Enable RMC data path in TL for input MCAST addr", |
| 2574 | dump_lim_enable_rmc_data_path }, |
| 2575 | {372, "PE.LIM: Disable RMC data path in TL for input MCAST addr", |
| 2576 | dump_lim_disable_rmc_data_path }, |
| 2577 | {373, "PE.LIM: Dump RMC transmitter and ruler status", dump_lim_rmc_status }, |
| 2578 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2579 | {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] | 2580 | #ifdef WLAN_FEATURE_RMC |
| 2581 | {375, "PE.LIM: Enable(1)/Disable(0) RMC duplicate detection", dump_set_mcast_dup_detect }, |
| 2582 | #endif /* WLAN_FEATURE_RMC */ |
Praveen Kumar Sirisilla | 7ea8dc9 | 2013-12-22 16:35:05 -0800 | [diff] [blame] | 2583 | {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] | 2584 | }; |
| 2585 | |
| 2586 | |
| 2587 | |
| 2588 | void limDumpInit(tpAniSirGlobal pMac) |
| 2589 | { |
| 2590 | logDumpRegisterTable( pMac, &limMenuDumpTable[0], |
| 2591 | sizeof(limMenuDumpTable)/sizeof(limMenuDumpTable[0]) ); |
| 2592 | } |
| 2593 | |
| 2594 | |
| 2595 | #endif //#if defined(ANI_LOGDUMP) |
| 2596 | |