Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame] | 23 | * Copyright (c) 2012-2013 Qualcomm Atheros, Inc. |
| 24 | * All Rights Reserved. |
| 25 | * Qualcomm Atheros Confidential and Proprietary. |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 26 | * |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame] | 27 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 28 | |
| 29 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 30 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 31 | * This file lim ProcessMessageQueue.cc contains the code |
| 32 | * for processing LIM message Queue. |
| 33 | * Author: Chandra Modumudi |
| 34 | * Date: 02/11/02 |
| 35 | * History:- |
| 36 | * Date Modified by Modification Information |
| 37 | * -------------------------------------------------------------------- |
| 38 | * |
| 39 | */ |
| 40 | #include "palTypes.h" |
| 41 | #include "wniApi.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 42 | #include "wlan_qct_wdi_ds.h" |
| 43 | #include "wlan_qct_pal_packet.h" |
| 44 | #include "wlan_qct_wda.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 45 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 46 | #include "wniCfgSta.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 47 | #include "cfgApi.h" |
| 48 | #include "sirCommon.h" |
| 49 | #include "utilsApi.h" |
| 50 | #include "limTypes.h" |
| 51 | #include "limUtils.h" |
| 52 | #include "limAssocUtils.h" |
| 53 | #include "limPropExtsUtils.h" |
| 54 | |
| 55 | #include "limAdmitControl.h" |
| 56 | #include "pmmApi.h" |
| 57 | #include "limIbssPeerMgmt.h" |
| 58 | #include "schApi.h" |
| 59 | #include "limSession.h" |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 60 | #include "limSendMessages.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 61 | |
| 62 | #if defined WLAN_FEATURE_VOWIFI |
| 63 | #include "rrmApi.h" |
| 64 | #endif |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 65 | #if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 66 | #include "ccxApi.h" |
| 67 | #endif |
| 68 | |
| 69 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 70 | #include "limFT.h" |
| 71 | #endif |
| 72 | |
| 73 | #ifdef WMM_APSD |
| 74 | #include "wmmApsd.h" |
| 75 | #endif |
| 76 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 77 | #include "vos_types.h" |
| 78 | #include "vos_packet.h" |
| 79 | #include "vos_memory.h" |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 80 | |
Katya Nigam | 3802f20 | 2013-12-16 19:27:14 +0530 | [diff] [blame] | 81 | /* This value corresponds to 500 ms */ |
| 82 | #define MAX_PROBEREQ_TIME 5000 |
| 83 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 84 | void limLogSessionStates(tpAniSirGlobal pMac); |
| 85 | |
| 86 | /** ------------------------------------------------------------- |
| 87 | \fn defMsgDecision |
| 88 | \brief The function decides whether to defer a message or not in limProcessMessage function |
| 89 | \param tpAniSirGlobal pMac |
| 90 | \param tSirMsgQ limMsg |
| 91 | \param tSirMacTspecIE *ppInfo |
| 92 | \return none |
| 93 | -------------------------------------------------------------*/ |
| 94 | |
| 95 | tANI_U8 static |
| 96 | defMsgDecision(tpAniSirGlobal pMac, tpSirMsgQ limMsg) |
| 97 | { |
| 98 | |
| 99 | |
| 100 | /* this function should not changed */ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 101 | if(pMac->lim.gLimSmeState == eLIM_SME_OFFLINE_STATE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 102 | { |
| 103 | // Defer processsing this message |
| 104 | if (limDeferMsg(pMac, limMsg) != TX_SUCCESS) |
| 105 | { |
Madan Mohan Koyyalamudi | 5695b50 | 2012-09-24 14:21:12 -0700 | [diff] [blame] | 106 | PELOGW(limLog(pMac, LOGW, FL("Unable to Defer message(0x%X) %s limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 107 | limMsg->type, limMsgStr(limMsg->type), pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 108 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
| 109 | limLogSessionStates(pMac); |
| 110 | limHandleDeferMsgError(pMac, limMsg); |
| 111 | } |
| 112 | return true; |
| 113 | } |
| 114 | |
| 115 | //When defer is requested then defer all the messages except HAL responses. |
| 116 | if((!limIsSystemInScanState(pMac)) && (true != GET_LIM_PROCESS_DEFD_MESGS(pMac)) && |
| 117 | !pMac->lim.gLimSystemInScanLearnMode) |
| 118 | { |
| 119 | if((limMsg->type != WDA_ADD_BSS_RSP) && |
| 120 | (limMsg->type != WDA_DELETE_BSS_RSP) && |
| 121 | (limMsg->type != WDA_ADD_STA_RSP) && |
| 122 | (limMsg->type != WDA_ADD_STA_SELF_RSP) && |
| 123 | (limMsg->type != WDA_DEL_STA_SELF_RSP) && |
| 124 | (limMsg->type != WDA_DELETE_STA_RSP)&& |
| 125 | (limMsg->type != WDA_SET_BSSKEY_RSP)&& |
| 126 | (limMsg->type != WDA_SET_STAKEY_RSP)&& |
| 127 | (limMsg->type != WDA_SET_STA_BCASTKEY_RSP) && |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 128 | (limMsg->type != eWNI_SME_START_REQ) && |
| 129 | (limMsg->type != WDA_AGGR_QOS_RSP) && |
| 130 | (limMsg->type != WDA_REMOVE_BSSKEY_RSP) && |
| 131 | (limMsg->type != WDA_REMOVE_STAKEY_RSP) && |
| 132 | (limMsg->type != WDA_SET_MIMOPS_RSP)&& |
| 133 | (limMsg->type != WDA_ADDBA_RSP) && |
| 134 | (limMsg->type != WDA_ENTER_BMPS_RSP) && |
| 135 | (limMsg->type != WDA_EXIT_BMPS_RSP) && |
| 136 | (limMsg->type != WDA_ENTER_IMPS_RSP) && |
| 137 | (limMsg->type != WDA_EXIT_IMPS_RSP) && |
| 138 | (limMsg->type != WDA_ENTER_UAPSD_RSP) && |
| 139 | (limMsg->type != WDA_EXIT_UAPSD_RSP) && |
| 140 | (limMsg->type != WDA_WOWL_ENTER_RSP) && |
| 141 | (limMsg->type != WDA_WOWL_EXIT_RSP) && |
| 142 | (limMsg->type != WDA_SWITCH_CHANNEL_RSP) && |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 143 | (limMsg->type != WDA_P2P_NOA_ATTR_IND) && |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 144 | (limMsg->type != WDA_P2P_NOA_START_IND) && |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 145 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 146 | (limMsg->type != WDA_START_OEM_DATA_RSP) && |
| 147 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 148 | (limMsg->type != WDA_ADD_TS_RSP)) |
| 149 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 150 | PELOG1(limLog(pMac, LOG1, FL("Defer the current message %s , gLimProcessDefdMsgs is false and system is not in scan/learn mode"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 151 | limMsgStr(limMsg->type));) |
| 152 | |
| 153 | // Defer processsing this message |
| 154 | if (limDeferMsg(pMac, limMsg) != TX_SUCCESS) |
| 155 | { |
Madan Mohan Koyyalamudi | 5695b50 | 2012-09-24 14:21:12 -0700 | [diff] [blame] | 156 | PELOGW(limLog(pMac, LOGW, FL("Unable to Defer message(0x%X) %s limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 157 | limMsg->type, limMsgStr(limMsg->type), pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 158 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
| 159 | limLogSessionStates(pMac); |
| 160 | limHandleDeferMsgError(pMac, limMsg); |
| 161 | |
| 162 | } |
| 163 | return true; |
| 164 | } |
| 165 | } |
| 166 | return false; |
| 167 | } |
| 168 | |
| 169 | /* |
| 170 | * Beacon Handling Cases: |
| 171 | * during scanning, when no session is active: |
| 172 | * handled by limHandleFramesInScanState before __limHandleBeacon call is invoked. |
| 173 | * during scanning, when any session is active, but beacon/Pr does not belong to that session, psessionEntry will be null. |
| 174 | * handled by limHandleFramesInScanState before __limHandleBeacon call is invoked. |
| 175 | * during scanning, when any session is active, and beacon/Pr belongs to one of the session, psessionEntry will not be null. |
| 176 | * handled by limHandleFramesInScanState before __limHandleBeacon call is invoked. |
| 177 | * Not scanning, no session: |
| 178 | * there should not be any beacon coming, if coming, should be dropped. |
| 179 | * Not Scanning, |
| 180 | */ |
| 181 | static void |
| 182 | __limHandleBeacon(tpAniSirGlobal pMac, tpSirMsgQ pMsg, tpPESession psessionEntry) |
| 183 | { |
| 184 | /* checking for global SME state...*/ |
| 185 | tANI_U8 *pRxPacketInfo; |
| 186 | limGetBDfromRxPacket(pMac, pMsg->bodyptr, (tANI_U32 **)&pRxPacketInfo); |
| 187 | |
| 188 | //This function should not be called if beacon is received in scan state. |
| 189 | //So not doing any checks for the global state. |
| 190 | |
| 191 | if(psessionEntry == NULL) |
| 192 | { |
| 193 | schBeaconProcess(pMac, pRxPacketInfo, NULL); |
| 194 | } |
| 195 | else if( (psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE) || |
| 196 | (psessionEntry->limSmeState == eLIM_SME_NORMAL_STATE)) |
| 197 | { |
| 198 | schBeaconProcess(pMac, pRxPacketInfo, psessionEntry); |
| 199 | } |
| 200 | else |
| 201 | limProcessBeaconFrame(pMac, pRxPacketInfo, psessionEntry); |
| 202 | |
| 203 | return; |
| 204 | } |
| 205 | |
| 206 | |
| 207 | //Fucntion prototype |
| 208 | void limProcessNormalHddMsg(tpAniSirGlobal pMac, tSirMsgQ *pLimMsg, tANI_U8 fRspReqd); |
| 209 | |
| 210 | /** |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 211 | * limDeferMsg() |
| 212 | * |
| 213 | *FUNCTION: |
| 214 | * This function is called to defer the messages received |
| 215 | * during Learn mode |
| 216 | * |
| 217 | *LOGIC: |
| 218 | * NA |
| 219 | * |
| 220 | *ASSUMPTIONS: |
| 221 | * NA |
| 222 | * |
| 223 | *NOTE: |
| 224 | * NA |
| 225 | * |
| 226 | * @param pMac - Pointer to Global MAC structure |
| 227 | * @param pMsg of type tSirMsgQ - Pointer to the message structure |
| 228 | * @return None |
| 229 | */ |
| 230 | |
| 231 | tANI_U32 |
| 232 | limDeferMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg) |
| 233 | { |
| 234 | tANI_U32 retCode = TX_SUCCESS; |
Jeff Johnson | 7716548 | 2013-03-07 08:15:44 -0800 | [diff] [blame] | 235 | |
| 236 | retCode = limWriteDeferredMsgQ(pMac, pMsg); |
| 237 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 238 | if (retCode == TX_SUCCESS) |
Jeff Johnson | 7716548 | 2013-03-07 08:15:44 -0800 | [diff] [blame] | 239 | { |
Rashmi Ramanna | 6c13a34 | 2014-01-07 11:44:07 +0530 | [diff] [blame] | 240 | limLog(pMac, LOG1, |
| 241 | FL("Deferred message(0x%X) limSmeState %d (prev sme state %d)" |
| 242 | " sysRole %d mlm state %d (prev mlm state %d)"), |
| 243 | pMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 244 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, |
| 245 | pMac->lim.gLimPrevMlmState); |
Jeff Johnson | 7716548 | 2013-03-07 08:15:44 -0800 | [diff] [blame] | 246 | MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DEFERRED));) |
| 247 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 248 | else |
Jeff Johnson | 7716548 | 2013-03-07 08:15:44 -0800 | [diff] [blame] | 249 | { |
Rashmi Ramanna | 6c13a34 | 2014-01-07 11:44:07 +0530 | [diff] [blame] | 250 | limLog(pMac, LOGE, FL("Dropped lim message (0x%X)"), pMsg->type); |
Jeff Johnson | 7716548 | 2013-03-07 08:15:44 -0800 | [diff] [blame] | 251 | MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DROPPED));) |
| 252 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 253 | |
| 254 | return retCode; |
| 255 | } /*** end limDeferMsg() ***/ |
| 256 | |
| 257 | |
| 258 | |
| 259 | /** |
| 260 | * limHandleFramesInScanState() |
| 261 | * |
| 262 | *FUNCTION: |
| 263 | * This function is called to process 802.11 frames |
| 264 | * received by LIM in scan state. |
| 265 | * |
| 266 | *LOGIC: |
| 267 | * NA |
| 268 | * |
| 269 | *ASSUMPTIONS: |
| 270 | * NA |
| 271 | * |
| 272 | *NOTE: |
| 273 | * NA |
| 274 | * |
| 275 | * @param pMac - Pointer to Global MAC structure |
| 276 | * @param limMsg - Received message |
| 277 | * @param pRxPacketInfo - Pointer to Rx packet info structure |
| 278 | * @param deferMsg - Indicates whether the frame shall be deferred |
| 279 | * @return None |
| 280 | */ |
| 281 | |
| 282 | static void |
| 283 | limHandleFramesInScanState(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pRxPacketInfo, tANI_U8 *deferMsg, tpPESession psessionEntry) |
| 284 | { |
| 285 | tSirMacFrameCtl fc; |
| 286 | tpSirMacMgmtHdr pHdr; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 287 | |
| 288 | *deferMsg = false; |
| 289 | pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo); |
| 290 | fc = pHdr->fc; |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 291 | limLog( pMac, LOG2, FL("ProtVersion %d, Type %d, Subtype %d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 292 | fc.protVer, fc.type, fc.subType ); |
| 293 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 294 | // defer all message in scan state except for Beacons and Probe Response |
| 295 | if ((fc.type == SIR_MAC_MGMT_FRAME) && (fc.subType == SIR_MAC_MGMT_BEACON)) |
| 296 | { |
| 297 | if (psessionEntry == NULL) |
| 298 | limProcessBeaconFrameNoSession(pMac, pRxPacketInfo); |
| 299 | else |
| 300 | limProcessBeaconFrame(pMac, pRxPacketInfo,psessionEntry); |
| 301 | } |
| 302 | else if ((fc.type == SIR_MAC_MGMT_FRAME) && (fc.subType == SIR_MAC_MGMT_PROBE_RSP)) |
| 303 | { |
| 304 | if (psessionEntry == NULL) |
| 305 | limProcessProbeRspFrameNoSession(pMac, pRxPacketInfo); |
| 306 | else |
| 307 | limProcessProbeRspFrame(pMac, pRxPacketInfo,psessionEntry); |
| 308 | } |
| 309 | else if ((fc.type == SIR_MAC_MGMT_FRAME) && (fc.subType == SIR_MAC_MGMT_PROBE_REQ)) |
| 310 | { |
| 311 | limProcessProbeReqFrame_multiple_BSS(pMac, pRxPacketInfo, psessionEntry); |
| 312 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 313 | else if ((fc.type == SIR_MAC_MGMT_FRAME) && (fc.subType == SIR_MAC_MGMT_ACTION)) |
| 314 | { |
| 315 | limProcessActionFrameNoSession( pMac, pRxPacketInfo); |
| 316 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 317 | else |
| 318 | { |
| 319 | *deferMsg = true; |
| 320 | return; |
| 321 | } |
| 322 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 323 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, (void *) limMsg->bodyptr); |
| 324 | return; |
| 325 | |
| 326 | } /*** end limHandleFramesInScanState() ***/ |
| 327 | |
| 328 | /** ------------------------------------------------------------ |
| 329 | \brief This function handles Unknown Unicast (A2 Index) |
| 330 | \ packets. |
| 331 | \param tpAniSirGlobal pMac Global Mac data structure |
| 332 | \param void *pRxPacketInfo Pointer to Buffer Descriptor |
| 333 | \return none |
| 334 | \ |
| 335 | \ -------------------------------------------------------------- */ |
| 336 | static void limHandleUnknownA2IndexFrames(tpAniSirGlobal pMac, void *pRxPacketInfo,tpPESession psessionEntry) |
| 337 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 338 | /* addr2 mismatch interrupt occurred this means previous |
| 339 | disassociation was not successful |
| 340 | In Volans pRxPacketInfo only contains pointer 48-bit address2 field */ |
| 341 | /*Send disassociation message again*/ |
| 342 | //Dinesh need one more arguement. |
| 343 | //limSendDisassocMgmtFrame(pMac, eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON,(tANI_U8 *) pRxPacketInfo); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 344 | //TODO: verify this |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 345 | //This could be a public action frame. |
| 346 | if( psessionEntry->limSystemRole == eLIM_P2P_DEVICE_ROLE ) |
| 347 | limProcessActionFrameNoSession(pMac, (tANI_U8 *) pRxPacketInfo); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 348 | |
| 349 | #ifdef FEATURE_WLAN_TDLS |
| 350 | { |
| 351 | tpSirMacDataHdr3a pMacHdr; |
| 352 | pMacHdr = WDA_GET_RX_MPDUHEADER3A(pRxPacketInfo); |
| 353 | |
| 354 | if (limIsGroupAddr(pMacHdr->addr2)) |
| 355 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 356 | PELOG2(limLog(pMac, LOG2, FL("Ignoring A2 Invalid Packet received for MC/BC:")); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 357 | limPrintMacAddr(pMac, pMacHdr->addr2, LOG2);) |
| 358 | |
| 359 | return; |
| 360 | } |
| 361 | /* TDLS_hklee: move down here to reject Addr2 == Group (first checking above) |
| 362 | and also checking if SystemRole == STA */ |
| 363 | if (psessionEntry->limSystemRole == eLIM_STA_ROLE) |
| 364 | { |
| 365 | /* ADD handling of Public Action Frame */ |
| 366 | LIM_LOG_TDLS(VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, \ |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 367 | ("limHandleUnknownA2IndexFrames: type=0x%x, subtype=0x%x"),pMacHdr->fc.type, pMacHdr->fc.subType)); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 368 | switch (pMacHdr->fc.type) |
| 369 | { |
| 370 | case SIR_MAC_MGMT_FRAME: |
| 371 | { |
| 372 | switch (pMacHdr->fc.subType) |
| 373 | { |
| 374 | case SIR_MAC_MGMT_ACTION: |
| 375 | { |
| 376 | limProcessActionFrame(pMac, pRxPacketInfo, psessionEntry) ; |
| 377 | break ; |
| 378 | } |
| 379 | default: |
| 380 | { |
| 381 | break ; |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | default: |
| 386 | { |
| 387 | break ; |
| 388 | } |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | #endif |
| 393 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 394 | |
| 395 | return; |
| 396 | } |
| 397 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 398 | /** |
| 399 | * limCheckMgmtRegisteredFrames() |
| 400 | * |
| 401 | *FUNCTION: |
| 402 | * This function is called to process to check if received frame match with |
| 403 | * any of the registered frame from HDD. If yes pass this frame to SME. |
| 404 | * |
| 405 | *LOGIC: |
| 406 | * |
| 407 | *ASSUMPTIONS: |
| 408 | * |
| 409 | *NOTE: |
| 410 | * |
| 411 | * @param pMac Pointer to Global MAC structure |
| 412 | * @param *pBd Pointer to the received Buffer Descriptor+payload |
| 413 | * @param *psessionEntry Pointer to session on which packet is received |
| 414 | * @return None |
| 415 | */ |
| 416 | static tANI_BOOLEAN |
| 417 | limCheckMgmtRegisteredFrames(tpAniSirGlobal pMac, tANI_U8 *pBd, |
| 418 | tpPESession psessionEntry) |
| 419 | { |
| 420 | tSirMacFrameCtl fc; |
| 421 | tpSirMacMgmtHdr pHdr; |
| 422 | tANI_U8 *pBody; |
| 423 | tpLimMgmtFrameRegistration pLimMgmtRegistration = NULL, pNext = NULL; |
| 424 | tANI_U16 frameType; |
| 425 | tANI_U16 framelen; |
| 426 | tANI_U8 type,subType; |
| 427 | tANI_BOOLEAN match = VOS_FALSE; |
| 428 | VOS_STATUS vosStatus; |
| 429 | |
| 430 | pHdr = WDA_GET_RX_MAC_HEADER(pBd); |
| 431 | fc = pHdr->fc; |
| 432 | frameType = (fc.type << 2 ) | (fc.subType << 4); |
| 433 | pBody = WDA_GET_RX_MPDU_DATA(pBd); |
| 434 | framelen = WDA_GET_RX_PAYLOAD_LEN(pBd); |
| 435 | |
| 436 | vos_list_peek_front(&pMac->lim.gLimMgmtFrameRegistratinQueue, |
| 437 | (vos_list_node_t**)&pLimMgmtRegistration); |
| 438 | |
| 439 | while(pLimMgmtRegistration != NULL) |
| 440 | { |
| 441 | type = (pLimMgmtRegistration->frameType >> 2) & 0x03; |
| 442 | subType = (pLimMgmtRegistration->frameType >> 4) & 0x0f; |
| 443 | if ( (type == SIR_MAC_MGMT_FRAME) && (fc.type == SIR_MAC_MGMT_FRAME) |
| 444 | && (subType == SIR_MAC_MGMT_RESERVED15) ) |
| 445 | { |
| 446 | limLog( pMac, LOG3, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 447 | FL("rcvd frame match with SIR_MAC_MGMT_RESERVED15")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 448 | match = VOS_TRUE; |
| 449 | break; |
| 450 | } |
| 451 | |
| 452 | if (pLimMgmtRegistration->frameType == frameType) |
| 453 | { |
| 454 | if (pLimMgmtRegistration->matchLen > 0) |
| 455 | { |
| 456 | if (pLimMgmtRegistration->matchLen <= framelen) |
| 457 | { |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 458 | if (vos_mem_compare(pLimMgmtRegistration->matchData, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 459 | pBody, pLimMgmtRegistration->matchLen)) |
| 460 | { |
Madan Mohan Koyyalamudi | c537df2 | 2012-10-22 15:07:08 -0700 | [diff] [blame] | 461 | /* found match! */ |
| 462 | match = VOS_TRUE; |
| 463 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 464 | } |
Madan Mohan Koyyalamudi | c537df2 | 2012-10-22 15:07:08 -0700 | [diff] [blame] | 465 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 466 | } |
| 467 | else |
| 468 | { |
| 469 | /* found match! */ |
| 470 | match = VOS_TRUE; |
| 471 | break; |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | vosStatus = |
| 476 | vos_list_peek_next ( &pMac->lim.gLimMgmtFrameRegistratinQueue, |
| 477 | (vos_list_node_t*) pLimMgmtRegistration, |
| 478 | (vos_list_node_t**) &pNext ); |
| 479 | pLimMgmtRegistration = pNext; |
| 480 | pNext = NULL; |
| 481 | } |
| 482 | |
| 483 | if (match) |
| 484 | { |
| 485 | limLog( pMac, LOG1, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 486 | FL("rcvd frame match with registered frame params")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 487 | |
| 488 | /* Indicate this to SME */ |
| 489 | limSendSmeMgmtFrameInd( pMac, pHdr->fc.subType, (tANI_U8*)pHdr, |
| 490 | WDA_GET_RX_PAYLOAD_LEN(pBd) + sizeof(tSirMacMgmtHdr), |
| 491 | pLimMgmtRegistration->sessionId, |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 492 | WDA_GET_RX_CH(pBd), psessionEntry, 0); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 493 | |
| 494 | if ( (type == SIR_MAC_MGMT_FRAME) && (fc.type == SIR_MAC_MGMT_FRAME) |
| 495 | && (subType == SIR_MAC_MGMT_RESERVED15) ) |
| 496 | { |
| 497 | // These packets needs to be processed by PE/SME as well as HDD. |
| 498 | // If it returns TRUE here, the packet is forwarded to HDD only. |
| 499 | match = VOS_FALSE; |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | return match; |
| 504 | } /*** end limCheckMgmtRegisteredFrames() ***/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 505 | |
| 506 | |
| 507 | /** |
| 508 | * limHandle80211Frames() |
| 509 | * |
| 510 | *FUNCTION: |
| 511 | * This function is called to process 802.11 frames |
| 512 | * received by LIM. |
| 513 | * |
| 514 | *LOGIC: |
| 515 | * NA |
| 516 | * |
| 517 | *ASSUMPTIONS: |
| 518 | * NA |
| 519 | * |
| 520 | *NOTE: |
| 521 | * NA |
| 522 | * |
| 523 | * @param pMac - Pointer to Global MAC structure |
| 524 | * @param pMsg of type tSirMsgQ - Pointer to the message structure |
| 525 | * @return None |
| 526 | */ |
| 527 | |
| 528 | static void |
| 529 | limHandle80211Frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pDeferMsg) |
| 530 | { |
| 531 | tANI_U8 *pRxPacketInfo = NULL; |
| 532 | tSirMacFrameCtl fc; |
| 533 | tpSirMacMgmtHdr pHdr=NULL; |
| 534 | tpPESession psessionEntry=NULL; |
| 535 | tANI_U8 sessionId; |
| 536 | tAniBool isFrmFt = FALSE; |
| 537 | tANI_U16 fcOffset = WLANHAL_RX_BD_HEADER_SIZE; |
| 538 | |
| 539 | *pDeferMsg= false; |
| 540 | limGetBDfromRxPacket(pMac, limMsg->bodyptr, (tANI_U32 **)&pRxPacketInfo); |
| 541 | |
| 542 | pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo); |
| 543 | isFrmFt = WDA_GET_RX_FT_DONE(pRxPacketInfo); |
| 544 | fcOffset = (v_U8_t)WDA_GET_RX_MPDU_HEADER_OFFSET(pRxPacketInfo); |
| 545 | fc = pHdr->fc; |
| 546 | |
Madan Mohan Koyyalamudi | 99af06e | 2013-08-08 02:17:17 +0530 | [diff] [blame] | 547 | #ifdef WLAN_DUMP_MGMTFRAMES |
| 548 | limLog( pMac, LOGE, FL("ProtVersion %d, Type %d, Subtype %d rateIndex=%d"), |
| 549 | fc.protVer, fc.type, fc.subType, |
| 550 | WDA_GET_RX_MAC_RATE_IDX(pRxPacketInfo)); |
| 551 | VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, pHdr, |
| 552 | WDA_GET_RX_MPDU_HEADER_LEN(pRxPacketInfo)); |
| 553 | #endif |
| 554 | |
Tushnim Bhattacharyya | ed4d0c2 | 2014-01-30 11:56:44 -0800 | [diff] [blame] | 555 | if (pMac->fEnableDebugLog & 0x1) { |
| 556 | if ((fc.type == SIR_MAC_MGMT_FRAME) && |
| 557 | (fc.subType != SIR_MAC_MGMT_PROBE_REQ) && |
| 558 | (fc.subType != SIR_MAC_MGMT_PROBE_RSP) && |
| 559 | (fc.subType != SIR_MAC_MGMT_BEACON)) |
| 560 | { |
| 561 | limLog(pMac, LOGE, FL("RX MGMT - Type %hu, SubType %hu"), |
| 562 | fc.type, fc.subType); |
| 563 | } |
| 564 | } |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 565 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 566 | if ( WDA_GET_ROAMCANDIDATEIND(pRxPacketInfo)) |
| 567 | { |
| 568 | limLog( pMac, LOG2, FL("Notify SME with candidate ind")); |
| 569 | //send a session 0 for now - TBD |
| 570 | limSendSmeCandidateFoundInd(pMac, 0); |
| 571 | goto end; |
| 572 | } |
| 573 | if (WDA_GET_OFFLOADSCANLEARN(pRxPacketInfo)) |
| 574 | { |
| 575 | if (fc.subType == SIR_MAC_MGMT_BEACON) |
| 576 | { |
| 577 | limLog( pMac, LOG2, FL("Save this beacon in LFR cache")); |
| 578 | __limHandleBeacon(pMac, limMsg, NULL); |
| 579 | } |
| 580 | else if (fc.subType == SIR_MAC_MGMT_PROBE_RSP) |
| 581 | { |
| 582 | limLog( pMac, LOG2, FL("Save this probe rsp in LFR cache")); |
| 583 | limProcessProbeRspFrameNoSession(pMac, pRxPacketInfo); |
| 584 | } |
| 585 | else |
| 586 | { |
| 587 | limLog( pMac, LOGE, FL("Wrong frame Type %d, Subtype %d for LFR"), |
| 588 | fc.type, fc.subType); |
| 589 | } |
| 590 | goto end; |
| 591 | } |
| 592 | #endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 593 | #ifdef FEATURE_WLAN_CCX |
| 594 | if (fc.type == SIR_MAC_DATA_FRAME && isFrmFt) |
| 595 | { |
| 596 | #if 0 // CCX TBD Need to PORT |
| 597 | tpSirMacDot3Hdr pDataFrmHdr; |
| 598 | |
| 599 | pDataFrmHdr = (tpSirMacDot3Hdr)((tANI_U8 *)pBD+ WLANHAL_RX_BD_GET_MPDU_H_OFFSET(pBD)); |
| 600 | if((psessionEntry = peFindSessionByBssid(pMac,pDataFrmHdr->sa,&sessionId))== NULL) |
| 601 | { |
| 602 | limLog( pMac, LOGE, FL("Session not found for Frm type %d, subtype %d, SA: "), fc.type, fc.subType); |
| 603 | limPrintMacAddr(pMac, pDataFrmHdr->sa, LOGE); |
| 604 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pBD, limMsg->bodyptr); |
| 605 | return; |
| 606 | } |
| 607 | |
| 608 | if (!psessionEntry->isCCXconnection) |
| 609 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 610 | limLog( pMac, LOGE, FL("LIM received Type %d, Subtype %d in Non CCX connection"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 611 | fc.type, fc.subType); |
| 612 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pBD, limMsg->bodyptr); |
| 613 | return; |
| 614 | } |
| 615 | limLog( pMac, LOGE, FL("Processing IAPP Frm from SA:")); |
| 616 | limPrintMacAddr(pMac, pDataFrmHdr->sa, LOGE); |
| 617 | #else |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 618 | printk("%s: Need to port handling of IAPP frames to PRIMA for CCX", __func__); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 619 | #endif |
| 620 | |
| 621 | |
| 622 | } else |
| 623 | #endif |
| 624 | /* Added For BT-AMP Support */ |
| 625 | if((psessionEntry = peFindSessionByBssid(pMac,pHdr->bssId,&sessionId))== NULL) |
| 626 | { |
| 627 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 628 | if (fc.subType == SIR_MAC_MGMT_AUTH) |
| 629 | { |
| 630 | #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG |
Varun Reddy Yeturu | f68abd6 | 2013-02-11 14:05:06 -0800 | [diff] [blame] | 631 | limLog( pMac, LOG1, FL("ProtVersion %d, Type %d, Subtype %d rateIndex=%d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 632 | fc.protVer, fc.type, fc.subType, WDA_GET_RX_MAC_RATE_IDX(pRxPacketInfo)); |
Varun Reddy Yeturu | f68abd6 | 2013-02-11 14:05:06 -0800 | [diff] [blame] | 633 | limPrintMacAddr(pMac, pHdr->bssId, LOG1); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 634 | #endif |
| 635 | if (limProcessAuthFrameNoSession(pMac, pRxPacketInfo, limMsg->bodyptr) == eSIR_SUCCESS) |
| 636 | { |
| 637 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, limMsg->bodyptr); |
| 638 | return; |
| 639 | } |
| 640 | } |
| 641 | #endif |
| 642 | if((fc.subType != SIR_MAC_MGMT_PROBE_RSP )&& |
| 643 | (fc.subType != SIR_MAC_MGMT_BEACON)&& |
| 644 | (fc.subType != SIR_MAC_MGMT_PROBE_REQ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 645 | && (fc.subType != SIR_MAC_MGMT_ACTION ) //Public action frame can be received from non-associated stations. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 646 | ) |
| 647 | { |
| 648 | |
| 649 | if((psessionEntry = peFindSessionByPeerSta(pMac,pHdr->sa,&sessionId))== NULL) |
| 650 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 651 | limLog(pMac, LOG1, FL("session does not exist for given bssId")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 652 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, limMsg->bodyptr); |
| 653 | return; |
| 654 | } |
Padma, Santhosh Kumar | 2b47ca8 | 2014-01-03 16:57:27 +0530 | [diff] [blame] | 655 | else |
| 656 | limLog(pMac,LOG1,"SessionId:%d Session Exist for given Bssid", |
| 657 | psessionEntry->peSessionId); |
Gopichand Nakkala | 6265d6f | 2013-03-20 23:32:50 +0530 | [diff] [blame] | 658 | } |
| 659 | // For p2p resp frames search for valid session with DA as |
| 660 | // BSSID will be SA and session will be present with DA only |
| 661 | if(fc.subType == SIR_MAC_MGMT_ACTION ) |
| 662 | { |
| 663 | psessionEntry = peFindSessionByBssid(pMac,pHdr->da,&sessionId); |
| 664 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 665 | } |
| 666 | |
| 667 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 668 | /* Check if frame is registered by HDD */ |
| 669 | if(limCheckMgmtRegisteredFrames(pMac, pRxPacketInfo, psessionEntry)) |
| 670 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 671 | limLog( pMac, LOG1, FL("Received frame is passed to SME")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 672 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, limMsg->bodyptr); |
| 673 | return; |
| 674 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 675 | |
| 676 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 677 | |
| 678 | if (fc.protVer != SIR_MAC_PROTOCOL_VERSION) |
| 679 | { // Received Frame with non-zero Protocol Version |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 680 | limLog(pMac, LOGE, FL("Unexpected frame with protVersion %d received"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 681 | fc.protVer); |
| 682 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, (void *) limMsg->bodyptr); |
| 683 | #ifdef WLAN_DEBUG |
| 684 | pMac->lim.numProtErr++; |
| 685 | #endif |
| 686 | return; |
| 687 | } |
| 688 | |
Gopichand Nakkala | 2c231c8 | 2013-06-11 17:49:16 +0530 | [diff] [blame] | 689 | if (!pMac->fScanOffload) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 690 | { |
Gopichand Nakkala | 2c231c8 | 2013-06-11 17:49:16 +0530 | [diff] [blame] | 691 | if (limIsSystemInScanState(pMac)) |
| 692 | { |
| 693 | limHandleFramesInScanState(pMac, limMsg, pRxPacketInfo, pDeferMsg, psessionEntry); |
| 694 | return; |
| 695 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 696 | } |
| 697 | |
| 698 | /* Chance of crashing : to be done BT-AMP ........happens when broadcast probe req is received */ |
| 699 | |
| 700 | #if 0 |
| 701 | if (psessionEntry->limSystemRole == eLIM_UNKNOWN_ROLE) { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 702 | limLog( pMac, LOGW, FL( "gLimSystemRole is %d. Exiting..." ),psessionEntry->limSystemRole ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 703 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, (void *) limMsg->bodyptr); |
| 704 | |
| 705 | #ifdef WLAN_DEBUG |
| 706 | pMac->lim.numProtErr++; |
| 707 | #endif |
| 708 | return; |
| 709 | } |
| 710 | #endif //HACK to continue scanning |
| 711 | |
| 712 | |
| 713 | #ifdef WLAN_DEBUG |
| 714 | pMac->lim.numMAC[fc.type][fc.subType]++; |
| 715 | #endif |
| 716 | |
| 717 | switch (fc.type) |
| 718 | { |
| 719 | case SIR_MAC_MGMT_FRAME: |
| 720 | { |
| 721 | #if 0 //TBD-RAJESH fix this |
| 722 | if (limIsReassocInProgress( pMac,psessionEntry) && (fc.subType != SIR_MAC_MGMT_DISASSOC) && |
| 723 | (fc.subType != SIR_MAC_MGMT_DEAUTH) && (fc.subType != SIR_MAC_MGMT_REASSOC_RSP)) |
| 724 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 725 | limLog(pMac, LOGE, FL("Frame with Type - %d, Subtype - %d received in ReAssoc Wait state, dropping..."), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 726 | fc.type, fc.subType); |
| 727 | return; |
| 728 | } |
| 729 | #endif //HACK to continue scanning |
| 730 | // Received Management frame |
| 731 | switch (fc.subType) |
| 732 | { |
| 733 | case SIR_MAC_MGMT_ASSOC_REQ: |
| 734 | // Make sure the role supports Association |
| 735 | if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 736 | || (psessionEntry->limSystemRole == eLIM_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 737 | ) |
| 738 | limProcessAssocReqFrame(pMac, pRxPacketInfo, LIM_ASSOC, psessionEntry); |
| 739 | |
| 740 | else |
| 741 | { |
| 742 | // Unwanted messages - Log error |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 743 | limLog(pMac, LOGE, FL("unexpected message received %X"),limMsg->type); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 744 | limPrintMsgName(pMac, LOGE, limMsg->type); |
| 745 | } |
| 746 | break; |
| 747 | |
| 748 | case SIR_MAC_MGMT_ASSOC_RSP: |
| 749 | limProcessAssocRspFrame(pMac, pRxPacketInfo, LIM_ASSOC,psessionEntry); |
| 750 | break; |
| 751 | |
| 752 | case SIR_MAC_MGMT_REASSOC_REQ: |
| 753 | // Make sure the role supports Reassociation |
| 754 | if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 755 | || (psessionEntry->limSystemRole == eLIM_AP_ROLE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 756 | ){ |
| 757 | limProcessAssocReqFrame(pMac, pRxPacketInfo, LIM_REASSOC, psessionEntry); |
| 758 | } |
| 759 | else |
| 760 | { |
| 761 | // Unwanted messages - Log error |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 762 | limLog(pMac, LOGE, FL("unexpected message received %X"),limMsg->type); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 763 | limPrintMsgName(pMac, LOGE, limMsg->type); |
| 764 | } |
| 765 | break; |
| 766 | |
| 767 | case SIR_MAC_MGMT_REASSOC_RSP: |
| 768 | limProcessAssocRspFrame(pMac, pRxPacketInfo, LIM_REASSOC,psessionEntry); |
| 769 | break; |
| 770 | |
| 771 | case SIR_MAC_MGMT_PROBE_REQ: |
| 772 | limProcessProbeReqFrame_multiple_BSS(pMac, pRxPacketInfo,psessionEntry); |
| 773 | break; |
| 774 | |
| 775 | case SIR_MAC_MGMT_PROBE_RSP: |
| 776 | if(psessionEntry == NULL) |
| 777 | limProcessProbeRspFrameNoSession(pMac, pRxPacketInfo); |
| 778 | else |
| 779 | limProcessProbeRspFrame(pMac, pRxPacketInfo, psessionEntry); |
| 780 | break; |
| 781 | |
| 782 | case SIR_MAC_MGMT_BEACON: |
| 783 | __limHandleBeacon(pMac, limMsg,psessionEntry); |
| 784 | break; |
| 785 | |
| 786 | case SIR_MAC_MGMT_DISASSOC: |
| 787 | limProcessDisassocFrame(pMac, pRxPacketInfo,psessionEntry); |
| 788 | break; |
| 789 | |
| 790 | case SIR_MAC_MGMT_AUTH: |
| 791 | limProcessAuthFrame(pMac, pRxPacketInfo,psessionEntry); |
| 792 | break; |
| 793 | |
| 794 | case SIR_MAC_MGMT_DEAUTH: |
| 795 | limProcessDeauthFrame(pMac, pRxPacketInfo,psessionEntry); |
| 796 | break; |
| 797 | |
| 798 | case SIR_MAC_MGMT_ACTION: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 799 | if(psessionEntry == NULL) |
| 800 | limProcessActionFrameNoSession(pMac, pRxPacketInfo); |
| 801 | else |
| 802 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 803 | if (WDA_GET_RX_UNKNOWN_UCAST(pRxPacketInfo)) |
| 804 | limHandleUnknownA2IndexFrames(pMac, pRxPacketInfo,psessionEntry); |
| 805 | else |
| 806 | limProcessActionFrame(pMac, pRxPacketInfo,psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 807 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 808 | break; |
| 809 | default: |
| 810 | // Received Management frame of 'reserved' subtype |
| 811 | break; |
| 812 | } // switch (fc.subType) |
| 813 | |
| 814 | } |
| 815 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 816 | case SIR_MAC_DATA_FRAME: |
| 817 | { |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 818 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 819 | /* |
| 820 | * if we reach here, following cases are possible. |
| 821 | * Possible cases: a) if frame translation is disabled. |
| 822 | * b) Some frame with ADRR2 filter enabled may come |
| 823 | * here. |
| 824 | */ |
| 825 | tANI_U8 *dataOffset = WDA_GET_RX_MPDU_DATA(pRxPacketInfo); |
| 826 | tANI_U8 *rfc1042Hdr = (tANI_U8 *)(dataOffset + RFC1042_HDR_LENGTH) ; |
| 827 | tANI_U16 ethType = GET_BE16(rfc1042Hdr) ; |
| 828 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 829 | ("TDLS frame with 80211 Header")) ; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 830 | if(ETH_TYPE_89_0d == ethType) |
| 831 | { |
| 832 | tANI_U8 payloadType = (rfc1042Hdr + ETH_TYPE_LEN)[0] ; |
| 833 | if(PAYLOAD_TYPE_TDLS == payloadType) |
| 834 | { |
| 835 | limProcessTdlsFrame(pMac, (tANI_U32*)pRxPacketInfo) ; |
| 836 | } |
| 837 | } |
| 838 | #endif |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 839 | #if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 840 | /* We accept data frame (IAPP frame) only if Session is |
| 841 | * present and ccx connection is established on that |
| 842 | * session |
| 843 | */ |
| 844 | if (psessionEntry && psessionEntry->isCCXconnection) { |
| 845 | limProcessIappFrame(pMac, pRxPacketInfo, psessionEntry); |
| 846 | } |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 847 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 848 | } |
| 849 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 850 | default: |
| 851 | // Received frame of type 'reserved' |
| 852 | break; |
| 853 | |
| 854 | } // switch (fc.type) |
| 855 | |
Varun Reddy Yeturu | d0a3f25 | 2013-04-15 21:58:13 -0700 | [diff] [blame] | 856 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 857 | end: |
| 858 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 859 | limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, (void *) limMsg->bodyptr) ; |
| 860 | return; |
| 861 | } /*** end limHandle80211Frames() ***/ |
| 862 | |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 863 | /** |
| 864 | * limSendStopScanOffloadReq() |
| 865 | * |
| 866 | *FUNCTION: |
| 867 | * This function will be called to abort the ongoing offloaded scan |
| 868 | * request. |
| 869 | * |
| 870 | * |
| 871 | *NOTE: |
| 872 | * |
| 873 | * @param pMac Pointer to Global MAC structure |
| 874 | * @return eHAL_STATUS_SUCCESS or eHAL_STATUS_FAILURE |
| 875 | */ |
| 876 | eHalStatus limSendStopScanOffloadReq(tpAniSirGlobal pMac, tANI_U8 SessionId) |
| 877 | { |
| 878 | tSirMsgQ msg; |
| 879 | tSirRetStatus rc = eSIR_SUCCESS; |
| 880 | tAbortScanParams *pAbortScanParams; |
| 881 | |
Kiet Lam | b123319 | 2013-11-28 13:38:20 +0530 | [diff] [blame] | 882 | pAbortScanParams = vos_mem_malloc(sizeof(tAbortScanParams)); |
| 883 | if (NULL == pAbortScanParams) |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 884 | { |
| 885 | limLog(pMac, LOGP, FL("Memory allocation failed for AbortScanParams")); |
| 886 | return eHAL_STATUS_FAILURE; |
| 887 | } |
| 888 | |
| 889 | pAbortScanParams->SessionId = SessionId; |
| 890 | msg.type = WDA_STOP_SCAN_OFFLOAD_REQ; |
| 891 | msg.bodyptr = pAbortScanParams; |
| 892 | msg.bodyval = 0; |
| 893 | |
| 894 | rc = wdaPostCtrlMsg(pMac, &msg); |
| 895 | if (rc != eSIR_SUCCESS) |
| 896 | { |
Jeff Johnson | 0f4d0bc | 2013-11-03 17:48:50 -0800 | [diff] [blame] | 897 | limLog(pMac, LOGE, FL("wdaPostCtrlMsg() return failure")); |
Kiet Lam | b123319 | 2013-11-28 13:38:20 +0530 | [diff] [blame] | 898 | vos_mem_free(pAbortScanParams); |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 899 | return eHAL_STATUS_FAILURE; |
| 900 | } |
| 901 | |
Rashmi Ramanna | 6c13a34 | 2014-01-07 11:44:07 +0530 | [diff] [blame] | 902 | limLog(pMac, LOG1, FL("Abort ongoing offload scan.")); |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 903 | return eHAL_STATUS_SUCCESS; |
| 904 | |
| 905 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 906 | |
| 907 | /** |
| 908 | * limProcessAbortScanInd() |
| 909 | * |
| 910 | *FUNCTION: |
| 911 | * This function is called from HDD to abort the scan which is presently being run |
| 912 | * |
| 913 | * |
| 914 | *NOTE: |
| 915 | * |
| 916 | * @param pMac Pointer to Global MAC structure |
| 917 | * @param *pMsgBuf A pointer to the SME message buffer |
| 918 | * @return None |
| 919 | */ |
| 920 | void |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 921 | limProcessAbortScanInd(tpAniSirGlobal pMac, tANI_U8 SessionId) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 922 | { |
| 923 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT |
| 924 | limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_ABORT_IND_EVENT, NULL, 0, 0); |
| 925 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 926 | |
| 927 | /* Deactivate the gLimBackgroundScanTimer as part of the abort scan. |
| 928 | * SME should send WNI_CFG_BACKGROUND_SCAN_PERIOD indication |
| 929 | * to start the background scan again |
| 930 | */ |
Madan Mohan Koyyalamudi | 8b7f1e6 | 2012-10-05 14:56:51 -0700 | [diff] [blame] | 931 | PELOG2(limLog(pMac, LOG2, FL("Processing AbortScan Ind"));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 932 | |
| 933 | limAbortBackgroundScan(pMac); |
| 934 | |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 935 | if (pMac->fScanOffload) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 936 | { |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 937 | /* send stop scan cmd to fw if scan offload is enabled. */ |
| 938 | limSendStopScanOffloadReq(pMac, SessionId); |
| 939 | } |
| 940 | else |
| 941 | { |
| 942 | /* Abort the scan if its running, else just return */ |
| 943 | if(limIsSystemInScanState(pMac)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 944 | { |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 945 | if( (eLIM_HAL_INIT_SCAN_WAIT_STATE == pMac->lim.gLimHalScanState ) || |
| 946 | (eLIM_HAL_START_SCAN_WAIT_STATE == pMac->lim.gLimHalScanState ) || |
| 947 | (eLIM_HAL_END_SCAN_WAIT_STATE == pMac->lim.gLimHalScanState ) || |
| 948 | (eLIM_HAL_FINISH_SCAN_WAIT_STATE == pMac->lim.gLimHalScanState) ) |
| 949 | { |
| 950 | //Simply signal we need to abort |
| 951 | limLog( pMac, LOGW, FL(" waiting for HAL, simply signal abort gLimHalScanState = %d"), pMac->lim.gLimHalScanState ); |
| 952 | pMac->lim.abortScan = 1; |
| 953 | } |
| 954 | else |
| 955 | { |
| 956 | //Force abort |
| 957 | limLog( pMac, LOGW, FL(" Force aborting scan") ); |
| 958 | pMac->lim.abortScan = 0; |
| 959 | limDeactivateAndChangeTimer(pMac, eLIM_MIN_CHANNEL_TIMER); |
| 960 | limDeactivateAndChangeTimer(pMac, eLIM_MAX_CHANNEL_TIMER); |
| 961 | //Set the resume channel to Any valid channel (invalid). |
| 962 | //This will instruct HAL to set it to any previous valid channel. |
| 963 | peSetResumeChannel(pMac, 0, 0); |
| 964 | limSendHalFinishScanReq(pMac, eLIM_HAL_FINISH_SCAN_WAIT_STATE); |
| 965 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 966 | } |
| 967 | } |
| 968 | return; |
| 969 | } |
| 970 | |
| 971 | /** |
| 972 | * limMessageProcessor |
| 973 | * |
| 974 | *FUNCTION: |
| 975 | * Wrapper function for limProcessMessages when handling messages received by LIM. |
| 976 | * Could either defer messages or process them. |
| 977 | * @param pMac Pointer to Global MAC structure |
| 978 | * @param limMsg Received LIM message |
| 979 | * @return None |
| 980 | */ |
| 981 | |
| 982 | void limMessageProcessor(tpAniSirGlobal pMac, tpSirMsgQ limMsg) |
| 983 | { |
| 984 | if (eLIM_MLM_OFFLINE_STATE == pMac->lim.gLimMlmState) |
| 985 | { |
| 986 | peFreeMsg(pMac, limMsg); |
| 987 | return; |
| 988 | } |
| 989 | |
| 990 | if (!defMsgDecision(pMac, limMsg)) |
| 991 | { |
| 992 | limProcessMessages(pMac, limMsg); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 993 | // process deferred message queue if allowed |
| 994 | { |
| 995 | if ( (! (pMac->lim.gLimAddtsSent)) |
| 996 | && |
| 997 | (! (limIsSystemInScanState(pMac))) |
| 998 | ) |
| 999 | { |
| 1000 | if (true == GET_LIM_PROCESS_DEFD_MESGS(pMac)) |
| 1001 | limProcessDeferredMessageQueue(pMac); |
| 1002 | } |
| 1003 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1004 | } |
| 1005 | } |
| 1006 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1007 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 1008 | |
| 1009 | void limOemDataRspHandleResumeLinkRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* mlmOemDataRsp) |
| 1010 | { |
| 1011 | if(status != eHAL_STATUS_SUCCESS) |
| 1012 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1013 | limLog(pMac, LOGE, FL("OEM Data Rsp failed to get the response for resume link")); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1014 | } |
| 1015 | |
| 1016 | if(NULL != pMac->lim.gpLimMlmOemDataReq) |
| 1017 | { |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1018 | vos_mem_free(pMac->lim.gpLimMlmOemDataReq); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1019 | pMac->lim.gpLimMlmOemDataReq = NULL; |
| 1020 | } |
| 1021 | |
| 1022 | //"Failure" status doesn't mean that Oem Data Rsp did not happen |
| 1023 | //and hence we need to respond to upper layers. Only Resume link is failed, but |
| 1024 | //we got the oem data response already. |
| 1025 | //Post the meessage to MLM |
| 1026 | limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)(mlmOemDataRsp)); |
| 1027 | |
| 1028 | return; |
| 1029 | } |
| 1030 | |
| 1031 | void limProcessOemDataRsp(tpAniSirGlobal pMac, tANI_U32* body) |
| 1032 | { |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1033 | tpLimMlmOemDataRsp mlmOemDataRsp = NULL; |
| 1034 | tpStartOemDataRsp oemDataRsp = NULL; |
| 1035 | |
| 1036 | //Process all the messages for the lim queue |
| 1037 | SET_LIM_PROCESS_DEFD_MESGS(pMac, true); |
| 1038 | |
| 1039 | oemDataRsp = (tpStartOemDataRsp)(body); |
| 1040 | |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1041 | mlmOemDataRsp = vos_mem_malloc(sizeof(tLimMlmOemDataRsp)); |
| 1042 | if ( NULL == mlmOemDataRsp ) |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1043 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1044 | limLog(pMac, LOGP, FL("could not allocate memory for mlmOemDataRsp")); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1045 | return; |
| 1046 | } |
| 1047 | |
| 1048 | //copy the memory into tLimMlmOemDataRsp and free the tStartOemDataRsp |
| 1049 | //the structures tStartOemDataRsp and tLimMlmOemDataRsp have the same structure |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1050 | vos_mem_copy((void*)(mlmOemDataRsp), (void*)(oemDataRsp), |
| 1051 | sizeof(tLimMlmOemDataRsp)); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1052 | |
| 1053 | //Now free the incoming memory |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1054 | vos_mem_free(oemDataRsp); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1055 | |
| 1056 | limResumeLink(pMac, limOemDataRspHandleResumeLinkRsp, (tANI_U32*)mlmOemDataRsp); |
| 1057 | |
| 1058 | return; |
| 1059 | } |
| 1060 | |
| 1061 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1062 | |
Katya Nigam | 3802f20 | 2013-12-16 19:27:14 +0530 | [diff] [blame] | 1063 | static tANI_BOOLEAN limAgeOutProbeReq( tpAniSirGlobal pMac, tpSirMsgQ limMsg, |
| 1064 | vos_pkt_t *pVosPkt ) |
| 1065 | { |
| 1066 | tANI_U8 *pRxPacketInfo = NULL; |
| 1067 | tSirMacFrameCtl fc; |
| 1068 | tpSirMacMgmtHdr pHdr=NULL; |
| 1069 | tANI_BOOLEAN match = VOS_FALSE; |
| 1070 | |
| 1071 | limGetBDfromRxPacket(pMac, limMsg->bodyptr, (tANI_U32 **)&pRxPacketInfo); |
| 1072 | pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo); |
| 1073 | fc = pHdr->fc; |
| 1074 | if ( fc.subType == SIR_MAC_MGMT_PROBE_REQ ) |
| 1075 | { |
| 1076 | if( vos_timer_get_system_ticks() - pVosPkt->timestamp >= MAX_PROBEREQ_TIME ) |
| 1077 | { |
| 1078 | // drop packet |
| 1079 | limLog(pMac, LOGE, |
| 1080 | FL("Dropping Aged Out probe requests. Peer MAC is "MAC_ADDRESS_STR), |
| 1081 | MAC_ADDR_ARRAY(pHdr->sa)); |
| 1082 | |
| 1083 | vos_pkt_return_packet(pVosPkt); |
| 1084 | match = VOS_TRUE; |
| 1085 | } |
| 1086 | } |
| 1087 | return match; |
| 1088 | } |
| 1089 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1090 | |
| 1091 | /** |
| 1092 | * limProcessMessages |
| 1093 | * |
| 1094 | *FUNCTION: |
| 1095 | * This function is called by limProcessMessageQueue function. This |
| 1096 | * function processes messages received by LIM. |
| 1097 | * |
| 1098 | *LOGIC: |
| 1099 | * Depending on the message type, corresponding function will be |
| 1100 | * called, for example limProcessSmeMessages() will be called to |
| 1101 | * process SME messages received from HDD/Upper layer software module. |
| 1102 | * |
| 1103 | *ASSUMPTIONS: |
| 1104 | * NA |
| 1105 | * |
| 1106 | *NOTE: |
| 1107 | * NA |
| 1108 | * |
| 1109 | * @param pMac Pointer to Global MAC structure |
| 1110 | * @param limMsg Received LIM message |
| 1111 | * @return None |
| 1112 | */ |
| 1113 | |
| 1114 | void |
| 1115 | limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg) |
| 1116 | { |
| 1117 | tANI_U8 deferMsg = false; |
| 1118 | tLinkStateParams *linkStateParams; |
| 1119 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 1120 | tpPESession pSession; |
| 1121 | #endif |
| 1122 | #if defined(ANI_DVT_DEBUG) |
| 1123 | tSirMsgQ msgQ; |
| 1124 | #endif |
| 1125 | if(pMac->gDriverType == eDRIVER_TYPE_MFG) |
| 1126 | { |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1127 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1128 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1129 | return; |
| 1130 | } |
| 1131 | #ifdef WLAN_DEBUG |
| 1132 | pMac->lim.numTot++; |
| 1133 | #endif |
| 1134 | |
| 1135 | |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1136 | PELOG3(limLog(pMac, LOG3, FL("rcvd msgType = %s, sme state = %s, mlm state = %s"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1137 | limMsgStr(limMsg->type), limSmeStateStr(pMac->lim.gLimSmeState), |
| 1138 | limMlmStateStr(pMac->lim.gLimMlmState));) |
| 1139 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1140 | MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(limMsg->type, LIM_MSG_PROCESSED));) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1141 | |
| 1142 | switch (limMsg->type) |
| 1143 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1144 | |
| 1145 | case SIR_LIM_UPDATE_BEACON: |
| 1146 | limUpdateBeacon(pMac); |
| 1147 | break; |
| 1148 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1149 | case SIR_CFG_PARAM_UPDATE_IND: |
| 1150 | /// CFG parameter updated |
| 1151 | if (limIsSystemInScanState(pMac)) |
| 1152 | { |
| 1153 | // System is in DFS (Learn) mode |
| 1154 | // Defer processsing this message |
| 1155 | if (limDeferMsg(pMac, limMsg) != TX_SUCCESS) |
| 1156 | { |
Leela Venkata Kiran Kumar Reddy Chirala | 2247e96 | 2013-03-22 19:21:10 -0700 | [diff] [blame] | 1157 | if(!(pMac->lim.deferredMsgCnt & 0xF)) |
| 1158 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1159 | PELOGE(limLog(pMac, LOGE, FL("Unable to Defer message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1160 | limMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 1161 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
Leela Venkata Kiran Kumar Reddy Chirala | 2247e96 | 2013-03-22 19:21:10 -0700 | [diff] [blame] | 1162 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1163 | limLogSessionStates(pMac); |
| 1164 | limPrintMsgName(pMac, LOGE, limMsg->type); |
| 1165 | } |
| 1166 | } |
| 1167 | else |
| 1168 | { |
| 1169 | limHandleCFGparamUpdate(pMac, limMsg->bodyval); |
| 1170 | } |
| 1171 | |
| 1172 | break; |
| 1173 | |
| 1174 | case WDA_INIT_SCAN_RSP: |
| 1175 | limProcessInitScanRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1176 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1177 | break; |
| 1178 | |
| 1179 | case WDA_START_SCAN_RSP: |
| 1180 | limProcessStartScanRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1181 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1182 | break; |
| 1183 | |
| 1184 | case WDA_END_SCAN_RSP: |
| 1185 | limProcessEndScanRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1186 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1187 | break; |
| 1188 | |
| 1189 | case WDA_FINISH_SCAN_RSP: |
| 1190 | limProcessFinishScanRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1191 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1192 | break; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1193 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 1194 | case WDA_START_OEM_DATA_RSP: |
| 1195 | limProcessOemDataRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1196 | limMsg->bodyptr = NULL; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1197 | break; |
| 1198 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1199 | |
| 1200 | case WDA_SWITCH_CHANNEL_RSP: |
| 1201 | limProcessSwitchChannelRsp(pMac, limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1202 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1203 | break; |
| 1204 | |
| 1205 | #ifdef ANI_SIR_IBSS_PEER_CACHING |
| 1206 | case WDA_IBSS_STA_ADD: |
| 1207 | limIbssStaAdd(pMac, limMsg->bodyptr); |
| 1208 | break; |
| 1209 | #endif |
| 1210 | case SIR_BB_XPORT_MGMT_MSG: |
| 1211 | // These messages are from Peer MAC entity. |
| 1212 | #ifdef WLAN_DEBUG |
| 1213 | pMac->lim.numBbt++; |
| 1214 | #endif |
| 1215 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1216 | { |
| 1217 | v_U16_t pktLen = 0; |
| 1218 | vos_pkt_t *pVosPkt; |
| 1219 | VOS_STATUS vosStatus; |
| 1220 | tSirMsgQ limMsgNew; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1221 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 1222 | tANI_U32 *pBD = NULL ; |
| 1223 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1224 | |
| 1225 | /* The original limMsg which we were deferring have the |
| 1226 | * bodyPointer point to 'BD' instead of 'Vos pkt'. If we don't make a copy |
| 1227 | * of limMsg, then vos_pkt_peek_data will overwrite the limMsg->bodyPointer. |
| 1228 | * and next time when we try to process the msg, we will try to use 'BD' as |
| 1229 | * 'Vos Pkt' which will cause a crash |
| 1230 | */ |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1231 | vos_mem_copy((tANI_U8*)&limMsgNew, (tANI_U8*)limMsg, |
| 1232 | sizeof(tSirMsgQ)); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1233 | pVosPkt = (vos_pkt_t *)limMsgNew.bodyptr; |
| 1234 | vos_pkt_get_packet_length(pVosPkt, &pktLen); |
| 1235 | |
| 1236 | vosStatus = WDA_DS_PeekRxPacketInfo( pVosPkt, (v_PVOID_t *)&limMsgNew.bodyptr, VOS_FALSE ); |
| 1237 | |
| 1238 | if( !VOS_IS_STATUS_SUCCESS(vosStatus) ) |
| 1239 | { |
| 1240 | vos_pkt_return_packet(pVosPkt); |
| 1241 | break; |
| 1242 | |
| 1243 | } |
Katya Nigam | 3802f20 | 2013-12-16 19:27:14 +0530 | [diff] [blame] | 1244 | |
| 1245 | /* |
| 1246 | * putting a check for age out probe request frames |
| 1247 | * such that any probe req more than 0.5 sec old can directly |
| 1248 | * be dropped. With this, there won't be blocking of MC thread. |
| 1249 | */ |
| 1250 | |
| 1251 | if( limAgeOutProbeReq ( pMac, &limMsgNew, pVosPkt )) |
| 1252 | { |
| 1253 | break; |
| 1254 | } |
| 1255 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1256 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 1257 | /* |
| 1258 | * TDLS frames comes as translated frames as well as |
| 1259 | * MAC 802.11 data frames.. |
| 1260 | */ |
| 1261 | limGetBDfromRxPacket(pMac, limMsgNew.bodyptr, &pBD); |
| 1262 | if(0 != WDA_GET_RX_FT_DONE(pBD)) |
| 1263 | { |
| 1264 | /* |
| 1265 | * TODO: check for scanning state and set deferMesg flag |
| 1266 | * accordingly.. |
| 1267 | */ |
| 1268 | deferMsg = false ; |
| 1269 | |
| 1270 | limProcessTdlsFrame(pMac, pBD) ; |
| 1271 | } |
| 1272 | else |
| 1273 | #endif |
Katya Nigam | 3802f20 | 2013-12-16 19:27:14 +0530 | [diff] [blame] | 1274 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1275 | limHandle80211Frames(pMac, &limMsgNew, &deferMsg); |
| 1276 | |
| 1277 | if ( deferMsg == true ) |
| 1278 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1279 | PELOG1(limLog(pMac, LOG1, FL("Defer message type=%X "), limMsg->type);) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1280 | if (limDeferMsg(pMac, limMsg) != TX_SUCCESS) |
| 1281 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1282 | PELOGE(limLog(pMac, LOGE, FL("Unable to Defer message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1283 | limMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 1284 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
| 1285 | limLogSessionStates(pMac); |
| 1286 | limPrintMsgName(pMac, LOGE, limMsg->type); |
| 1287 | vos_pkt_return_packet(pVosPkt); |
| 1288 | } |
| 1289 | } |
| 1290 | else |
| 1291 | { |
| 1292 | /* PE is not deferring this 802.11 frame so we need to call vos_pkt_return. |
| 1293 | * Asumption here is when Rx mgmt frame processing is done, |
| 1294 | * voss packet could be freed here. |
| 1295 | */ |
| 1296 | vos_pkt_return_packet(pVosPkt); |
| 1297 | } |
| 1298 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1299 | break; |
| 1300 | |
| 1301 | case eWNI_SME_SCAN_REQ: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1302 | case eWNI_SME_REMAIN_ON_CHANNEL_REQ: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1303 | case eWNI_SME_DISASSOC_REQ: |
| 1304 | case eWNI_SME_DEAUTH_REQ: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1305 | case eWNI_SME_GET_SCANNED_CHANNEL_REQ: |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1306 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 1307 | case eWNI_SME_OEM_DATA_REQ: |
| 1308 | #endif |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1309 | #ifdef FEATURE_WLAN_TDLS |
| 1310 | case eWNI_SME_TDLS_SEND_MGMT_REQ: |
| 1311 | case eWNI_SME_TDLS_ADD_STA_REQ: |
| 1312 | case eWNI_SME_TDLS_DEL_STA_REQ: |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1313 | case eWNI_SME_TDLS_LINK_ESTABLISH_REQ: |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1314 | #endif |
| 1315 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 1316 | case eWNI_SME_TDLS_DISCOVERY_START_REQ: |
| 1317 | case eWNI_SME_TDLS_LINK_START_REQ: |
| 1318 | case eWNI_SME_TDLS_TEARDOWN_REQ: |
| 1319 | #endif |
Gopichand Nakkala | cca24d1 | 2013-03-07 17:05:07 +0530 | [diff] [blame] | 1320 | case eWNI_SME_RESET_AP_CAPS_CHANGED: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1321 | // These messages are from HDD |
| 1322 | limProcessNormalHddMsg(pMac, limMsg, true); //need to response to hdd |
| 1323 | break; |
| 1324 | |
| 1325 | case eWNI_SME_SCAN_ABORT_IND: |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 1326 | { |
| 1327 | tANI_U8 *pSessionId = (tANI_U8 *)limMsg->bodyptr; |
| 1328 | limProcessAbortScanInd(pMac, *pSessionId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1329 | vos_mem_free((v_VOID_t *)limMsg->bodyptr); |
| 1330 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1331 | break; |
Madan Mohan Koyyalamudi | ff3a715 | 2013-06-13 14:47:55 +0530 | [diff] [blame] | 1332 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1333 | case eWNI_SME_START_REQ: |
| 1334 | case eWNI_SME_SYS_READY_IND: |
| 1335 | #ifndef WNI_ASKEY_NON_SUPPORT_FEATURE |
| 1336 | case eWNI_SME_JOIN_REQ: |
| 1337 | #endif |
| 1338 | case eWNI_SME_AUTH_REQ: |
| 1339 | case eWNI_SME_REASSOC_REQ: |
| 1340 | case eWNI_SME_START_BSS_REQ: |
| 1341 | case eWNI_SME_STOP_BSS_REQ: |
| 1342 | case eWNI_SME_SWITCH_CHL_REQ: |
| 1343 | case eWNI_SME_SWITCH_CHL_CB_PRIMARY_REQ: |
| 1344 | case eWNI_SME_SWITCH_CHL_CB_SECONDARY_REQ: |
| 1345 | case eWNI_SME_SETCONTEXT_REQ: |
| 1346 | case eWNI_SME_REMOVEKEY_REQ: |
| 1347 | #ifndef WNI_ASKEY_NON_SUPPORT_FEATURE |
| 1348 | case eWNI_SME_PROMISCUOUS_MODE_REQ: |
| 1349 | #endif |
| 1350 | case eWNI_SME_DISASSOC_CNF: |
| 1351 | case eWNI_SME_DEAUTH_CNF: |
| 1352 | case eWNI_SME_ASSOC_CNF: |
| 1353 | case eWNI_SME_REASSOC_CNF: |
| 1354 | case eWNI_SME_ADDTS_REQ: |
| 1355 | case eWNI_SME_DELTS_REQ: |
| 1356 | case eWNI_SME_DEL_BA_PEER_IND: |
| 1357 | case eWNI_SME_SET_TX_POWER_REQ: |
| 1358 | case eWNI_SME_GET_TX_POWER_REQ: |
| 1359 | case eWNI_SME_GET_NOISE_REQ: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1360 | case eWNI_SME_GET_ASSOC_STAS_REQ: |
| 1361 | case eWNI_SME_TKIP_CNTR_MEAS_REQ: |
| 1362 | case eWNI_SME_UPDATE_APWPSIE_REQ: |
| 1363 | case eWNI_SME_HIDE_SSID_REQ: |
| 1364 | case eWNI_SME_GET_WPSPBC_SESSION_REQ: |
| 1365 | case eWNI_SME_SET_APWPARSNIEs_REQ: |
Madan Mohan Koyyalamudi | 167b95e | 2012-11-27 15:53:38 -0800 | [diff] [blame] | 1366 | case eWNI_SME_CHNG_MCC_BEACON_INTERVAL: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1367 | #if defined WLAN_FEATURE_VOWIFI |
| 1368 | case eWNI_SME_NEIGHBOR_REPORT_REQ_IND: |
| 1369 | case eWNI_SME_BEACON_REPORT_RESP_XMIT_IND: |
| 1370 | #endif |
| 1371 | #if defined FEATURE_WLAN_CCX |
| 1372 | case eWNI_SME_CCX_ADJACENT_AP_REPORT: |
| 1373 | #endif |
| 1374 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1375 | case eWNI_SME_FT_UPDATE_KEY: |
| 1376 | case eWNI_SME_FT_PRE_AUTH_REQ: |
| 1377 | case eWNI_SME_FT_AGGR_QOS_REQ: |
| 1378 | #endif |
| 1379 | case eWNI_SME_ADD_STA_SELF_REQ: |
| 1380 | case eWNI_SME_DEL_STA_SELF_REQ: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1381 | case eWNI_SME_REGISTER_MGMT_FRAME_REQ: |
| 1382 | case eWNI_SME_UPDATE_NOA: |
Gopichand Nakkala | c178ac8 | 2013-05-30 19:53:39 +0530 | [diff] [blame] | 1383 | case eWNI_SME_CLEAR_DFS_CHANNEL_LIST: |
Madan Mohan Koyyalamudi | 44bbc15 | 2013-07-05 21:13:10 +0530 | [diff] [blame] | 1384 | case eWNI_SME_STA_STAT_REQ: |
| 1385 | case eWNI_SME_AGGR_STAT_REQ: |
| 1386 | case eWNI_SME_GLOBAL_STAT_REQ: |
| 1387 | case eWNI_SME_STAT_SUMM_REQ: |
| 1388 | case eWNI_SME_GET_STATISTICS_REQ: |
| 1389 | #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR) |
| 1390 | case eWNI_SME_GET_ROAM_RSSI_REQ: |
| 1391 | #endif |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1392 | #if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD) |
| 1393 | case eWNI_SME_GET_TSM_STATS_REQ: |
| 1394 | #endif /* FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1395 | // These messages are from HDD |
| 1396 | limProcessNormalHddMsg(pMac, limMsg, false); //no need to response to hdd |
| 1397 | break; |
| 1398 | |
| 1399 | //Power Save Messages From HDD |
| 1400 | case eWNI_PMC_PWR_SAVE_CFG: |
| 1401 | case eWNI_PMC_ENTER_BMPS_REQ: |
| 1402 | case eWNI_PMC_EXIT_BMPS_REQ: |
| 1403 | case eWNI_PMC_ENTER_IMPS_REQ: |
| 1404 | case eWNI_PMC_EXIT_IMPS_REQ: |
| 1405 | case eWNI_PMC_ENTER_UAPSD_REQ: |
| 1406 | case eWNI_PMC_EXIT_UAPSD_REQ: |
| 1407 | case eWNI_PMC_ENTER_WOWL_REQ: |
| 1408 | case eWNI_PMC_EXIT_WOWL_REQ: |
| 1409 | case eWNI_PMC_WOWL_ADD_BCAST_PTRN: |
| 1410 | case eWNI_PMC_WOWL_DEL_BCAST_PTRN: |
| 1411 | pmmProcessMessage(pMac, limMsg); |
| 1412 | break; |
| 1413 | |
| 1414 | case eWNI_PMC_SMPS_STATE_IND : |
| 1415 | { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1416 | if(limMsg->bodyptr){ |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1417 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1418 | limMsg->bodyptr = NULL; |
| 1419 | } |
| 1420 | } |
| 1421 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1422 | case eWNI_SME_SEND_ACTION_FRAME_IND: |
| 1423 | limSendP2PActionFrame(pMac, limMsg); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1424 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1425 | limMsg->bodyptr = NULL; |
| 1426 | break; |
| 1427 | case eWNI_SME_ABORT_REMAIN_ON_CHAN_IND: |
| 1428 | limAbortRemainOnChan(pMac); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1429 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1430 | limMsg->bodyptr = NULL; |
| 1431 | break; |
| 1432 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1433 | case SIR_HAL_P2P_NOA_START_IND: |
| 1434 | { |
| 1435 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; |
| 1436 | tANI_U8 i; |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1437 | tANI_U8 p2pGOExists = 0; |
Gopichand Nakkala | 78a6c81 | 2013-05-13 16:39:49 +0530 | [diff] [blame] | 1438 | |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1439 | limLog(pMac, LOG1, "LIM received NOA start %x", limMsg->type); |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1440 | |
| 1441 | /* Since insert NOA is done and NOA start msg received, we should deactivate the Insert NOA timer */ |
| 1442 | limDeactivateAndChangeTimer(pMac, eLIM_INSERT_SINGLESHOT_NOA_TIMER); |
| 1443 | |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1444 | for(i=0; i < pMac->lim.maxBssId; i++) |
| 1445 | { |
| 1446 | psessionEntry = &pMac->lim.gpSession[i]; |
| 1447 | if ( (psessionEntry != NULL) && (psessionEntry->valid) && |
| 1448 | (psessionEntry->pePersona == VOS_P2P_GO_MODE)) |
| 1449 | { //Save P2P NOA start attributes for P2P Go persona |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1450 | p2pGOExists = 1; |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1451 | vos_mem_copy(&psessionEntry->p2pGoPsNoaStartInd, limMsg->bodyptr, |
| 1452 | sizeof(tSirP2PNoaStart)); |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1453 | if (psessionEntry->p2pGoPsNoaStartInd.status != eHAL_STATUS_SUCCESS) |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1454 | { |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1455 | limLog(pMac, LOGW, FL("GO NOA start failure status %d reported by FW." |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1456 | " - still go ahead with deferred sme req. This is just info"), |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1457 | psessionEntry->p2pGoPsNoaStartInd.status); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1458 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1459 | break; |
| 1460 | } |
| 1461 | } |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1462 | |
| 1463 | if (p2pGOExists == 0) |
| 1464 | { |
| 1465 | limLog(pMac, LOGW, FL("By the time, we received NOA start, GO is already removed." |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1466 | " - still go ahead with deferred sme req. This is just info")); |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1467 | } |
| 1468 | |
| 1469 | /* We received the NOA start indication. Now we can send down the SME request which requires off-channel operation */ |
| 1470 | limProcessRegdDefdSmeReqAfterNOAStart(pMac); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1471 | vos_mem_free(limMsg->bodyptr); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1472 | limMsg->bodyptr = NULL; |
Viral Modi | d440e68 | 2013-03-06 02:25:31 -0800 | [diff] [blame] | 1473 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1474 | break; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1475 | #ifdef FEATURE_WLAN_TDLS |
| 1476 | case SIR_HAL_TDLS_IND: |
| 1477 | { |
| 1478 | tSirTdlsInd *pTdlsInd = (tpSirTdlsInd)limMsg->bodyptr ; |
| 1479 | tpDphHashNode pStaDs = NULL ; |
| 1480 | tpPESession psessionEntry = NULL; |
| 1481 | tANI_U8 sessionId; |
| 1482 | if((psessionEntry = peFindSessionByStaId(pMac,pTdlsInd->staIdx,&sessionId))== NULL) |
| 1483 | { |
| 1484 | limLog(pMac, LOG1, FL("session does not exist for given bssId\n")); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1485 | vos_mem_free(limMsg->bodyptr); |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1486 | limMsg->bodyptr = NULL; |
| 1487 | return; |
| 1488 | } |
| 1489 | if ((pStaDs = dphGetHashEntry(pMac, pTdlsInd->assocId, &psessionEntry->dph.dphHashTable)) == NULL) |
| 1490 | { |
| 1491 | limLog(pMac, LOG1, FL("pStaDs Does not exist for given staId\n")); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1492 | vos_mem_free(limMsg->bodyptr); |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1493 | limMsg->bodyptr = NULL; |
| 1494 | return; |
| 1495 | } |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1496 | |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1497 | if ((STA_ENTRY_TDLS_PEER == pStaDs->staType)) |
| 1498 | { |
| 1499 | limLog(pMac, LOGE, |
| 1500 | FL("received TDLS Indication from the Firmware with Reason Code %d "), |
| 1501 | pTdlsInd->reasonCode); |
| 1502 | limSendSmeTDLSDelStaInd(pMac, pStaDs, psessionEntry, |
Gopichand Nakkala | 574f6d1 | 2013-06-27 19:38:43 +0530 | [diff] [blame] | 1503 | pTdlsInd->reasonCode); |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1504 | } |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1505 | vos_mem_free(limMsg->bodyptr); |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 1506 | limMsg->bodyptr = NULL; |
| 1507 | } |
| 1508 | break; |
| 1509 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1510 | case SIR_HAL_P2P_NOA_ATTR_IND: |
| 1511 | { |
| 1512 | tpPESession psessionEntry = &pMac->lim.gpSession[0]; |
| 1513 | tANI_U8 i; |
| 1514 | |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1515 | limLog(pMac, LOGW, FL("Received message Noa_ATTR %x"), limMsg->type); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1516 | for(i=0; i < pMac->lim.maxBssId; i++) |
| 1517 | { |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1518 | psessionEntry = &pMac->lim.gpSession[i]; |
| 1519 | if ( (psessionEntry != NULL) && (psessionEntry->valid) && |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1520 | (psessionEntry->pePersona == VOS_P2P_GO_MODE)) |
| 1521 | { //Save P2P attributes for P2P Go persona |
| 1522 | |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1523 | vos_mem_copy(&psessionEntry->p2pGoPsUpdate, limMsg->bodyptr, |
| 1524 | sizeof(tSirP2PNoaAttr)); |
| 1525 | |
Arif Hussain | 24bafea | 2013-11-15 15:10:03 -0800 | [diff] [blame] | 1526 | limLog(pMac, LOG2, FL(" &psessionEntry->bssId " |
| 1527 | MAC_ADDRESS_STR " ctWin=%d oppPsFlag=%d"), |
| 1528 | MAC_ADDR_ARRAY(psessionEntry->bssId), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1529 | psessionEntry->p2pGoPsUpdate.ctWin, |
| 1530 | psessionEntry->p2pGoPsUpdate.oppPsFlag); |
| 1531 | |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1532 | limLog(pMac, LOG2, FL(" uNoa1IntervalCnt=%d uNoa1Duration=%d uNoa1Interval=%d uNoa1StartTime=%d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1533 | psessionEntry->p2pGoPsUpdate.uNoa1IntervalCnt, |
| 1534 | psessionEntry->p2pGoPsUpdate.uNoa1Duration, |
| 1535 | psessionEntry->p2pGoPsUpdate.uNoa1Interval, |
| 1536 | psessionEntry->p2pGoPsUpdate.uNoa1StartTime); |
| 1537 | |
| 1538 | |
| 1539 | break; |
| 1540 | } |
| 1541 | } |
| 1542 | |
| 1543 | } |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1544 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1545 | limMsg->bodyptr = NULL; |
| 1546 | |
| 1547 | break; |
| 1548 | |
| 1549 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1550 | /* eWNI_SME_PRE_CHANNEL_SWITCH_FULL_POWER Message comes after the |
| 1551 | * device comes out of full power for the full power request sent |
| 1552 | * because of channel switch with switch count as 0, so call the same |
| 1553 | * function used in timeout case(i.e SIR_LIM_CHANNEL_SWITCH_TIMEOUT) |
| 1554 | * for switching the channel*/ |
| 1555 | case eWNI_SME_PRE_CHANNEL_SWITCH_FULL_POWER: |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1556 | if ( !tx_timer_running(&pMac->lim.limTimers.gLimChannelSwitchTimer) ) |
| 1557 | { |
| 1558 | limProcessChannelSwitchTimeout(pMac); |
| 1559 | } |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1560 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1561 | limMsg->bodyptr = NULL; |
| 1562 | break; |
| 1563 | |
| 1564 | //Power Save Related Messages From HAL |
| 1565 | case WDA_ENTER_BMPS_RSP: |
| 1566 | case WDA_EXIT_BMPS_RSP: |
| 1567 | case WDA_EXIT_BMPS_IND: |
| 1568 | case WDA_ENTER_IMPS_RSP: |
| 1569 | case WDA_EXIT_IMPS_RSP: |
| 1570 | case WDA_ENTER_UAPSD_RSP: |
| 1571 | case WDA_EXIT_UAPSD_RSP: |
| 1572 | case WDA_WOWL_ENTER_RSP: |
| 1573 | case WDA_WOWL_EXIT_RSP: |
| 1574 | pmmProcessMessage(pMac, limMsg); |
| 1575 | break; |
| 1576 | |
| 1577 | case WDA_LOW_RSSI_IND: |
| 1578 | //limHandleLowRssiInd(pMac); |
| 1579 | break; |
| 1580 | |
| 1581 | case WDA_BMPS_STATUS_IND: |
| 1582 | limHandleBmpsStatusInd(pMac); |
| 1583 | break; |
| 1584 | |
| 1585 | case WDA_MISSED_BEACON_IND: |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 1586 | limHandleMissedBeaconInd(pMac, limMsg); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1587 | vos_mem_free(limMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 1588 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1589 | break; |
| 1590 | case WDA_MIC_FAILURE_IND: |
| 1591 | limMicFailureInd(pMac, limMsg); |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 1592 | vos_mem_free(limMsg->bodyptr); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1593 | limMsg->bodyptr = NULL; |
| 1594 | break; |
| 1595 | |
| 1596 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1597 | |
| 1598 | case SIR_LIM_ADDTS_RSP_TIMEOUT: |
| 1599 | limProcessSmeReqMessages(pMac,limMsg); |
| 1600 | break; |
| 1601 | #ifdef FEATURE_WLAN_CCX |
| 1602 | case SIR_LIM_CCX_TSM_TIMEOUT: |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1603 | #ifndef FEATURE_WLAN_CCX_UPLOAD |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1604 | limProcessTsmTimeoutHandler(pMac,limMsg); |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1605 | #endif /* FEATURE_WLAN_CCX_UPLOAD */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1606 | break; |
| 1607 | case WDA_TSM_STATS_RSP: |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1608 | #ifdef FEATURE_WLAN_CCX_UPLOAD |
| 1609 | limSendSmePECcxTsmRsp(pMac, (tAniGetTsmStatsRsp *)limMsg->bodyptr); |
| 1610 | #else |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1611 | limProcessHalCcxTsmRsp(pMac, limMsg); |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1612 | #endif /* FEATURE_WLAN_CCX_UPLOAD */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1613 | break; |
| 1614 | #endif |
| 1615 | case WDA_ADD_TS_RSP: |
| 1616 | limProcessHalAddTsRsp(pMac, limMsg); |
| 1617 | break; |
| 1618 | |
| 1619 | case SIR_LIM_DEL_TS_IND: |
| 1620 | limProcessDelTsInd(pMac, limMsg); |
Madan Mohan Koyyalamudi | f244d8f | 2012-11-29 11:21:05 -0800 | [diff] [blame] | 1621 | break; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1622 | case SIR_LIM_ADD_BA_IND: |
| 1623 | limProcessAddBaInd(pMac, limMsg); |
| 1624 | break; |
| 1625 | case SIR_LIM_DEL_BA_ALL_IND: |
Kiran Kumar Lokere | 458d732 | 2013-05-29 14:29:43 -0700 | [diff] [blame] | 1626 | limDelAllBASessions(pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1627 | break; |
| 1628 | case SIR_LIM_DEL_BA_IND: |
| 1629 | limProcessMlmHalBADeleteInd( pMac, limMsg ); |
| 1630 | break; |
| 1631 | |
| 1632 | case SIR_LIM_BEACON_GEN_IND: { |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1633 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1634 | if( pMac->lim.gLimSystemRole != eLIM_AP_ROLE ) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1635 | schProcessPreBeaconInd(pMac, limMsg); |
| 1636 | |
| 1637 | } |
| 1638 | break; |
| 1639 | |
| 1640 | case SIR_LIM_DELETE_STA_CONTEXT_IND: |
| 1641 | limDeleteStaContext(pMac, limMsg); |
| 1642 | break; |
| 1643 | |
| 1644 | case SIR_LIM_MIN_CHANNEL_TIMEOUT: |
| 1645 | case SIR_LIM_MAX_CHANNEL_TIMEOUT: |
| 1646 | case SIR_LIM_PERIODIC_PROBE_REQ_TIMEOUT: |
| 1647 | case SIR_LIM_JOIN_FAIL_TIMEOUT: |
Madan Mohan Koyyalamudi | 9aff9ff | 2012-11-29 11:27:25 -0800 | [diff] [blame] | 1648 | case SIR_LIM_PERIODIC_JOIN_PROBE_REQ_TIMEOUT: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1649 | case SIR_LIM_AUTH_FAIL_TIMEOUT: |
| 1650 | case SIR_LIM_AUTH_RSP_TIMEOUT: |
| 1651 | case SIR_LIM_ASSOC_FAIL_TIMEOUT: |
| 1652 | case SIR_LIM_REASSOC_FAIL_TIMEOUT: |
| 1653 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1654 | case SIR_LIM_FT_PREAUTH_RSP_TIMEOUT: |
| 1655 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1656 | case SIR_LIM_REMAIN_CHN_TIMEOUT: |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 1657 | case SIR_LIM_INSERT_SINGLESHOT_NOA_TIMEOUT: |
Madan Mohan Koyyalamudi | 521ff19 | 2012-11-15 17:13:08 -0800 | [diff] [blame] | 1658 | case SIR_LIM_DISASSOC_ACK_TIMEOUT: |
| 1659 | case SIR_LIM_DEAUTH_ACK_TIMEOUT: |
Gopichand Nakkala | d492d20 | 2013-05-10 02:50:47 +0530 | [diff] [blame] | 1660 | case SIR_LIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1661 | // These timeout messages are handled by MLM sub module |
| 1662 | |
| 1663 | limProcessMlmReqMessages(pMac, |
| 1664 | limMsg); |
| 1665 | |
| 1666 | break; |
| 1667 | |
| 1668 | case SIR_LIM_HEART_BEAT_TIMEOUT: |
| 1669 | /** check if heart beat failed, even if one Beacon |
| 1670 | * is rcvd within the Heart Beat interval continue |
| 1671 | * normal processing |
| 1672 | */ |
| 1673 | |
| 1674 | #if 0 |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1675 | PELOG1(limLog(pMac, LOG1, FL("Heartbeat timeout, SME %d, MLME %d, #bcn %d"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1676 | pMac->lim.gLimSmeState, pMac->lim.gLimMlmState, |
| 1677 | pMac->lim.gLimRxedBeaconCntDuringHB);) |
| 1678 | |
| 1679 | if(pMac->lim.gLimSystemRole == eLIM_STA_IN_IBSS_ROLE) |
| 1680 | limIbssHeartBeatHandle(pMac); //HeartBeat for peers. |
| 1681 | else |
| 1682 | /** |
| 1683 | * Heartbeat failure occurred on STA |
| 1684 | * This is handled by LMM sub module. |
| 1685 | */ |
| 1686 | limHandleHeartBeatFailure(pMac); |
| 1687 | |
| 1688 | break; |
| 1689 | #endif //TO SUPPORT BT-AMP |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1690 | if (limIsSystemInScanState(pMac)) |
| 1691 | { |
| 1692 | // System is in DFS (Learn) mode |
| 1693 | // Defer processsing this message |
| 1694 | if (limDeferMsg(pMac, limMsg) != TX_SUCCESS) |
| 1695 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1696 | PELOGE(limLog(pMac, LOGE, FL("Unable to Defer message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1697 | limMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 1698 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
| 1699 | limLogSessionStates(pMac); |
| 1700 | } |
| 1701 | } |
| 1702 | else |
| 1703 | { |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 1704 | if (NULL == limMsg->bodyptr) |
| 1705 | { |
| 1706 | limHandleHeartBeatTimeout(pMac); |
| 1707 | } |
| 1708 | else |
| 1709 | { |
| 1710 | limHandleHeartBeatTimeoutForSession(pMac, (tpPESession)limMsg->bodyptr); |
| 1711 | } |
Gopichand Nakkala | 78a6c81 | 2013-05-13 16:39:49 +0530 | [diff] [blame] | 1712 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1713 | break; |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 1714 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1715 | case SIR_LIM_PROBE_HB_FAILURE_TIMEOUT: |
| 1716 | limHandleHeartBeatFailureTimeout(pMac); |
| 1717 | break; |
| 1718 | |
| 1719 | case SIR_LIM_CHANNEL_SCAN_TIMEOUT: |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1720 | /** |
| 1721 | * Background scan timeout occurred on STA. |
| 1722 | * This is handled by LMM sub module. |
| 1723 | */ |
| 1724 | limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER); |
| 1725 | |
| 1726 | //We will do background scan even in bcnps mode |
| 1727 | //if (pMac->sys.gSysEnableScanMode) |
| 1728 | pMac->lim.gLimReportBackgroundScanResults = FALSE; |
| 1729 | limTriggerBackgroundScan(pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1730 | break; |
| 1731 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1732 | |
| 1733 | case SIR_LIM_HASH_MISS_THRES_TIMEOUT: |
| 1734 | |
| 1735 | /* |
| 1736 | ** clear the credit to the send disassociate frame bucket |
| 1737 | **/ |
| 1738 | |
| 1739 | pMac->lim.gLimDisassocFrameCredit = 0; |
| 1740 | break; |
| 1741 | |
| 1742 | case SIR_LIM_CNF_WAIT_TIMEOUT: |
| 1743 | |
| 1744 | /* |
| 1745 | ** Does not receive CNF or dummy packet |
| 1746 | **/ |
| 1747 | limHandleCnfWaitTimeout(pMac, (tANI_U16) limMsg->bodyval); |
| 1748 | |
| 1749 | break; |
| 1750 | |
| 1751 | case SIR_LIM_KEEPALIVE_TIMEOUT: |
| 1752 | limSendKeepAliveToPeer(pMac); |
| 1753 | |
| 1754 | break; |
| 1755 | |
| 1756 | case SIR_LIM_RETRY_INTERRUPT_MSG: |
| 1757 | // Message from ISR upon TFP's max retry limit interrupt |
| 1758 | |
| 1759 | break; |
| 1760 | |
| 1761 | case SIR_LIM_INV_KEY_INTERRUPT_MSG: |
| 1762 | // Message from ISR upon SP's Invalid session key interrupt |
| 1763 | |
| 1764 | break; |
| 1765 | |
| 1766 | case SIR_LIM_KEY_ID_INTERRUPT_MSG: |
| 1767 | // Message from ISR upon SP's Invalid key ID interrupt |
| 1768 | |
| 1769 | break; |
| 1770 | |
| 1771 | case SIR_LIM_REPLAY_THRES_INTERRUPT_MSG: |
| 1772 | // Message from ISR upon SP's Replay threshold interrupt |
| 1773 | |
| 1774 | break; |
| 1775 | |
| 1776 | case SIR_LIM_CHANNEL_SWITCH_TIMEOUT: |
| 1777 | limProcessChannelSwitchTimeout(pMac); |
| 1778 | break; |
| 1779 | |
| 1780 | case SIR_LIM_QUIET_TIMEOUT: |
| 1781 | limProcessQuietTimeout(pMac); |
| 1782 | break; |
| 1783 | |
| 1784 | case SIR_LIM_QUIET_BSS_TIMEOUT: |
| 1785 | limProcessQuietBssTimeout(pMac); |
| 1786 | break; |
| 1787 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1788 | case SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT: |
| 1789 | limHandleUpdateOlbcCache(pMac); |
| 1790 | break; |
| 1791 | #if 0 |
| 1792 | case SIR_LIM_WPS_OVERLAP_TIMEOUT: |
| 1793 | limProcessWPSOverlapTimeout(pMac); |
| 1794 | break; |
| 1795 | #endif |
| 1796 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1797 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1798 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 1799 | /* |
| 1800 | * Here discovery timer expires, now we can go ahead and collect all |
| 1801 | * the dicovery responses PE has process till now and send this |
| 1802 | * responses to SME.. |
| 1803 | */ |
| 1804 | case SIR_LIM_TDLS_DISCOVERY_RSP_WAIT: |
| 1805 | { |
| 1806 | //fetch the sessionEntry based on the sessionId |
| 1807 | tpPESession psessionEntry = peFindSessionBySessionId(pMac, |
| 1808 | pMac->lim.limTimers.gLimTdlsDisRspWaitTimer.sessionId) ; |
| 1809 | if(NULL == psessionEntry) |
| 1810 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1811 | limLog(pMac, LOGP,FL("Session Does not exist for given sessionID %d"), pMac->lim.limTimers.gLimTdlsDisRspWaitTimer.sessionId); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1812 | return; |
| 1813 | } |
| 1814 | |
| 1815 | VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1816 | ("Discovery Rsp timer expires ")) ; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1817 | #if 0 // TDLS_hklee: D13 no need to open Addr2 unknown data packet |
| 1818 | /* restore RXP filters */ |
| 1819 | limSetLinkState(pMac, eSIR_LINK_FINISH_TDLS_DISCOVERY_STATE, |
| 1820 | psessionEntry->bssId) ; |
| 1821 | #endif |
| 1822 | limSendSmeTdlsDisRsp(pMac, eSIR_SUCCESS, |
| 1823 | eWNI_SME_TDLS_DISCOVERY_START_RSP) ; |
| 1824 | break ; |
| 1825 | } |
| 1826 | |
| 1827 | /* |
| 1828 | * we initiated link setup and did not receive TDLS setup rsp |
| 1829 | * from TDLS peer STA, send failure RSP to SME. |
| 1830 | */ |
| 1831 | case SIR_LIM_TDLS_LINK_SETUP_RSP_TIMEOUT: |
| 1832 | { |
| 1833 | tANI_U8 *peerMac = (tANI_U8 *)limMsg->bodyval ; |
| 1834 | tLimTdlsLinkSetupPeer *setupPeer = NULL ; |
| 1835 | |
| 1836 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1837 | ("TDLS setup rsp timer expires ")) ; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1838 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO, |
Arif Hussain | a7c8e41 | 2013-11-20 11:06:42 -0800 | [diff] [blame] | 1839 | ("TDLS setup rsp timer expires for peer:" |
| 1840 | MAC_ADDRESS_STR), MAC_ADDR_ARRAY(peerMac)); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1841 | |
| 1842 | limTdlsFindLinkPeer(pMac, peerMac, &setupPeer) ; |
| 1843 | if(NULL != setupPeer) |
| 1844 | { |
| 1845 | limTdlsDelLinkPeer( pMac, peerMac) ; |
| 1846 | } |
| 1847 | |
| 1848 | limSendSmeTdlsLinkStartRsp(pMac, eSIR_FAILURE, peerMac, |
| 1849 | eWNI_SME_TDLS_LINK_START_RSP) ; |
| 1850 | break ; |
| 1851 | } |
| 1852 | case SIR_LIM_TDLS_LINK_SETUP_CNF_TIMEOUT: |
| 1853 | { |
| 1854 | tANI_U8 *peerMac = (tANI_U8 *)limMsg->bodyval ; |
| 1855 | tLimTdlsLinkSetupPeer *setupPeer = NULL ; |
| 1856 | |
| 1857 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1858 | ("TDLS setup CNF timer expires ")) ; |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1859 | VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO, |
Arif Hussain | a7c8e41 | 2013-11-20 11:06:42 -0800 | [diff] [blame] | 1860 | ("TDLS setup CNF timer expires for peer: " |
| 1861 | MAC_ADDRESS_STR), MAC_ADDR_ARRAY(peerMac)); |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 1862 | limTdlsFindLinkPeer(pMac, peerMac, &setupPeer) ; |
| 1863 | if(NULL != setupPeer) |
| 1864 | { |
| 1865 | limTdlsDelLinkPeer( pMac, peerMac) ; |
| 1866 | } |
| 1867 | break ; |
| 1868 | } |
| 1869 | #endif /* FEATURE_WLAN_TDLS TIMER */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1870 | case WDA_ADD_BSS_RSP: |
| 1871 | limProcessMlmAddBssRsp( pMac, limMsg ); |
| 1872 | break; |
| 1873 | |
| 1874 | case WDA_ADD_STA_RSP: |
| 1875 | |
| 1876 | //call a wrapper by paasing bodyptr, their get sessionID and and call proper function from there. |
| 1877 | limProcessAddStaRsp(pMac,limMsg); |
| 1878 | break; |
| 1879 | |
| 1880 | case WDA_DELETE_STA_RSP: |
| 1881 | limProcessMlmDelStaRsp(pMac, limMsg); |
| 1882 | break; |
| 1883 | |
| 1884 | case WDA_ADD_STA_SELF_RSP: |
| 1885 | limProcessAddStaSelfRsp(pMac, limMsg); |
| 1886 | break; |
| 1887 | case WDA_DEL_STA_SELF_RSP: |
| 1888 | limProcessDelStaSelfRsp(pMac, limMsg); |
| 1889 | break; |
| 1890 | |
| 1891 | case WDA_DELETE_BSS_RSP: |
| 1892 | limHandleDeleteBssRsp(pMac,limMsg); //wrapper routine to handle delete bss response |
| 1893 | break; |
| 1894 | |
| 1895 | case WDA_SET_BSSKEY_RSP: |
| 1896 | case WDA_SET_STA_BCASTKEY_RSP: |
| 1897 | limProcessMlmSetBssKeyRsp( pMac, limMsg ); |
| 1898 | break; |
| 1899 | case WDA_SET_STAKEY_RSP: |
| 1900 | limProcessMlmSetStaKeyRsp( pMac, limMsg ); |
| 1901 | break; |
| 1902 | case WDA_REMOVE_BSSKEY_RSP: |
| 1903 | case WDA_REMOVE_STAKEY_RSP: |
| 1904 | limProcessMlmRemoveKeyRsp( pMac, limMsg ); |
| 1905 | break; |
| 1906 | case WDA_ADDBA_RSP: |
| 1907 | limProcessMlmHalAddBARsp( pMac, limMsg ); |
| 1908 | break; |
| 1909 | |
| 1910 | case WDA_STA_STAT_RSP: |
| 1911 | case WDA_AGGR_STAT_RSP: |
| 1912 | case WDA_GLOBAL_STAT_RSP: |
| 1913 | case WDA_STAT_SUMM_RSP: |
| 1914 | limSendSmeStatsRsp ( pMac, limMsg->type, (void *)limMsg->bodyptr); |
| 1915 | break; |
| 1916 | |
| 1917 | case WDA_GET_STATISTICS_RSP: |
| 1918 | limSendSmePEStatisticsRsp ( pMac, limMsg->type, (void *)limMsg->bodyptr); |
| 1919 | break; |
Srinivas Girigowda | d34cedb | 2013-01-25 13:33:11 -0800 | [diff] [blame] | 1920 | #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR) |
| 1921 | case WDA_GET_ROAM_RSSI_RSP: |
| 1922 | limSendSmePEGetRoamRssiRsp ( pMac, limMsg->type, (void *)limMsg->bodyptr); |
| 1923 | break; |
| 1924 | #endif |
| 1925 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1926 | |
| 1927 | case WDA_SET_MIMOPS_RSP: //limProcessSetMimoRsp(pMac, limMsg); |
| 1928 | case WDA_SET_TX_POWER_RSP: //limProcessSetTxPowerRsp(pMac, limMsg); |
| 1929 | case WDA_GET_TX_POWER_RSP: //limProcessGetTxPowerRsp(pMac, limMsg); |
| 1930 | case WDA_GET_NOISE_RSP: |
| 1931 | vos_mem_free((v_VOID_t*)limMsg->bodyptr); |
| 1932 | limMsg->bodyptr = NULL; |
| 1933 | //limProcessGetNoiseRsp(pMac, limMsg); |
| 1934 | break; |
| 1935 | |
| 1936 | case WDA_SET_MAX_TX_POWER_RSP: |
| 1937 | #if defined WLAN_FEATURE_VOWIFI |
| 1938 | rrmSetMaxTxPowerRsp( pMac, limMsg ); |
| 1939 | #endif |
| 1940 | if(limMsg->bodyptr != NULL) |
| 1941 | { |
| 1942 | vos_mem_free((v_VOID_t*)limMsg->bodyptr); |
| 1943 | limMsg->bodyptr = NULL; |
| 1944 | } |
| 1945 | break; |
| 1946 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1947 | case SIR_LIM_ADDR2_MISS_IND: |
| 1948 | { |
| 1949 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 1950 | FL("Addr2 mismatch interrupt received %X"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1951 | limMsg->type); |
| 1952 | /*a message from HAL indicating addr2 mismatch interrupt occurred |
| 1953 | limMsg->bodyptr contains only pointer to 48-bit addr2 field*/ |
| 1954 | //Dinesh fix this. the third parameter should be sessionentry. |
| 1955 | //limHandleUnknownA2IndexFrames(pMac, (void *)limMsg->bodyptr); |
| 1956 | |
| 1957 | /*Free message body pointer*/ |
| 1958 | vos_mem_free((v_VOID_t *)(limMsg->bodyptr)); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1959 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1960 | break; |
| 1961 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1962 | |
| 1963 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 1964 | case WDA_AGGR_QOS_RSP: |
| 1965 | limProcessFTAggrQoSRsp( pMac, limMsg ); |
| 1966 | break; |
| 1967 | #endif |
| 1968 | |
| 1969 | case WDA_SET_LINK_STATE_RSP: |
| 1970 | linkStateParams = (tLinkStateParams *)limMsg->bodyptr; |
| 1971 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 1972 | pSession = linkStateParams->session; |
| 1973 | if(linkStateParams->ft) |
| 1974 | { |
| 1975 | limSendReassocReqWithFTIEsMgmtFrame(pMac, |
| 1976 | pSession->pLimMlmReassocReq, |
| 1977 | pSession); |
| 1978 | } |
| 1979 | #endif |
| 1980 | if( linkStateParams->callback ) |
| 1981 | { |
| 1982 | linkStateParams->callback( pMac, linkStateParams->callbackArg ); |
| 1983 | } |
| 1984 | vos_mem_free((v_VOID_t *)(limMsg->bodyptr)); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 1985 | limMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1986 | break; |
| 1987 | |
| 1988 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
| 1989 | case WDA_PACKET_COALESCING_FILTER_MATCH_COUNT_RSP: |
| 1990 | pmmProcessMessage(pMac, limMsg); |
| 1991 | break; |
| 1992 | #endif // WLAN_FEATURE_PACKET_FILTERING |
| 1993 | |
| 1994 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
| 1995 | case WDA_GTK_OFFLOAD_GETINFO_RSP: |
| 1996 | pmmProcessMessage(pMac, limMsg); |
| 1997 | break; |
| 1998 | #endif // WLAN_FEATURE_GTK_OFFLOAD |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 1999 | case eWNI_SME_SET_BCN_FILTER_REQ: |
| 2000 | { |
| 2001 | #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE |
| 2002 | tpPESession psessionEntry; |
| 2003 | tANI_U8 sessionId = (tANI_U8)limMsg->bodyval ; |
| 2004 | psessionEntry = &pMac->lim.gpSession[sessionId]; |
| 2005 | if(psessionEntry != NULL && IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE) |
| 2006 | { |
| 2007 | // sending beacon filtering information down to HAL |
| 2008 | if (limSendBeaconFilterInfo(pMac, psessionEntry) != eSIR_SUCCESS) |
| 2009 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2010 | limLog(pMac, LOGE, FL("Fail to send Beacon Filter Info ")); |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2011 | } |
| 2012 | } |
Dhanashri Atre | d7885c2 | 2013-03-29 11:19:05 -0700 | [diff] [blame] | 2013 | vos_mem_free((v_VOID_t *)(limMsg->bodyptr)); |
| 2014 | limMsg->bodyptr = NULL; |
Yathish | 9f22e66 | 2012-12-10 14:21:35 -0800 | [diff] [blame] | 2015 | #endif |
| 2016 | } |
| 2017 | break; |
Sandeep Puligilla | 11d49a6 | 2014-01-30 12:05:16 +0530 | [diff] [blame] | 2018 | case eWNI_SME_HT40_OBSS_SCAN_IND: |
| 2019 | { |
| 2020 | tpPESession psessionEntry; |
| 2021 | tANI_U8 sessionId = (tANI_U8)limMsg->bodyval ; |
| 2022 | |
| 2023 | psessionEntry = &pMac->lim.gpSession[sessionId]; |
| 2024 | |
| 2025 | VOS_TRACE(VOS_MODULE_ID_PE,VOS_TRACE_LEVEL_INFO, |
| 2026 | "%s eWNI_SME_HT40_OBSS_SCAN_IND htSupportedChannelWidthSet %d \n", |
| 2027 | __func__, psessionEntry->htSupportedChannelWidthSet); |
| 2028 | |
| 2029 | if (psessionEntry != NULL && |
| 2030 | IS_HT40_OBSS_SCAN_FEATURE_ENABLE && |
| 2031 | psessionEntry->htSupportedChannelWidthSet == |
| 2032 | WNI_CFG_CHANNEL_BONDING_MODE_ENABLE ) |
| 2033 | { |
| 2034 | limSendHT40OBSSScanInd(pMac, psessionEntry); |
| 2035 | } |
| 2036 | else |
| 2037 | { |
| 2038 | VOS_TRACE(VOS_MODULE_ID_PE,VOS_TRACE_LEVEL_INFO, |
| 2039 | "OBSS Scan not started: htSupportedChannelWidthSet- %d ", |
| 2040 | psessionEntry->htSupportedChannelWidthSet ); |
| 2041 | } |
| 2042 | vos_mem_free(limMsg->bodyptr); |
| 2043 | limMsg->bodyptr = NULL; |
| 2044 | } |
| 2045 | break; |
| 2046 | case eWNI_SME_HT40_STOP_OBSS_SCAN_IND: |
| 2047 | { |
| 2048 | tpPESession psessionEntry = NULL; |
| 2049 | tANI_U8 sessionId = (tANI_U8)limMsg->bodyval ; |
| 2050 | |
| 2051 | psessionEntry = &pMac->lim.gpSession[sessionId]; |
| 2052 | /* Sending LIM STOP OBSS SCAN Indication |
| 2053 | Stop command support is only for debugging purpose */ |
| 2054 | if ( IS_HT40_OBSS_SCAN_FEATURE_ENABLE ) |
| 2055 | limSendHT40OBSSStopScanInd(pMac, psessionEntry); |
| 2056 | else |
| 2057 | VOS_TRACE(VOS_MODULE_ID_PE,VOS_TRACE_LEVEL_ERROR, |
| 2058 | "OBSS Scan Stop not started "); |
| 2059 | } |
| 2060 | break; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 2061 | #ifdef FEATURE_WLAN_TDLS |
| 2062 | case WDA_SET_TDLS_LINK_ESTABLISH_REQ_RSP: |
| 2063 | { |
Gopichand Nakkala | 24be531 | 2013-07-02 16:47:12 +0530 | [diff] [blame] | 2064 | tpPESession psessionEntry; |
| 2065 | tANI_U8 sessionId; |
Gopichand Nakkala | 574f6d1 | 2013-06-27 19:38:43 +0530 | [diff] [blame] | 2066 | tTdlsLinkEstablishParams *pTdlsLinkEstablishParams; |
| 2067 | pTdlsLinkEstablishParams = (tTdlsLinkEstablishParams*) limMsg->bodyptr; |
Gopichand Nakkala | 24be531 | 2013-07-02 16:47:12 +0530 | [diff] [blame] | 2068 | |
| 2069 | if((psessionEntry = peFindSessionByStaId(pMac, |
| 2070 | pTdlsLinkEstablishParams->staIdx, |
| 2071 | &sessionId))== NULL) |
| 2072 | { |
| 2073 | limLog(pMac, LOGE, FL("session %u does not exist.\n"), sessionId); |
| 2074 | /* Still send the eWNI_SME_TDLS_LINK_ESTABLISH_RSP message to SME |
| 2075 | with session id as zero and status as FAILURE so, that message |
| 2076 | queued in SME queue can be freed to prevent the SME cmd buffer leak */ |
| 2077 | limSendSmeTdlsLinkEstablishReqRsp(pMac, |
| 2078 | 0, |
| 2079 | NULL, |
| 2080 | NULL, |
| 2081 | eSIR_FAILURE); |
| 2082 | } |
| 2083 | else |
| 2084 | { |
| 2085 | limSendSmeTdlsLinkEstablishReqRsp(pMac, |
| 2086 | psessionEntry->smeSessionId, |
| 2087 | NULL, |
| 2088 | NULL, |
| 2089 | pTdlsLinkEstablishParams->status) ; |
| 2090 | } |
Gopichand Nakkala | 574f6d1 | 2013-06-27 19:38:43 +0530 | [diff] [blame] | 2091 | vos_mem_free((v_VOID_t *)(limMsg->bodyptr)); |
| 2092 | limMsg->bodyptr = NULL; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 2093 | break; |
| 2094 | } |
| 2095 | #endif |
Gopichand Nakkala | 2c231c8 | 2013-06-11 17:49:16 +0530 | [diff] [blame] | 2096 | |
| 2097 | case WDA_RX_SCAN_EVENT: |
| 2098 | limProcessRxScanEvent(pMac, limMsg->bodyptr); |
| 2099 | break; |
| 2100 | |
Ravi Joshi | d2ca7c4 | 2013-07-23 08:37:49 -0700 | [diff] [blame] | 2101 | case WDA_IBSS_PEER_INACTIVITY_IND: |
| 2102 | { |
| 2103 | limProcessIbssPeerInactivity(pMac, limMsg->bodyptr); |
| 2104 | vos_mem_free((v_VOID_t *)(limMsg->bodyptr)); |
| 2105 | limMsg->bodyptr = NULL; |
| 2106 | break; |
| 2107 | } |
| 2108 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2109 | default: |
| 2110 | vos_mem_free((v_VOID_t*)limMsg->bodyptr); |
| 2111 | limMsg->bodyptr = NULL; |
| 2112 | // Unwanted messages |
| 2113 | // Log error |
| 2114 | limLog(pMac, LOGE, |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2115 | FL("Discarding unexpected message received %X"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2116 | limMsg->type); |
| 2117 | limPrintMsgName(pMac, LOGE, limMsg->type); |
| 2118 | break; |
| 2119 | |
| 2120 | } // switch (limMsg->type) |
| 2121 | |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2122 | PELOG2(limLog(pMac, LOG2, FL("Done Processing msgType = %d, sme state = %s, mlm state = %s"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2123 | limMsg->type, limSmeStateStr(pMac->lim.gLimSmeState), |
| 2124 | limMlmStateStr(pMac->lim.gLimMlmState));) |
| 2125 | |
| 2126 | } /*** end limProcessMessages() ***/ |
| 2127 | |
| 2128 | |
| 2129 | |
| 2130 | /** |
| 2131 | * limProcessDeferredMessageQueue |
| 2132 | * |
| 2133 | *FUNCTION: |
| 2134 | * This function is called by LIM while exiting from Learn |
| 2135 | * mode. This function fetches messages posted to the LIM |
| 2136 | * deferred message queue limDeferredMsgQ. |
| 2137 | * |
| 2138 | *LOGIC: |
| 2139 | * |
| 2140 | *ASSUMPTIONS: |
| 2141 | * NA |
| 2142 | * |
| 2143 | *NOTE: |
| 2144 | * NA |
| 2145 | * |
| 2146 | * @param pMac - Pointer to Global MAC structure |
| 2147 | * @return None |
| 2148 | */ |
| 2149 | |
| 2150 | void |
| 2151 | limProcessDeferredMessageQueue(tpAniSirGlobal pMac) |
| 2152 | { |
| 2153 | tSirMsgQ limMsg = { 0, 0, 0 }; |
| 2154 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2155 | tSirMsgQ *readMsg; |
| 2156 | tANI_U16 size; |
| 2157 | |
| 2158 | /* |
| 2159 | ** check any deferred messages need to be processed |
| 2160 | **/ |
| 2161 | size = pMac->lim.gLimDeferredMsgQ.size; |
| 2162 | if (size > 0) |
| 2163 | { |
| 2164 | while ((readMsg = limReadDeferredMsgQ(pMac)) != NULL) |
| 2165 | { |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 2166 | vos_mem_copy((tANI_U8*) &limMsg, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2167 | (tANI_U8*) readMsg, sizeof(tSirMsgQ)); |
| 2168 | size--; |
| 2169 | limProcessMessages(pMac, &limMsg); |
| 2170 | |
| 2171 | if((limIsSystemInScanState(pMac)) || (true != GET_LIM_PROCESS_DEFD_MESGS(pMac)) || |
| 2172 | (pMac->lim.gLimSystemInScanLearnMode)) |
| 2173 | break; |
| 2174 | } |
| 2175 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2176 | } /*** end limProcessDeferredMessageQueue() ***/ |
| 2177 | |
| 2178 | |
| 2179 | /* |
| 2180 | * limProcessNormalHddMsg |
| 2181 | * Function: this function checks the current lim state and decide whether the message passed shall be deffered. |
| 2182 | * @param pMac - Pointer to Global MAC structure |
| 2183 | * pLimMsg -- the message need to be processed |
| 2184 | * fRspReqd -- whether return result to hdd |
| 2185 | * @return None |
| 2186 | */ |
| 2187 | void limProcessNormalHddMsg(tpAniSirGlobal pMac, tSirMsgQ *pLimMsg, tANI_U8 fRspReqd) |
| 2188 | { |
| 2189 | tANI_BOOLEAN fDeferMsg = eANI_BOOLEAN_TRUE; |
| 2190 | |
| 2191 | /* Added For BT-AMP Support */ |
| 2192 | if ((pMac->lim.gLimSystemRole == eLIM_AP_ROLE) ||(pMac->lim.gLimSystemRole == eLIM_BT_AMP_AP_ROLE ) |
| 2193 | ||(pMac->lim.gLimSystemRole == eLIM_BT_AMP_STA_ROLE) |
| 2194 | ||(pMac->lim.gLimSystemRole == eLIM_UNKNOWN_ROLE)) |
| 2195 | { |
| 2196 | /** This check is required only for the AP and in 2 cases. |
| 2197 | * 1. If we are in learn mode and we receive any of these messages, |
| 2198 | * you have to come out of scan and process the message, hence dont |
| 2199 | * defer the message here. In handler, these message could be defered |
| 2200 | * till we actually come out of scan mode. |
| 2201 | * 2. If radar is detected, you might have to defer all of these |
| 2202 | * messages except Stop BSS request/ Switch channel request. This |
| 2203 | * decision is also made inside its handler. |
| 2204 | * |
| 2205 | * Please be careful while using the flag fDeferMsg. Possibly you |
| 2206 | * might end up in an infinite loop. |
| 2207 | **/ |
| 2208 | if (((pLimMsg->type == eWNI_SME_START_BSS_REQ) || |
| 2209 | (pLimMsg->type == eWNI_SME_STOP_BSS_REQ) || |
| 2210 | (pLimMsg->type == eWNI_SME_SWITCH_CHL_REQ) || |
| 2211 | (pLimMsg->type == eWNI_SME_SWITCH_CHL_CB_SECONDARY_REQ) || |
| 2212 | (pLimMsg->type == eWNI_SME_SWITCH_CHL_CB_PRIMARY_REQ))) |
| 2213 | { |
| 2214 | fDeferMsg = eANI_BOOLEAN_FALSE; |
| 2215 | } |
| 2216 | } |
| 2217 | |
| 2218 | /* limInsystemInscanState() refers the psessionEntry, how to get session Entry????*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2219 | if (((pMac->lim.gLimAddtsSent) || (limIsSystemInScanState(pMac)) /*|| |
| 2220 | (LIM_IS_RADAR_DETECTED(pMac))*/) && fDeferMsg) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2221 | { |
| 2222 | // System is in DFS (Learn) mode or awaiting addts response |
| 2223 | // or if radar is detected, Defer processsing this message |
| 2224 | if (limDeferMsg(pMac, pLimMsg) != TX_SUCCESS) |
| 2225 | { |
| 2226 | #ifdef WLAN_DEBUG |
| 2227 | pMac->lim.numSme++; |
| 2228 | #endif |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2229 | PELOGE(limLog(pMac, LOGE, FL("Unable to Defer message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2230 | pLimMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState, |
| 2231 | pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState, pMac->lim.gLimPrevMlmState);) |
| 2232 | limLogSessionStates(pMac); |
| 2233 | limPrintMsgName(pMac, LOGE, pLimMsg->type); |
| 2234 | // Release body |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 2235 | vos_mem_free(pLimMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 2236 | pLimMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2237 | } |
| 2238 | } |
| 2239 | else |
| 2240 | { |
| 2241 | if(fRspReqd) |
| 2242 | { |
| 2243 | // These messages are from HDD |
| 2244 | // Since these requests may also be generated |
| 2245 | // internally within LIM module, need to |
| 2246 | // distinquish and send response to host |
| 2247 | pMac->lim.gLimRspReqd = eANI_BOOLEAN_TRUE; |
| 2248 | } |
| 2249 | #ifdef WLAN_DEBUG |
| 2250 | pMac->lim.numSme++; |
| 2251 | #endif |
| 2252 | if(limProcessSmeReqMessages(pMac, pLimMsg)) |
| 2253 | { |
| 2254 | // Release body |
| 2255 | // limProcessSmeReqMessage consumed the buffer. We can free it. |
Bansidhar Gopalachari | 1d9c616 | 2013-07-11 10:24:30 +0530 | [diff] [blame] | 2256 | vos_mem_free(pLimMsg->bodyptr); |
Leela Venkata Kiran Kumar Reddy Chirala | d6c0fe2 | 2013-12-11 19:10:50 -0800 | [diff] [blame] | 2257 | pLimMsg->bodyptr = NULL; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2258 | } |
| 2259 | } |
| 2260 | } |
| 2261 | |
| 2262 | void |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2263 | handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2264 | { |
| 2265 | tSirMacHTCapabilityInfo macHTCapabilityInfo; |
| 2266 | tSirMacHTParametersInfo macHTParametersInfo; |
| 2267 | tSirMacHTInfoField1 macHTInfoField1; |
| 2268 | tSirMacHTInfoField2 macHTInfoField2; |
| 2269 | tSirMacHTInfoField3 macHTInfoField3; |
| 2270 | tANI_U32 cfgValue; |
| 2271 | tANI_U8 *ptr; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2272 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2273 | if (wlan_cfgGetInt(pMac, WNI_CFG_HT_CAP_INFO, &cfgValue) != eSIR_SUCCESS) |
| 2274 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2275 | limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_CAP_INFO value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2276 | return ; |
| 2277 | } |
| 2278 | ptr = (tANI_U8 *) &macHTCapabilityInfo; |
| 2279 | *((tANI_U16 *)ptr) = (tANI_U16) (cfgValue & 0xffff); |
| 2280 | pMac->lim.gHTLsigTXOPProtection = (tANI_U8)macHTCapabilityInfo.lsigTXOPProtection; |
| 2281 | pMac->lim.gHTMIMOPSState = (tSirMacHTMIMOPowerSaveState) macHTCapabilityInfo.mimoPowerSave; |
| 2282 | pMac->lim.gHTGreenfield = (tANI_U8)macHTCapabilityInfo.greenField; |
| 2283 | pMac->lim.gHTMaxAmsduLength = (tANI_U8)macHTCapabilityInfo.maximalAMSDUsize; |
| 2284 | pMac->lim.gHTShortGI20Mhz = (tANI_U8)macHTCapabilityInfo.shortGI20MHz; |
| 2285 | pMac->lim.gHTShortGI40Mhz = (tANI_U8)macHTCapabilityInfo.shortGI40MHz; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2286 | pMac->lim.gHTPSMPSupport = (tANI_U8)macHTCapabilityInfo.psmp; |
| 2287 | pMac->lim.gHTDsssCckRate40MHzSupport = (tANI_U8)macHTCapabilityInfo.dsssCckMode40MHz; |
| 2288 | |
| 2289 | if (wlan_cfgGetInt(pMac, WNI_CFG_HT_AMPDU_PARAMS, &cfgValue) != eSIR_SUCCESS) |
| 2290 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2291 | limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_PARAM_INFO value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2292 | return ; |
| 2293 | } |
| 2294 | ptr = (tANI_U8 *) &macHTParametersInfo; |
| 2295 | *ptr = (tANI_U8) (cfgValue & 0xff); |
| 2296 | pMac->lim.gHTAMpduDensity = (tANI_U8)macHTParametersInfo.mpduDensity; |
| 2297 | pMac->lim.gHTMaxRxAMpduFactor = (tANI_U8)macHTParametersInfo.maxRxAMPDUFactor; |
| 2298 | |
| 2299 | // Get HT IE Info |
| 2300 | if (wlan_cfgGetInt(pMac, WNI_CFG_HT_INFO_FIELD1, &cfgValue) != eSIR_SUCCESS) |
| 2301 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2302 | limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_INFO_FIELD1 value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2303 | return ; |
| 2304 | } |
| 2305 | ptr = (tANI_U8 *) &macHTInfoField1; |
| 2306 | *((tANI_U8 *)ptr) = (tANI_U8) (cfgValue & 0xff); |
| 2307 | pMac->lim.gHTServiceIntervalGranularity = (tANI_U8)macHTInfoField1.serviceIntervalGranularity; |
| 2308 | pMac->lim.gHTControlledAccessOnly = (tANI_U8)macHTInfoField1.controlledAccessOnly; |
| 2309 | pMac->lim.gHTRifsMode = (tANI_U8)macHTInfoField1.rifsMode; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2310 | |
| 2311 | if (wlan_cfgGetInt(pMac, WNI_CFG_HT_INFO_FIELD2, &cfgValue) != eSIR_SUCCESS) |
| 2312 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2313 | limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_INFO_FIELD2 value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2314 | return ; |
| 2315 | } |
| 2316 | ptr = (tANI_U8 *) &macHTInfoField2; |
| 2317 | *((tANI_U16 *)ptr) = (tANI_U16) (cfgValue & 0xffff); |
| 2318 | pMac->lim.gHTOperMode = (tSirMacHTOperatingMode) macHTInfoField2.opMode; |
| 2319 | |
| 2320 | if (wlan_cfgGetInt(pMac, WNI_CFG_HT_INFO_FIELD3, &cfgValue) != eSIR_SUCCESS) |
| 2321 | { |
Kiran Kumar Lokere | 531ca70 | 2013-04-01 13:24:23 -0700 | [diff] [blame] | 2322 | limLog(pMac, LOGP, FL("Fail to retrieve WNI_CFG_HT_INFO_FIELD3 value")); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2323 | return ; |
| 2324 | } |
| 2325 | ptr = (tANI_U8 *) &macHTInfoField3; |
| 2326 | *((tANI_U16 *)ptr) = (tANI_U16) (cfgValue & 0xffff); |
| 2327 | pMac->lim.gHTPCOActive = (tANI_U8)macHTInfoField3.pcoActive; |
| 2328 | pMac->lim.gHTPCOPhase = (tANI_U8)macHTInfoField3.pcoPhase; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2329 | pMac->lim.gHTSecondaryBeacon = (tANI_U8)macHTInfoField3.secondaryBeacon; |
| 2330 | pMac->lim.gHTDualCTSProtection = (tANI_U8)macHTInfoField3.dualCTSProtection; |
| 2331 | pMac->lim.gHTSTBCBasicMCS = (tANI_U8)macHTInfoField3.basicSTBCMCS; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2332 | |
| 2333 | /* The lim globals for channelwidth and secondary chnl have been removed and should not be used during no session; |
| 2334 | * instead direct cfg is read and used when no session for transmission of mgmt frames (same as old); |
| 2335 | * For now, we might come here during init and join with sessionEntry = NULL; in that case just fill the globals which exist |
| 2336 | * Sessionized entries values will be filled in join or add bss req. The ones which are missed in join are filled below |
| 2337 | */ |
| 2338 | if (psessionEntry != NULL) |
| 2339 | { |
Sandeep Puligilla | 11d49a6 | 2014-01-30 12:05:16 +0530 | [diff] [blame] | 2340 | psessionEntry->htCapability = |
| 2341 | IS_DOT11_MODE_HT(psessionEntry->dot11mode); |
| 2342 | psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport = |
| 2343 | (tANI_U8)macHTInfoField3.lsigTXOPProtectionFullSupport; |
| 2344 | if (wlan_cfgGetInt(pMac, WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME, |
| 2345 | &cfgValue) != eSIR_SUCCESS) |
| 2346 | { |
| 2347 | limLog(pMac, LOGE, FL("Fail to retrieve " |
| 2348 | "WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME value")); |
| 2349 | return ; |
| 2350 | } |
| 2351 | psessionEntry->obssHT40ScanParam.OBSSScanActiveDwellTime = cfgValue; |
| 2352 | if (wlan_cfgGetInt(pMac, WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME, |
| 2353 | &cfgValue) != eSIR_SUCCESS) |
| 2354 | { |
| 2355 | limLog(pMac, LOGE, FL("Fail to retrieve " |
| 2356 | "WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME value")); |
| 2357 | return ; |
| 2358 | } |
| 2359 | psessionEntry->obssHT40ScanParam.OBSSScanPassiveDwellTime = cfgValue; |
| 2360 | if (wlan_cfgGetInt(pMac, WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL, |
| 2361 | &cfgValue) != eSIR_SUCCESS) |
| 2362 | { |
| 2363 | limLog(pMac, LOGE, FL("Fail to retrieve " |
| 2364 | "WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL value")); |
| 2365 | return ; |
| 2366 | } |
| 2367 | psessionEntry->obssHT40ScanParam.BSSChannelWidthTriggerScanInterval |
| 2368 | = cfgValue; |
| 2369 | if (wlan_cfgGetInt(pMac, |
| 2370 | WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL, |
| 2371 | &cfgValue) != eSIR_SUCCESS) |
| 2372 | { |
| 2373 | limLog(pMac, LOGE, FL("Fail to retrieve" |
| 2374 | "WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL value")); |
| 2375 | return ; |
| 2376 | } |
| 2377 | psessionEntry->obssHT40ScanParam.OBSSScanActiveTotalPerChannel = |
| 2378 | cfgValue; |
| 2379 | if (wlan_cfgGetInt(pMac, |
| 2380 | WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL, &cfgValue) |
| 2381 | != eSIR_SUCCESS) |
| 2382 | { |
| 2383 | limLog(pMac, LOGE, FL("Fail to retrieve" |
| 2384 | "WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL value")); |
| 2385 | return ; |
| 2386 | } |
| 2387 | psessionEntry->obssHT40ScanParam.OBSSScanPassiveTotalPerChannel = |
| 2388 | cfgValue; |
| 2389 | if (wlan_cfgGetInt(pMac, WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD , |
| 2390 | &cfgValue) != eSIR_SUCCESS) |
| 2391 | { |
| 2392 | limLog(pMac, LOGE, FL("Fail to retrieve " |
| 2393 | "WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD value")); |
| 2394 | return ; |
| 2395 | } |
| 2396 | psessionEntry->obssHT40ScanParam.OBSSScanActivityThreshold = cfgValue; |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 2397 | } |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2398 | } |
| 2399 | |
| 2400 | void limLogSessionStates(tpAniSirGlobal pMac) |
| 2401 | { |
| 2402 | #ifdef WLAN_DEBUG |
| 2403 | int i; |
| 2404 | |
| 2405 | for(i = 0; i < pMac->lim.maxBssId; i++) |
| 2406 | { |
| 2407 | if(pMac->lim.gpSession[i].valid) |
| 2408 | { |
Madan Mohan Koyyalamudi | 5695b50 | 2012-09-24 14:21:12 -0700 | [diff] [blame] | 2409 | PELOG1(limLog(pMac, LOG1, FL("Session[%d] sysRole(%d) limSmeState %d (prev sme state %d) mlm state %d (prev mlm state %d)"), |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 2410 | i, pMac->lim.gpSession[i].limSystemRole, pMac->lim.gpSession[i].limSmeState, |
| 2411 | pMac->lim.gpSession[i].limPrevSmeState, pMac->lim.gpSession[i].limMlmState, |
| 2412 | pMac->lim.gpSession[i].limPrevMlmState);) |
| 2413 | } |
| 2414 | } |
| 2415 | #endif //ifdef WLAN_DEBUG |
| 2416 | } |