blob: 3aa403b40446abb8575963b22ea34eee40c9ef16 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * Airgo Networks, Inc proprietary. All rights reserved.
24 * This file limSendSmeRspMessages.cc contains the functions
25 * for sending SME response/notification messages to applications
26 * above MAC software.
27 * Author: Chandra Modumudi
28 * Date: 02/13/02
29 * History:-
30 * Date Modified by Modification Information
31 * --------------------------------------------------------------------
32 */
33
34#include "vos_types.h"
35#include "wniApi.h"
36#include "sirCommon.h"
37#include "aniGlobal.h"
38
39#if (WNI_POLARIS_FW_PRODUCT == AP)
40#include "wniCfgAp.h"
41#else
42#include "wniCfgSta.h"
43#endif
44#include "sysDef.h"
45#include "cfgApi.h"
46
47#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
48#include "halDataStruct.h"
49#include "halCommonApi.h"
50#endif
51
52#include "schApi.h"
53#include "utilsApi.h"
54#include "limUtils.h"
55#include "limSecurityUtils.h"
56#include "limSerDesUtils.h"
57#include "limSendSmeRspMessages.h"
58#include "limIbssPeerMgmt.h"
59#include "limSessionUtils.h"
60
61
62/**
63 * limSendSmeRsp()
64 *
65 *FUNCTION:
66 * This function is called by limProcessSmeReqMessages() to send
67 * eWNI_SME_START_RSP, eWNI_SME_MEASUREMENT_RSP, eWNI_SME_STOP_BSS_RSP
68 * or eWNI_SME_SWITCH_CHL_RSP messages to applications above MAC
69 * Software.
70 *
71 *PARAMS:
72 *
73 *LOGIC:
74 *
75 *ASSUMPTIONS:
76 * NA
77 *
78 *NOTE:
79 * NA
80 *
81 * @param pMac Pointer to Global MAC structure
82 * @param msgType Indicates message type
83 * @param resultCode Indicates the result of previously issued
84 * eWNI_SME_msgType_REQ message
85 *
86 * @return None
87 */
88
89void
90limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
91 tSirResultCodes resultCode,tANI_U8 smesessionId, tANI_U16 smetransactionId)
92{
93 tSirMsgQ mmhMsg;
94 tSirSmeRsp *pSirSmeRsp;
95
96 PELOG1(limLog(pMac, LOG1,
97 FL("Sending message %s with reasonCode %s\n"),
98 limMsgStr(msgType), limResultCodeStr(resultCode));)
99
100 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, sizeof(tSirSmeRsp)))
101 {
102 /// Buffer not available. Log error
103 limLog(pMac, LOGP,
104 FL("call to palAllocateMemory failed for eWNI_SME_*_RSP\n"));
105
106 return;
107 }
108
109#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
110 sirStoreU16N((tANI_U8*)&pSirSmeRsp->messageType, msgType);
111 sirStoreU16N((tANI_U8*)&pSirSmeRsp->length, sizeof(tSirSmeRsp));
112#else
113 pSirSmeRsp->messageType = msgType;
114 pSirSmeRsp->length = sizeof(tSirSmeRsp);
115#endif
116 pSirSmeRsp->statusCode = resultCode;
117
118 /* Update SME session Id and Transaction Id */
119 pSirSmeRsp->sessionId = smesessionId;
120 pSirSmeRsp->transactionId = smetransactionId;
121
122
123 mmhMsg.type = msgType;
124 mmhMsg.bodyptr = pSirSmeRsp;
125 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -0700126 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700127
128#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
129 {
130 tpPESession psessionEntry = peGetValidPowerSaveSession(pMac);
131 switch(msgType)
132 {
133 case eWNI_PMC_ENTER_BMPS_RSP:
134 limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_BMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
135 break;
136 case eWNI_PMC_EXIT_BMPS_RSP:
137 limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
138 break;
139 case eWNI_PMC_ENTER_IMPS_RSP:
140 limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
141 break;
142 case eWNI_PMC_EXIT_IMPS_RSP:
143 limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
144 break;
145 case eWNI_PMC_ENTER_UAPSD_RSP:
146 limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_UAPSD_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
147 break;
148 case eWNI_PMC_EXIT_UAPSD_RSP:
149 limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_UAPSD_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
150 break;
151 case eWNI_SME_SWITCH_CHL_RSP:
152 limDiagEventReport(pMac, WLAN_PE_DIAG_SWITCH_CHL_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
153 break;
154 case eWNI_SME_STOP_BSS_RSP:
155 limDiagEventReport(pMac, WLAN_PE_DIAG_STOP_BSS_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
156 break;
157 case eWNI_PMC_ENTER_WOWL_RSP:
158 limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
159 break;
160 case eWNI_PMC_EXIT_WOWL_RSP:
161 limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
162 break;
163 }
164 }
165#endif //FEATURE_WLAN_DIAG_SUPPORT
166
167 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
168} /*** end limSendSmeRsp() ***/
169
170
171/**
172 * limSendSmeJoinReassocRspAfterResume()
173 *
174 *FUNCTION:
175 * This function is called to send Join/Reassoc rsp
176 * message to SME after the resume link.
177 *
178 *PARAMS:
179 *
180 *LOGIC:
181 *
182 *ASSUMPTIONS:
183 * NA
184 *
185 *NOTE:
186 * NA
187 *
188 * @param pMac Pointer to Global MAC structure
189 * @param status Resume link status
190 * @param ctx context passed while calling resmune link.
191 * (join response to be sent)
192 *
193 * @return None
194 */
195static void limSendSmeJoinReassocRspAfterResume( tpAniSirGlobal pMac,
196 eHalStatus status, tANI_U32 *ctx)
197{
198 tSirMsgQ mmhMsg;
199 tpSirSmeJoinRsp pSirSmeJoinRsp = (tpSirSmeJoinRsp) ctx;
200
201 mmhMsg.type = pSirSmeJoinRsp->messageType;
202 mmhMsg.bodyptr = pSirSmeJoinRsp;
203 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -0700204 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700205 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
206}
207
208
209/**
210 * limSendSmeJoinReassocRsp()
211 *
212 *FUNCTION:
213 * This function is called by limProcessSmeReqMessages() to send
214 * eWNI_SME_JOIN_RSP or eWNI_SME_REASSOC_RSP messages to applications
215 * above MAC Software.
216 *
217 *PARAMS:
218 *
219 *LOGIC:
220 *
221 *ASSUMPTIONS:
222 * NA
223 *
224 *NOTE:
225 * NA
226 *
227 * @param pMac Pointer to Global MAC structure
228 * @param msgType Indicates message type
229 * @param resultCode Indicates the result of previously issued
230 * eWNI_SME_msgType_REQ message
231 *
232 * @return None
233 */
234
235void
236limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
237 tSirResultCodes resultCode, tANI_U16 protStatusCode,
238 tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId)
239{
240 tpSirSmeJoinRsp pSirSmeJoinRsp;
241 tANI_U32 rspLen;
242 tpDphHashNode pStaDs = NULL;
243
244#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
245 if (msgType == eWNI_SME_REASSOC_RSP)
246 limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
247 else
248 limDiagEventReport(pMac, WLAN_PE_DIAG_JOIN_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
249#endif //FEATURE_WLAN_DIAG_SUPPORT
250
251 PELOG1(limLog(pMac, LOG1,
252 FL("Sending message %s with reasonCode %s\n"),
253 limMsgStr(msgType), limResultCodeStr(resultCode));)
254
255 if(psessionEntry == NULL)
256 {
257
258 rspLen = sizeof(tSirSmeJoinRsp);
259
260 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
261 {
262 /// Buffer not available. Log error
263 limLog(pMac, LOGP, FL("call to palAllocateMemory failed for JOIN/REASSOC_RSP\n"));
264 return;
265 }
266
267 palZeroMemory(pMac, (tANI_U8*)pSirSmeJoinRsp, rspLen);
268
269
270 pSirSmeJoinRsp->beaconLength = 0;
271 pSirSmeJoinRsp->assocReqLength = 0;
272 pSirSmeJoinRsp->assocRspLength = 0;
273 }
274
275 else
276 {
277 rspLen = psessionEntry->assocReqLen + psessionEntry->assocRspLen +
278 psessionEntry->bcnLen +
279#ifdef WLAN_FEATURE_VOWIFI_11R
280 psessionEntry->RICDataLen +
281#endif
282#ifdef FEATURE_WLAN_CCX
283 psessionEntry->tspecLen +
284#endif
285 sizeof(tSirSmeJoinRsp) - sizeof(tANI_U8) ;
286
287 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
288 {
289 /// Buffer not available. Log error
290 limLog(pMac, LOGP,
291 FL("call to palAllocateMemory failed for JOIN/REASSOC_RSP\n"));
292
293 return;
294 }
295
296 palZeroMemory(pMac, (tANI_U8*)pSirSmeJoinRsp, rspLen);
297
298#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
299 sirStoreU16N((tANI_U8*)&pSirSmeJoinRsp->messageType, msgType);
300 sirStoreU16N((tANI_U8*)&pSirSmeJoinRsp->length, rspLen);
301#endif
302
303#if (WNI_POLARIS_FW_PRODUCT == WLAN_STA)
304 if (resultCode == eSIR_SME_SUCCESS)
305 {
306 pStaDs = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable);
307 if (pStaDs == NULL)
308 {
309 PELOGE(limLog(pMac, LOGE, FL("could not Get Self Entry for the station\n"));)
310 }
311 else
312 {
313 //Pass the peer's staId
314 pSirSmeJoinRsp->staId = pStaDs->staIndex;
315 pSirSmeJoinRsp->ucastSig = pStaDs->ucUcastSig;
316 pSirSmeJoinRsp->bcastSig = pStaDs->ucBcastSig;
317 }
318 }
319#endif
320
321#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
322 if (resultCode == eSIR_SME_TRANSFER_STA)
323 {
324 palCopyMemory( pMac->hHdd, pSirSmeJoinRsp->alternateBssId,
325 pMac->lim.gLimAlternateRadio.bssId,
326 sizeof(tSirMacAddr));
327 pSirSmeJoinRsp->alternateChannelId =
328 pMac->lim.gLimAlternateRadio.channelId;
329 }
330#endif
331
332 pSirSmeJoinRsp->beaconLength = 0;
333 pSirSmeJoinRsp->assocReqLength = 0;
334 pSirSmeJoinRsp->assocRspLength = 0;
335#ifdef WLAN_FEATURE_VOWIFI_11R
336 pSirSmeJoinRsp->parsedRicRspLen = 0;
337#endif
338#ifdef FEATURE_WLAN_CCX
339 pSirSmeJoinRsp->tspecIeLen = 0;
340#endif
341
342 if(resultCode == eSIR_SME_SUCCESS)
343 {
344
345 if(psessionEntry->beacon != NULL)
346 {
347 pSirSmeJoinRsp->beaconLength = psessionEntry->bcnLen;
348 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames, psessionEntry->beacon, pSirSmeJoinRsp->beaconLength);
349 palFreeMemory(pMac->hHdd, psessionEntry->beacon);
350 psessionEntry->beacon = NULL;
351#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
352 PELOG1(limLog(pMac, LOG1, FL("Beacon=%d\n"), psessionEntry->bcnLen);)
353#endif
354 }
355
356 if(psessionEntry->assocReq != NULL)
357 {
358 pSirSmeJoinRsp->assocReqLength = psessionEntry->assocReqLen;
359 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen, psessionEntry->assocReq, pSirSmeJoinRsp->assocReqLength);
360 palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
361 psessionEntry->assocReq = NULL;
362#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
363 PELOG1(limLog(pMac, LOG1, FL("AssocReq=%d\n"), psessionEntry->assocReqLen);)
364#endif
365 }
366 if(psessionEntry->assocRsp != NULL)
367 {
368 pSirSmeJoinRsp->assocRspLength = psessionEntry->assocRspLen;
369 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen, psessionEntry->assocRsp, pSirSmeJoinRsp->assocRspLength);
370 palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
371 psessionEntry->assocRsp = NULL;
372 }
373#ifdef WLAN_FEATURE_VOWIFI_11R
374 if(psessionEntry->ricData != NULL)
375 {
376 pSirSmeJoinRsp->parsedRicRspLen = psessionEntry->RICDataLen;
377 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen + psessionEntry->assocRspLen, psessionEntry->ricData, pSirSmeJoinRsp->parsedRicRspLen);
378 palFreeMemory(pMac->hHdd, psessionEntry->ricData);
379 psessionEntry->ricData = NULL;
Jeff Johnsone7245742012-09-05 17:12:55 -0700380 PELOG1(limLog(pMac, LOG1, FL("RicLength=%d\n"), pSirSmeJoinRsp->parsedRicRspLen);)
Jeff Johnson295189b2012-06-20 16:38:30 -0700381 }
382#endif
383#ifdef FEATURE_WLAN_CCX
384 if(psessionEntry->tspecIes != NULL)
385 {
386 pSirSmeJoinRsp->tspecIeLen = psessionEntry->tspecLen;
387 palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen + psessionEntry->assocRspLen + psessionEntry->RICDataLen, psessionEntry->tspecIes, pSirSmeJoinRsp->tspecIeLen);
388 palFreeMemory(pMac->hHdd, psessionEntry->tspecIes);
389 psessionEntry->tspecIes = NULL;
390 PELOG1(limLog(pMac, LOG1, FL("CCX-TspecLen=%d\n"), psessionEntry->tspecLen);)
391 }
392#endif
393 pSirSmeJoinRsp->aid = psessionEntry->limAID;
394#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
395 PELOG1(limLog(pMac, LOG1, FL("AssocRsp=%d\n"), psessionEntry->assocRspLen);)
396#endif
397 }
Madan Mohan Koyyalamudib666eb12012-09-18 17:29:47 -0700398 else
399 {
400
401 if(psessionEntry->beacon != NULL)
402 {
403 palFreeMemory(pMac->hHdd, psessionEntry->beacon);
404 psessionEntry->beacon = NULL;
405 }
406
407 if(psessionEntry->assocReq != NULL)
408 {
409 palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
410 psessionEntry->assocReq = NULL;
411 }
412
413 if(psessionEntry->assocRsp != NULL)
414 {
415 palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
416 psessionEntry->assocRsp = NULL;
417 }
418
419 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700420 }
421
422
423 pSirSmeJoinRsp->messageType = msgType;
424 pSirSmeJoinRsp->length = (tANI_U16) rspLen;
425 pSirSmeJoinRsp->statusCode = resultCode;
426 pSirSmeJoinRsp->protStatusCode = protStatusCode;
427
428 /* Update SME session ID and transaction Id */
429 pSirSmeJoinRsp->sessionId = smesessionId;
430 pSirSmeJoinRsp->transactionId = smetransactionId;
431
432 if(IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
433 {
434 if( psessionEntry && psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE )
435 {
Jeff Johnsone7245742012-09-05 17:12:55 -0700436
437#ifdef WLAN_FEATURE_11AC
438 if (psessionEntry->vhtCapability)
439 {
Jeff Johnson32d95a32012-09-10 13:15:23 -0700440 ePhyChanBondState htSecondaryChannelOffset;
Jeff Johnsone7245742012-09-05 17:12:55 -0700441 /*Get 11ac cbState from 11n cbState*/
442 htSecondaryChannelOffset = limGet11ACPhyCBState(pMac,
443 psessionEntry->currentOperChannel,
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700444 psessionEntry->htSecondaryChannelOffset,
445 psessionEntry->apCenterChan,
446 psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -0700447 peSetResumeChannel( pMac, psessionEntry->currentOperChannel, htSecondaryChannelOffset);
448 }
Jeff Johnson32d95a32012-09-10 13:15:23 -0700449 else
Jeff Johnsone7245742012-09-05 17:12:55 -0700450#endif
Jeff Johnson32d95a32012-09-10 13:15:23 -0700451 peSetResumeChannel( pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset);
Jeff Johnson295189b2012-06-20 16:38:30 -0700452 }
453 else
454 {
455 peSetResumeChannel( pMac, 0, 0);
456 }
457 limResumeLink( pMac, limSendSmeJoinReassocRspAfterResume,
458 (tANI_U32*) pSirSmeJoinRsp );
459 }
460 else
461 {
462 limSendSmeJoinReassocRspAfterResume( pMac, eHAL_STATUS_SUCCESS,
463 (tANI_U32*) pSirSmeJoinRsp );
464 }
465} /*** end limSendSmeJoinReassocRsp() ***/
466
467
468
469/**
470 * limSendSmeStartBssRsp()
471 *
472 *FUNCTION:
473 * This function is called to send eWNI_SME_START_BSS_RSP
474 * message to applications above MAC Software.
475 *
476 *PARAMS:
477 *
478 *LOGIC:
479 *
480 *ASSUMPTIONS:
481 * NA
482 *
483 *NOTE:
484 * NA
485 *
486 * @param pMac Pointer to Global MAC structure
487 * @param msgType Indicates message type
488 * @param resultCode Indicates the result of previously issued
489 * eWNI_SME_msgType_REQ message
490 *
491 * @return None
492 */
493
494void
495limSendSmeStartBssRsp(tpAniSirGlobal pMac,
496 tANI_U16 msgType, tSirResultCodes resultCode,tpPESession psessionEntry,
497 tANI_U8 smesessionId,tANI_U16 smetransactionId)
498{
499
500
501 tANI_U16 size = 0;
502 tSirMsgQ mmhMsg;
503 tSirSmeStartBssRsp *pSirSmeRsp;
504 tANI_U16 ieLen;
505 tANI_U16 ieOffset, curLen;
506
507 PELOG1(limLog(pMac, LOG1, FL("Sending message %s with reasonCode %s\n"),
508 limMsgStr(msgType), limResultCodeStr(resultCode));)
509
510 size = sizeof(tSirSmeStartBssRsp);
511
512 if(psessionEntry == NULL)
513 {
514
515 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, size))
516 {
517 /// Buffer not available. Log error
518 limLog(pMac, LOGP,FL("call to palAllocateMemory failed for eWNI_SME_START_BSS_RSP\n"));
519 return;
520 }
521 palZeroMemory(pMac, (tANI_U8*)pSirSmeRsp, size);
522
523 }
524 else
525 {
526 //subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID
527 ieOffset = sizeof(tAniBeaconStruct) + SIR_MAC_B_PR_SSID_OFFSET;
528 ieLen = pMac->sch.schObject.gSchBeaconOffsetBegin + pMac->sch.schObject.gSchBeaconOffsetEnd - ieOffset;
529 //calculate the memory size to allocate
530 size += ieLen;
531
532 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, size))
533 {
534 /// Buffer not available. Log error
535 limLog(pMac, LOGP,
536 FL("call to palAllocateMemory failed for eWNI_SME_START_BSS_RSP\n"));
537
538 return;
539 }
540 palZeroMemory(pMac, (tANI_U8*)pSirSmeRsp, size);
541 size = sizeof(tSirSmeStartBssRsp);
542 if (resultCode == eSIR_SME_SUCCESS)
543 {
544
545 sirCopyMacAddr(pSirSmeRsp->bssDescription.bssId, psessionEntry->bssId);
546
547 /* Read beacon interval from session */
548 pSirSmeRsp->bssDescription.beaconInterval = (tANI_U16) psessionEntry->beaconParams.beaconInterval;
549 pSirSmeRsp->bssType = psessionEntry->bssType;
550
551 if (cfgGetCapabilityInfo( pMac, &pSirSmeRsp->bssDescription.capabilityInfo,psessionEntry)
552 != eSIR_SUCCESS)
553 limLog(pMac, LOGP, FL("could not retrieve Capabilities value\n"));
554
555 limGetPhyMode(pMac, (tANI_U32 *)&pSirSmeRsp->bssDescription.nwType, psessionEntry);
556
557#if 0
558 if (wlan_cfgGetInt(pMac, WNI_CFG_CURRENT_CHANNEL, &len) != eSIR_SUCCESS)
559 limLog(pMac, LOGP, FL("could not retrieve CURRENT_CHANNEL from CFG\n"));
560
561#endif// TO SUPPORT BT-AMP
562
563 pSirSmeRsp->bssDescription.channelId = psessionEntry->currentOperChannel;
564
565 pSirSmeRsp->bssDescription.aniIndicator = 1;
566
567 curLen = pMac->sch.schObject.gSchBeaconOffsetBegin - ieOffset;
568 palCopyMemory( pMac->hHdd, (tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields,
569 pMac->sch.schObject.gSchBeaconFrameBegin + ieOffset,
570 (tANI_U32)curLen);
571
572 palCopyMemory( pMac->hHdd, ((tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields) + curLen,
573 pMac->sch.schObject.gSchBeaconFrameEnd,
574 (tANI_U32)pMac->sch.schObject.gSchBeaconOffsetEnd);
575
576
577 //subtracting size of length indicator itself and size of pointer to ieFields
578 pSirSmeRsp->bssDescription.length = sizeof(tSirBssDescription) -
579 sizeof(tANI_U16) - sizeof(tANI_U32) +
580 ieLen;
581 //This is the size of the message, subtracting the size of the pointer to ieFields
582 size += ieLen - sizeof(tANI_U32);
583 }
584
585
586
587#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
588 sirStoreU16N((tANI_U8*)&pSirSmeRsp->messageType, msgType);
589 sirStoreU16N((tANI_U8*)&pSirSmeRsp->length, size);
590
591#endif
592
593 }
594
595 pSirSmeRsp->messageType = msgType;
596 pSirSmeRsp->length = size;
597
598 /* Update SME session Id and transaction Id */
599 pSirSmeRsp->sessionId = smesessionId;
600 pSirSmeRsp->transactionId = smetransactionId;
601 pSirSmeRsp->statusCode = resultCode;
602#ifdef WLAN_SOFTAP_FEATURE
603 if(psessionEntry != NULL )
604 pSirSmeRsp->staId = psessionEntry->staId; //else it will be always zero smeRsp StaID = 0
605
606#endif
607
608 mmhMsg.type = msgType;
609 mmhMsg.bodyptr = pSirSmeRsp;
610 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -0700611 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700612
613#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
614 limDiagEventReport(pMac, WLAN_PE_DIAG_START_BSS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
615#endif //FEATURE_WLAN_DIAG_SUPPORT
616
617 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
618} /*** end limSendSmeStartBssRsp() ***/
619
620
621
622
623
624#define LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED 20
625#define LIM_SIZE_OF_EACH_BSS 400 // this is a rough estimate
626
627
628/**
629 * limSendSmeScanRsp()
630 *
631 *FUNCTION:
632 * This function is called by limProcessSmeReqMessages() to send
633 * eWNI_SME_SCAN_RSP message to applications above MAC
634 * Software.
635 *
636 *PARAMS:
637 *
638 *LOGIC:
639 *
640 *ASSUMPTIONS:
641 * NA
642 *
643 *NOTE:
644 * NA
645 *
646 * @param pMac Pointer to Global MAC structure
647 * @param length Indicates length of message
648 * @param resultCode Indicates the result of previously issued
649 * eWNI_SME_SCAN_REQ message
650 *
651 * @return None
652 */
653
654void
655limSendSmeScanRsp(tpAniSirGlobal pMac, tANI_U16 length,
656 tSirResultCodes resultCode,tANI_U8 smesessionId,tANI_U16 smetranscationId)
657{
658 tSirMsgQ mmhMsg;
659 tpSirSmeScanRsp pSirSmeScanRsp=NULL;
660 tLimScanResultNode *ptemp = NULL;
661 tANI_U16 msgLen, allocLength, curMsgLen = 0;
662 tANI_U16 i, bssCount;
663 tANI_U8 *pbBuf;
664 tSirBssDescription *pDesc;
665
666 PELOG1(limLog(pMac, LOG1,
667 FL("Sending message SME_SCAN_RSP with length=%d reasonCode %s\n"),
668 length, limResultCodeStr(resultCode));)
669
670 if (resultCode != eSIR_SME_SUCCESS)
671 {
672 limPostSmeScanRspMessage(pMac, length, resultCode,smesessionId,smetranscationId);
673 return;
674 }
675
676 mmhMsg.type = eWNI_SME_SCAN_RSP;
677 i = 0;
678 bssCount = 0;
679 msgLen = 0;
680 allocLength = LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED * LIM_SIZE_OF_EACH_BSS;
681 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, allocLength))
682 {
683 // Log error
684 limLog(pMac, LOGP,
685 FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
686
687 return;
688 }
689 for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++)
690 {
691 //when ptemp is not NULL it is a left over
692 ptemp = pMac->lim.gLimCachedScanHashTable[i];
693 while(ptemp)
694 {
695 pbBuf = ((tANI_U8 *)pSirSmeScanRsp) + msgLen;
696 if(0 == bssCount)
697 {
698 msgLen = sizeof(tSirSmeScanRsp) -
699 sizeof(tSirBssDescription) +
700 ptemp->bssDescription.length +
701 sizeof(ptemp->bssDescription.length);
702 pDesc = pSirSmeScanRsp->bssDescription;
703 }
704 else
705 {
706 msgLen += ptemp->bssDescription.length +
707 sizeof(ptemp->bssDescription.length);
708 pDesc = (tSirBssDescription *)pbBuf;
709 }
710 if( (allocLength < msgLen) ||
711 (LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED <= bssCount++) )
712 {
713 pSirSmeScanRsp->statusCode =
714 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW;
715#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
716 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->messageType,
717 eWNI_SME_SCAN_RSP);
718 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->length, curMsgLen);
719#else
720 pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
721 pSirSmeScanRsp->length = curMsgLen;
722#endif
723 mmhMsg.bodyptr = pSirSmeScanRsp;
724 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -0700725 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700726 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
727 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, allocLength))
728 {
729 // Log error
730 limLog(pMac, LOGP,
731 FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
732 return;
733 }
734 msgLen = sizeof(tSirSmeScanRsp) -
735 sizeof(tSirBssDescription) +
736 ptemp->bssDescription.length +
737 sizeof(ptemp->bssDescription.length);
738 pDesc = pSirSmeScanRsp->bssDescription;
739 bssCount = 1;
740 }
741 curMsgLen = msgLen;
742
743 PELOG2(limLog(pMac, LOG2, FL("ScanRsp : msgLen %d, bssDescr Len=%d\n"),
744 msgLen, ptemp->bssDescription.length);)
745#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
746 sirStoreU16N((tANI_U8*)&pDesc->length,
747 ptemp->bssDescription.length);
748#else
749 pDesc->length
750 = ptemp->bssDescription.length;
751#endif
752 palCopyMemory( pMac->hHdd, (tANI_U8 *) &pDesc->bssId,
753 (tANI_U8 *) &ptemp->bssDescription.bssId,
754 ptemp->bssDescription.length);
755
756 PELOG2(limLog(pMac, LOG2, FL("BssId "));
757 limPrintMacAddr(pMac, ptemp->bssDescription.bssId, LOG2);)
758
759 pSirSmeScanRsp->sessionId = smesessionId;
760 pSirSmeScanRsp->transcationId = smetranscationId;
761
762 ptemp = ptemp->next;
763 } //while(ptemp)
764 } //for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++)
765
766 if(0 == bssCount)
767 {
768 limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId);
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700769 if (NULL != pSirSmeScanRsp)
770 {
771 palFreeMemory( pMac->hHdd, pSirSmeScanRsp);
772 pSirSmeScanRsp = NULL;
773 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700774 }
775 else
776 {
777 // send last message
778 pSirSmeScanRsp->statusCode = eSIR_SME_SUCCESS;
779#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
780 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->messageType,
781 eWNI_SME_SCAN_RSP);
782 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->length, curMsgLen);
783#else
784 pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
785 pSirSmeScanRsp->length = curMsgLen;
786#endif
787
788 /* Update SME session Id and SME transcation Id */
789 pSirSmeScanRsp->sessionId = smesessionId;
790 pSirSmeScanRsp->transcationId = smetranscationId;
791
792 mmhMsg.type = eWNI_SME_SCAN_RSP;
793 mmhMsg.bodyptr = pSirSmeScanRsp;
794 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -0700795 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700796 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
797 PELOG2(limLog(pMac, LOG2, FL("statusCode : eSIR_SME_SUCCESS\n"));)
798 }
799
800 return;
801
802} /*** end limSendSmeScanRsp() ***/
803
804
805/**
806 * limPostSmeScanRspMessage()
807 *
808 *FUNCTION:
809 * This function is called by limSendSmeScanRsp() to send
810 * eWNI_SME_SCAN_RSP message with failed result code
811 *
812 *NOTE:
813 * NA
814 *
815 * @param pMac Pointer to Global MAC structure
816 * @param length Indicates length of message
817 * @param resultCode failed result code
818 *
819 * @return None
820 */
821
822void
823limPostSmeScanRspMessage(tpAniSirGlobal pMac,
824 tANI_U16 length,
825 tSirResultCodes resultCode,tANI_U8 smesessionId, tANI_U16 smetransactionId)
826{
827 tpSirSmeScanRsp pSirSmeScanRsp;
828 tSirMsgQ mmhMsg;
829
830 PELOG1(limLog(pMac, LOG1,
831 FL("limPostSmeScanRspMessage: send SME_SCAN_RSP (len %d, reasonCode %s). \n"),
832 length, limResultCodeStr(resultCode));)
833
834 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, length))
835 {
836 limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
837 return;
838 }
839 palZeroMemory(pMac->hHdd, (void*)pSirSmeScanRsp, length);
840
841#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
842 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->messageType, eWNI_SME_SCAN_RSP);
843 sirStoreU16N((tANI_U8*)&pSirSmeScanRsp->length, length);
844#else
845 pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
846 pSirSmeScanRsp->length = length;
847#endif
848
849 if(sizeof(tSirSmeScanRsp) <= length)
850 {
851 pSirSmeScanRsp->bssDescription->length = sizeof(tSirBssDescription);
852 }
853
854 pSirSmeScanRsp->statusCode = resultCode;
855
856 /*Update SME session Id and transaction Id */
857 pSirSmeScanRsp->sessionId = smesessionId;
858 pSirSmeScanRsp->transcationId = smetransactionId;
859
860 mmhMsg.type = eWNI_SME_SCAN_RSP;
861 mmhMsg.bodyptr = pSirSmeScanRsp;
862 mmhMsg.bodyval = 0;
863
Jeff Johnsone7245742012-09-05 17:12:55 -0700864 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700865#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
866 limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
867#endif //FEATURE_WLAN_DIAG_SUPPORT
868
869 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
870 return;
871
872} /*** limPostSmeScanRspMessage ***/
873
Jeff Johnsone7245742012-09-05 17:12:55 -0700874#ifdef FEATURE_OEM_DATA_SUPPORT
875
876/**
877 * limSendSmeOemDataRsp()
878 *
879 *FUNCTION:
880 * This function is called by limProcessSmeReqMessages() to send
881 * eWNI_SME_OEM_DATA_RSP message to applications above MAC
882 * Software.
883 *
884 *PARAMS:
885 *
886 *LOGIC:
887 *
888 *ASSUMPTIONS:
889 * NA
890 *
891 *NOTE:
892 * NA
893 *
894 * @param pMac Pointer to Global MAC structure
895 * @param pMsgBuf Indicates the mlm message
896 * @param resultCode Indicates the result of previously issued
897 * eWNI_SME_OEM_DATA_RSP message
898 *
899 * @return None
900 */
901
902void limSendSmeOemDataRsp(tpAniSirGlobal pMac, tANI_U32* pMsgBuf, tSirResultCodes resultCode)
903{
904 tSirMsgQ mmhMsg;
905 tSirOemDataRsp* pSirSmeOemDataRsp=NULL;
906 tLimMlmOemDataRsp* pMlmOemDataRsp=NULL;
907 tANI_U16 msgLength;
908
909
910 //get the pointer to the mlm message
911 pMlmOemDataRsp = (tLimMlmOemDataRsp*)(pMsgBuf);
912
913 msgLength = sizeof(tSirOemDataRsp);
914
915 //now allocate memory for the char buffer
916 if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)&pSirSmeOemDataRsp, msgLength))
917 {
918 limLog(pMac, LOGP, FL("call to palAllocateMemory failed for pSirSmeOemDataRsp\n"));
919 return;
920 }
921
922#if defined (ANI_LITTLE_BYTE_ENDIAN)
923 sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->length, msgLength);
924 sirStoreU16N((tANI_U8*)&pSirSmeOemDataRsp->messageType, eWNI_SME_OEM_DATA_RSP);
925#else
926 pSirSmeOemDataRsp->length = msgLength;
927 pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP;
928#endif
929
930 palCopyMemory(pMac->hHdd, pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE);
931
932 //Now free the memory from MLM Rsp Message
933 palFreeMemory(pMac->hHdd, pMlmOemDataRsp);
934
935 mmhMsg.type = eWNI_SME_OEM_DATA_RSP;
936 mmhMsg.bodyptr = pSirSmeOemDataRsp;
937 mmhMsg.bodyval = 0;
938
939 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
940
941 return;
942} /*** limSendSmeOemDataRsp ***/
943
944#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700945
946
947/**
948 * limSendSmeAuthRsp()
949 *
950 *FUNCTION:
951 * This function is called by limProcessSmeMessages() to send
952 * eWNI_SME_AUTH_RSP message to host
953 *
954 *PARAMS:
955 *
956 *LOGIC:
957 *
958 *ASSUMPTIONS:
959 * NA
960 *
961 *NOTE:
962 * NA
963 *
964 * @param pMac Pointer to Global MAC structure
965 * @param statusCode Indicates the result of previously issued
966 * eWNI_SME_AUTH_REQ message
967 *
968 * @return None
969 */
970void
971limSendSmeAuthRsp(tpAniSirGlobal pMac,
972 tSirResultCodes statusCode,
973 tSirMacAddr peerMacAddr,
974 tAniAuthType authType,
975 tANI_U16 protStatusCode,
976 tpPESession psessionEntry,tANI_U8 smesessionId,
977 tANI_U16 smetransactionId)
978{
979#if 0
980 tSirMsgQ mmhMsg;
981 tSirSmeAuthRsp *pSirSmeAuthRsp;
982
983
984 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeAuthRsp, sizeof(tSirSmeAuthRsp)))
985 {
986 // Log error
987 limLog(pMac, LOGP,
988 FL("call to palAllocateMemory failed for eWNI_SME_AUTH_RSP\n"));
989
990 return;
991 }
992
993#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
994 sirStoreU16N((tANI_U8*)&pSirSmeAuthRsp->messageType, eWNI_SME_AUTH_RSP);
995 sirStoreU16N((tANI_U8*)&pSirSmeAuthRsp->length, sizeof(tSirSmeAuthRsp));
996
997#endif
998
999
1000 if(psessionEntry != NULL)
1001 {
1002 palCopyMemory( pMac->hHdd, (tANI_U8 *) pSirSmeAuthRsp->peerMacAddr,
1003 (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
1004 pSirSmeAuthRsp->authType = authType;
1005
1006 }
1007
1008 pSirSmeAuthRsp->messageType = eWNI_SME_AUTH_RSP;
1009 pSirSmeAuthRsp->length = sizeof(tSirSmeAuthRsp);
1010 pSirSmeAuthRsp->statusCode = statusCode;
1011 pSirSmeAuthRsp->protStatusCode = protStatusCode;
1012
1013 /* Update SME session and transaction Id*/
1014 pSirSmeAuthRsp->sessionId = smesessionId;
1015 pSirSmeAuthRsp->transactionId = smetransactionId;
1016
1017 mmhMsg.type = eWNI_SME_AUTH_RSP;
1018 mmhMsg.bodyptr = pSirSmeAuthRsp;
1019 mmhMsg.bodyval = 0;
1020 MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
1021 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1022#endif
1023} /*** end limSendSmeAuthRsp() ***/
1024
1025
1026void limSendSmeDisassocDeauthNtfPostResume( tpAniSirGlobal pMac,
1027 eHalStatus status, tANI_U32 *pCtx )
1028{
1029 tSirMsgQ mmhMsg;
1030 tSirMsgQ *pMsg = (tSirMsgQ*) pCtx;
1031
1032 mmhMsg.type = pMsg->type;
1033 mmhMsg.bodyptr = pMsg;
1034 mmhMsg.bodyval = 0;
1035
Jeff Johnsone7245742012-09-05 17:12:55 -07001036 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001037
1038 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1039}
1040/**
1041 * limSendSmeDisassocNtf()
1042 *
1043 *FUNCTION:
1044 * This function is called by limProcessSmeMessages() to send
1045 * eWNI_SME_DISASSOC_RSP/IND message to host
1046 *
1047 *PARAMS:
1048 *
1049 *LOGIC:
1050 *
1051 *ASSUMPTIONS:
1052 * NA
1053 *
1054 *NOTE:
1055 * This function is used for sending eWNI_SME_DISASSOC_CNF,
1056 * or eWNI_SME_DISASSOC_IND to host depending on
1057 * disassociation trigger.
1058 *
1059 * @param peerMacAddr Indicates the peer MAC addr to which
1060 * disassociate was initiated
1061 * @param reasonCode Indicates the reason for Disassociation
1062 * @param disassocTrigger Indicates the trigger for Disassociation
1063 * @param aid Indicates the STAID. This parameter is
1064 * present only on AP.
1065 *
1066 * @return None
1067 */
1068void
1069limSendSmeDisassocNtf(tpAniSirGlobal pMac,
1070 tSirMacAddr peerMacAddr,
1071 tSirResultCodes reasonCode,
1072 tANI_U16 disassocTrigger,
1073 tANI_U16 aid,
1074 tANI_U8 smesessionId,
1075 tANI_U16 smetransactionId,
1076 tpPESession psessionEntry)
1077{
1078
1079 tANI_U8 *pBuf;
1080 tSirSmeDisassocRsp *pSirSmeDisassocRsp;
1081 tSirSmeDisassocInd *pSirSmeDisassocInd;
1082 tANI_U32 *pMsg;
1083
1084 switch (disassocTrigger)
1085 {
1086 case eLIM_PEER_ENTITY_DISASSOC:
1087 return;
1088
1089 case eLIM_HOST_DISASSOC:
1090 /**
1091 * Disassociation response due to
1092 * host triggered disassociation
1093 */
1094
1095 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocRsp, sizeof(tSirSmeDisassocRsp)))
1096 {
1097 // Log error
1098 limLog(pMac, LOGP,
1099 FL("call to palAllocateMemory failed for eWNI_SME_DISASSOC_RSP\n"));
1100
1101 return;
1102 }
1103
1104#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1105 sirStoreU16N((tANI_U8*)&pSirSmeDisassocRsp->messageType,
1106 eWNI_SME_DISASSOC_RSP);
1107 sirStoreU16N((tANI_U8*)&pSirSmeDisassocRsp->length,
1108 sizeof(tSirSmeDisassocRsp));
1109#else
1110 pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP;
1111 pSirSmeDisassocRsp->length = sizeof(tSirSmeDisassocRsp);
1112#endif
1113 //sessionId
1114 pBuf = (tANI_U8 *) &pSirSmeDisassocRsp->sessionId;
1115 *pBuf = smesessionId;
1116 pBuf++;
1117
1118 //transactionId
1119 limCopyU16(pBuf, smetransactionId);
1120 pBuf += sizeof(tANI_U16);
1121
1122 //statusCode
1123 limCopyU32(pBuf, reasonCode);
1124 pBuf += sizeof(tSirResultCodes);
1125
1126 //peerMacAddr
1127 palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
1128 pBuf += sizeof(tSirMacAddr);
1129
1130#if (WNI_POLARIS_FW_PRODUCT == AP)
1131 limCopyU16(pBuf, aid);
1132 pBuf += sizeof(tANI_U16);
1133
1134 // perStaStats
1135 limStatSerDes(pMac, &pMac->hal.halMac.macStats.pPerStaStats[aid].staStat, pBuf);
1136#else
1137 // Clear Station Stats
1138 //for sta, it is always 1, IBSS is handled at halInitSta
1139
1140#endif//#if (WNI_POLARIS_FW_PRODUCT == AP)
1141
1142
1143#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1144 limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_RSP_EVENT,
1145 psessionEntry, (tANI_U16)reasonCode, 0);
1146#endif
1147 pMsg = (tANI_U32*) pSirSmeDisassocRsp;
1148 break;
1149
1150 default:
1151 /**
1152 * Disassociation indication due to Disassociation
1153 * frame reception from peer entity or due to
1154 * loss of link with peer entity.
1155 */
1156 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocInd, sizeof(tSirSmeDisassocInd)))
1157 {
1158 // Log error
1159 limLog(pMac, LOGP,
1160 FL("call to palAllocateMemory failed for eWNI_SME_DISASSOC_IND\n"));
1161
1162 return;
1163 }
1164
1165#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1166 sirStoreU16N((tANI_U8*)&pSirSmeDisassocInd->messageType,
1167 eWNI_SME_DISASSOC_IND);
1168 sirStoreU16N((tANI_U8*)&pSirSmeDisassocInd->length,
1169 sizeof(tSirSmeDisassocInd));
1170#else
1171 pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
1172 pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd);
1173
1174 /* Update SME session Id and Transaction Id */
1175 pSirSmeDisassocInd->sessionId = smesessionId;
1176 pSirSmeDisassocInd->transactionId = smetransactionId;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001177 pSirSmeDisassocInd->reasonCode = reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001178#endif
1179 pBuf = (tANI_U8 *) &pSirSmeDisassocInd->statusCode;
1180
1181 limCopyU32(pBuf, reasonCode);
1182 pBuf += sizeof(tSirResultCodes);
1183
1184 palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
1185 pBuf += sizeof(tSirMacAddr);
1186
1187 palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
1188#if (WNI_POLARIS_FW_PRODUCT == AP)
1189 pBuf += sizeof(tSirMacAddr);
1190 limCopyU16(pBuf, aid);
1191 pBuf += sizeof(tANI_U16);
1192
1193 limStatSerDes(pMac, &pMac->hal.halMac.macStats.pPerStaStats[aid].staStat, pBuf);
1194
1195#endif//#if (WNI_POLARIS_FW_PRODUCT == AP)
1196
1197
1198#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1199 limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,
1200 psessionEntry, (tANI_U16)reasonCode, 0);
1201#endif
1202 pMsg = (tANI_U32*) pSirSmeDisassocInd;
1203#if (WNI_POLARIS_FW_PRODUCT == AP)
1204 PELOG1(limLog(pMac, LOG1,
1205 FL("*** Sending DisAssocInd staId=%d, reasonCode=%d ***\n"),
1206 aid, reasonCode);)
1207#endif
1208
1209 break;
1210 }
1211
1212 /* Delete the PE session Created */
1213 if((psessionEntry != NULL) && ((psessionEntry ->limSystemRole == eLIM_STA_ROLE) ||
1214 (psessionEntry ->limSystemRole == eLIM_BT_AMP_STA_ROLE)) )
1215 {
1216 peDeleteSession(pMac,psessionEntry);
1217 }
1218
1219 if( IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
1220 {
1221 //Resume on the first active session channel.
Jeff Johnsone7245742012-09-05 17:12:55 -07001222 tANI_U8 resumeChannel;
1223 ePhyChanBondState resumePhyCbState;
1224 peGetActiveSessionChannel( pMac, &resumeChannel, &resumePhyCbState );
1225 peSetResumeChannel( pMac, resumeChannel, resumePhyCbState );
Jeff Johnson295189b2012-06-20 16:38:30 -07001226
1227 limResumeLink( pMac, limSendSmeDisassocDeauthNtfPostResume,
1228 (tANI_U32*) pMsg );
1229 }
1230 else
1231 {
1232 limSendSmeDisassocDeauthNtfPostResume( pMac, eHAL_STATUS_SUCCESS,
1233 (tANI_U32*) pMsg );
1234 }
1235} /*** end limSendSmeDisassocNtf() ***/
1236
1237
1238/** -----------------------------------------------------------------
1239 \brief limSendSmeDisassocInd() - sends SME_DISASSOC_IND
1240
1241 After receiving disassociation frame from peer entity, this
1242 function sends a eWNI_SME_DISASSOC_IND to SME with a specific
1243 reason code.
1244
1245 \param pMac - global mac structure
1246 \param pStaDs - station dph hash node
1247 \return none
1248 \sa
1249 ----------------------------------------------------------------- */
1250void
1251limSendSmeDisassocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs,tpPESession psessionEntry)
1252{
1253 tSirMsgQ mmhMsg;
1254 tSirSmeDisassocInd *pSirSmeDisassocInd;
1255
1256 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocInd, sizeof(tSirSmeDisassocInd)))
1257 {
1258 limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_DISASSOC_IND\n"));
1259 return;
1260 }
1261
1262 //psessionEntry = peFindSessionByBssid(pMac,pStaDs->staAddr,&sessionId);
1263#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1264 sirStoreU16N((tANI_U8*)&pSirSmeDisassocInd->messageType, eWNI_SME_DISASSOC_IND);
1265 sirStoreU16N((tANI_U8*)&pSirSmeDisassocInd->length, sizeof(tSirSmeDisassocInd));
1266#else
1267 pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
1268 pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd);
1269#endif
1270
1271#if 0 //Commenting out all the serialization
1272 //statusCode
1273 pBuf = (tANI_U8 *) &pSirSmeDisassocInd->statusCode;
1274 limCopyU32(pBuf, pStaDs->mlmStaContext.disassocReason);
1275 pBuf += sizeof(tSirResultCodes);
1276
1277 //peerMacAddr
1278 palCopyMemory( pMac->hHdd, pBuf, pStaDs->staAddr, sizeof(tSirMacAddr));
1279
1280#ifdef ANI_PRODUCT_TYPE_AP
1281 pBuf += sizeof(tSirMacAddr);
1282 //aid
1283 limCopyU16(pBuf, pStaDs->assocId);
1284 pBuf += sizeof(tANI_U16);
1285
1286 //perStaStats
1287 limStatSerDes(pMac, &pMac->hal.halMac.macStats.pPerStaStats[pStaDs->assocId].staStat, pBuf);
1288#endif
1289#endif
1290 pSirSmeDisassocInd->sessionId = psessionEntry->smeSessionId;
1291 pSirSmeDisassocInd->transactionId = psessionEntry->transactionId;
1292 pSirSmeDisassocInd->statusCode = pStaDs->mlmStaContext.disassocReason;
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001293 pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
Jeff Johnson295189b2012-06-20 16:38:30 -07001294
1295 palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->bssId , psessionEntry->bssId , sizeof(tSirMacAddr));
1296
1297 palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->peerMacAddr , pStaDs->staAddr, sizeof(tSirMacAddr));
1298
1299#ifdef ANI_PRODUCT_TYPE_AP
1300 pSirSmeDisassocInd->aid = pStaDs->assocId;
1301 limStatSerDes(pMac, &pMac->hal.halMac.macStats.pPerStaStats[pStaDs->assocId].staStat,(tANI_U8*)&pSirSmeDisassocInd-> perStaStats );
1302#endif
1303#ifdef WLAN_SOFTAP_FEATURE
1304 pSirSmeDisassocInd->staId = pStaDs->staIndex;
1305#endif
1306
1307 mmhMsg.type = eWNI_SME_DISASSOC_IND;
1308 mmhMsg.bodyptr = pSirSmeDisassocInd;
1309 mmhMsg.bodyval = 0;
1310
Jeff Johnsone7245742012-09-05 17:12:55 -07001311 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001312#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1313 limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry, 0, (tANI_U16)pStaDs->mlmStaContext.disassocReason);
1314#endif //FEATURE_WLAN_DIAG_SUPPORT
1315
1316 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1317
1318} /*** end limSendSmeDisassocInd() ***/
1319
1320
1321/** -----------------------------------------------------------------
1322 \brief limSendSmeDeauthInd() - sends SME_DEAUTH_IND
1323
1324 After receiving deauthentication frame from peer entity, this
1325 function sends a eWNI_SME_DEAUTH_IND to SME with a specific
1326 reason code.
1327
1328 \param pMac - global mac structure
1329 \param pStaDs - station dph hash node
1330 \return none
1331 \sa
1332 ----------------------------------------------------------------- */
1333void
1334limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)
1335{
1336#ifndef WLAN_SOFTAP_FEATURE
1337 tANI_U8 *pBuf;
1338#endif
1339 tSirMsgQ mmhMsg;
1340 tSirSmeDeauthInd *pSirSmeDeauthInd;
1341
1342 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthInd, sizeof(tSirSmeDeauthInd)))
1343 {
1344 limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_DEAUTH_IND \n"));
1345 return;
1346 }
1347
1348#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1349 sirStoreU16N((tANI_U8*)&pSirSmeDeauthInd->messageType, eWNI_SME_DEAUTH_IND);
1350 sirStoreU16N((tANI_U8*)&pSirSmeDeauthInd->length, sizeof(tSirSmeDeauthInd));
1351#else
1352 pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
1353 pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd);
1354#endif
1355
1356#ifdef WLAN_SOFTAP_FEATURE
1357 pSirSmeDeauthInd->sessionId = psessionEntry->smeSessionId;
1358 pSirSmeDeauthInd->transactionId = psessionEntry->transactionId;
1359 if(eSIR_INFRA_AP_MODE == psessionEntry->bssType)
1360 {
1361 pSirSmeDeauthInd->statusCode = (tSirResultCodes)pStaDs->mlmStaContext.cleanupTrigger;
1362 }
1363 else
1364 {
1365 //Need to indicatet he reascon code over the air
1366 pSirSmeDeauthInd->statusCode = (tSirResultCodes)pStaDs->mlmStaContext.disassocReason;
1367 }
1368 //BSSID
1369 palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
1370 //peerMacAddr
1371 palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr));
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001372 pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
Jeff Johnson295189b2012-06-20 16:38:30 -07001373#else
1374
1375 //sessionId
1376 pBuf = (tANI_U8 *) &pSirSmeDeauthInd->sessionId;
1377 *pBuf++ = psessionEntry->smeSessionId;
1378
1379 //transactionId
1380 limCopyU16(pBuf, 0);
1381 pBuf += sizeof(tANI_U16);
1382
1383 // status code
1384 limCopyU32(pBuf, pStaDs->mlmStaContext.cleanupTrigger);
1385 pBuf += sizeof(tSirResultCodes);
1386
1387 //bssid
1388 palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
1389 pBuf += sizeof(tSirMacAddr);
1390
1391 //peerMacAddr
1392 palCopyMemory( pMac->hHdd, pBuf, pStaDs->staAddr, sizeof(tSirMacAddr));
1393#endif
1394
1395#if (WNI_POLARIS_FW_PRODUCT == AP)
1396 pBuf += sizeof(tSirMacAddr);
1397 limCopyU16(pBuf, pStaDs->staAddr);
1398#endif
1399
1400#ifdef WLAN_SOFTAP_FEATURE
1401 pSirSmeDeauthInd->staId = pStaDs->staIndex;
1402#endif
1403
1404 mmhMsg.type = eWNI_SME_DEAUTH_IND;
1405 mmhMsg.bodyptr = pSirSmeDeauthInd;
1406 mmhMsg.bodyval = 0;
1407
Jeff Johnsone7245742012-09-05 17:12:55 -07001408 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001409#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1410 limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, psessionEntry, 0, pStaDs->mlmStaContext.cleanupTrigger);
1411#endif //FEATURE_WLAN_DIAG_SUPPORT
1412
1413 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1414 return;
1415} /*** end limSendSmeDeauthInd() ***/
1416
1417
1418/**
1419 * limSendSmeDeauthNtf()
1420 *
1421 *FUNCTION:
1422 * This function is called by limProcessSmeMessages() to send
1423 * eWNI_SME_DISASSOC_RSP/IND message to host
1424 *
1425 *PARAMS:
1426 *
1427 *LOGIC:
1428 *
1429 *ASSUMPTIONS:
1430 * NA
1431 *
1432 *NOTE:
1433 * This function is used for sending eWNI_SME_DEAUTH_CNF or
1434 * eWNI_SME_DEAUTH_IND to host depending on deauthentication trigger.
1435 *
1436 * @param peerMacAddr Indicates the peer MAC addr to which
1437 * deauthentication was initiated
1438 * @param reasonCode Indicates the reason for Deauthetication
1439 * @param deauthTrigger Indicates the trigger for Deauthetication
1440 * @param aid Indicates the STAID. This parameter is present
1441 * only on AP.
1442 *
1443 * @return None
1444 */
1445void
1446limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCodes reasonCode,
1447 tANI_U16 deauthTrigger, tANI_U16 aid,tANI_U8 smesessionId, tANI_U16 smetransactionId)
1448{
1449 tANI_U8 *pBuf;
1450 tSirSmeDeauthRsp *pSirSmeDeauthRsp;
1451 tSirSmeDeauthInd *pSirSmeDeauthInd;
1452 tpPESession psessionEntry;
1453 tANI_U8 sessionId;
1454 tANI_U32 *pMsg;
1455
1456 psessionEntry = peFindSessionByBssid(pMac,peerMacAddr,&sessionId);
1457 switch (deauthTrigger)
1458 {
1459 case eLIM_PEER_ENTITY_DEAUTH:
1460 return;
1461
1462 case eLIM_HOST_DEAUTH:
1463 /**
1464 * Deauthentication response to host triggered
1465 * deauthentication.
1466 */
1467 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthRsp, sizeof(tSirSmeDeauthRsp)))
1468 {
1469 // Log error
1470 limLog(pMac, LOGP,
1471 FL("call to palAllocateMemory failed for eWNI_SME_DEAUTH_RSP\n"));
1472
1473 return;
1474 }
1475
1476#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1477 sirStoreU16N((tANI_U8*) &(pSirSmeDeauthRsp->messageType),
1478 eWNI_SME_DEAUTH_RSP);
1479 sirStoreU16N((tANI_U8*) &(pSirSmeDeauthRsp->length),
1480 sizeof(tSirSmeDeauthRsp));
1481#else
1482 pSirSmeDeauthRsp->messageType = eWNI_SME_DEAUTH_RSP;
1483 pSirSmeDeauthRsp->length = sizeof(tSirSmeDeauthRsp);
1484#endif
1485 pSirSmeDeauthRsp->statusCode = reasonCode;
1486 pSirSmeDeauthRsp->sessionId = smesessionId;
1487 pSirSmeDeauthRsp->transactionId = smetransactionId;
1488
1489 pBuf = (tANI_U8 *) pSirSmeDeauthRsp->peerMacAddr;
1490 palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
1491
1492#if (WNI_POLARIS_FW_PRODUCT == AP)
1493 pBuf += sizeof(tSirMacAddr);
1494 limCopyU16(pBuf, aid);
1495#endif
1496#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1497 limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT,
1498 psessionEntry, 0, (tANI_U16)reasonCode);
1499#endif
1500 pMsg = (tANI_U32*)pSirSmeDeauthRsp;
1501
1502 break;
1503
1504 default:
1505 /**
1506 * Deauthentication indication due to Deauthentication
1507 * frame reception from peer entity or due to
1508 * loss of link with peer entity.
1509 */
1510 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthInd, sizeof(tSirSmeDeauthInd)))
1511 {
1512 // Log error
1513 limLog(pMac, LOGP,
1514 FL("call to palAllocateMemory failed for eWNI_SME_DEAUTH_Ind\n"));
1515
1516 return;
1517 }
1518
1519#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1520 sirStoreU16N((tANI_U8*)&pSirSmeDeauthInd->messageType,
1521 eWNI_SME_DEAUTH_IND);
1522 sirStoreU16N((tANI_U8*)&pSirSmeDeauthInd->length,
1523 sizeof(tSirSmeDeauthInd));
1524#else
1525 pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
1526 pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd);
Mohit Khanna99d5fd02012-09-11 14:51:20 -07001527 pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
Jeff Johnson295189b2012-06-20 16:38:30 -07001528#endif
1529
1530 // sessionId
1531 pBuf = (tANI_U8*) &pSirSmeDeauthInd->sessionId;
1532 *pBuf++ = smesessionId;
1533
1534 //transaction ID
1535 limCopyU16(pBuf, smetransactionId);
1536 pBuf += sizeof(tANI_U16);
1537
1538 // status code
1539 limCopyU32(pBuf, reasonCode);
1540 pBuf += sizeof(tSirResultCodes);
1541
1542 //bssId
1543 palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
1544 pBuf += sizeof(tSirMacAddr);
1545
1546 //peerMacAddr
1547 palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, peerMacAddr, sizeof(tSirMacAddr));
1548
1549#if (WNI_POLARIS_FW_PRODUCT == AP)
1550 pBuf += sizeof(tSirMacAddr);
1551 limCopyU16(pBuf, aid);
1552#endif
1553#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1554 limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT,
1555 psessionEntry, 0, (tANI_U16)reasonCode);
1556#endif //FEATURE_WLAN_DIAG_SUPPORT
1557 pMsg = (tANI_U32*)pSirSmeDeauthInd;
1558
1559 break;
1560 }
1561
1562 /*Delete the PE session created */
1563 if(psessionEntry != NULL)
1564 {
1565 peDeleteSession(pMac,psessionEntry);
1566 }
1567
1568 if( IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
1569 {
1570 //Resume on the first active session channel.
Jeff Johnsone7245742012-09-05 17:12:55 -07001571 tANI_U8 resumeChannel;
1572 ePhyChanBondState resumePhyCbState;
1573 peGetActiveSessionChannel( pMac, &resumeChannel, &resumePhyCbState );
1574 peSetResumeChannel( pMac, resumeChannel, resumePhyCbState );
Jeff Johnson295189b2012-06-20 16:38:30 -07001575
1576 limResumeLink( pMac, limSendSmeDisassocDeauthNtfPostResume,
1577 (tANI_U32*) pMsg );
1578 }
1579 else
1580 {
1581 limSendSmeDisassocDeauthNtfPostResume( pMac, eHAL_STATUS_SUCCESS,
1582 (tANI_U32*) pMsg );
1583 }
1584} /*** end limSendSmeDeauthNtf() ***/
1585
1586
1587/**
1588 * limSendSmeWmStatusChangeNtf()
1589 *
1590 *FUNCTION:
1591 * This function is called by limProcessSmeMessages() to send
1592 * eWNI_SME_WM_STATUS_CHANGE_NTF message to host.
1593 *
1594 *PARAMS:
1595 *
1596 *LOGIC:
1597 *
1598 *ASSUMPTIONS:
1599 * NA
1600 *
1601 *NOTE:
1602 *
1603 * @param statusChangeCode Indicates the change in the wireless medium.
1604 * @param statusChangeInfo Indicates the information associated with
1605 * change in the wireless medium.
1606 * @param infoLen Indicates the length of status change information
1607 * being sent.
1608 *
1609 * @return None
1610 */
1611void
1612limSendSmeWmStatusChangeNtf(tpAniSirGlobal pMac, tSirSmeStatusChangeCode statusChangeCode,
1613 tANI_U32 *pStatusChangeInfo, tANI_U16 infoLen, tANI_U8 sessionId)
1614{
1615 tSirMsgQ mmhMsg;
1616 tSirSmeWmStatusChangeNtf *pSirSmeWmStatusChangeNtf;
1617 eHalStatus status;
1618#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
1619 tANI_U32 bufLen;
1620 tANI_U16 length=0;
1621 tANI_U8 *pBuf;
1622#endif
1623
1624
1625
1626 status = palAllocateMemory( pMac->hHdd, (void **)&pSirSmeWmStatusChangeNtf,
1627 sizeof(tSirSmeWmStatusChangeNtf));
1628 if (status != eHAL_STATUS_SUCCESS)
1629 {
1630 limLog(pMac, LOGE,
1631 FL("call to palAllocateMemory failed for eWNI_SME_WM_STATUS_CHANGE_NTF, status = %d\n"),
1632 status);
1633 return;
1634 }
1635
1636#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
1637 pBuf = (tANI_U8 *)pSirSmeWmStatusChangeNtf;
1638#endif
1639
1640 mmhMsg.type = eWNI_SME_WM_STATUS_CHANGE_NTF;
1641 mmhMsg.bodyval = 0;
1642 mmhMsg.bodyptr = pSirSmeWmStatusChangeNtf;
1643
1644 switch(statusChangeCode)
1645 {
1646 case eSIR_SME_RADAR_DETECTED:
1647
1648#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
1649 bufLen = sizeof(tSirSmeWmStatusChangeNtf);
1650 if ((limSmeWmStatusChangeHeaderSerDes(pMac,
1651 statusChangeCode,
1652 pBuf,
1653 &length,
1654 bufLen,
1655 sessionId) != eSIR_SUCCESS))
1656 {
1657 palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
1658 limLog(pMac, LOGP, FL("Header SerDes failed \n"));
1659 return;
1660 }
1661 pBuf += length;
1662 bufLen -= length;
1663 if ((limRadioInfoSerDes(pMac,
1664 (tpSirRadarInfo)pStatusChangeInfo,
1665 pBuf,
1666 &length,
1667 bufLen) != eSIR_SUCCESS))
1668 {
1669 palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
1670 limLog(pMac, LOGP, FL("Radio Info SerDes failed \n"));
1671 return;
1672 }
1673
1674 pBuf = (tANI_U8 *) pSirSmeWmStatusChangeNtf;
1675 pBuf += sizeof(tANI_U16);
1676 limCopyU16(pBuf, length);
1677#endif
1678 break;
1679
1680 case eSIR_SME_CB_LEGACY_BSS_FOUND_BY_AP:
1681#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
1682
1683 if( eSIR_SUCCESS != nonTitanBssFoundSerDes( pMac,
1684 (tpSirNeighborBssWdsInfo) pStatusChangeInfo,
1685 pBuf,
1686 &length,
1687 sessionId))
1688 {
1689 palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
1690 limLog( pMac, LOGP,
1691 FL("Unable to serialize nonTitanBssFoundSerDes!\n"));
1692 return;
1693 }
1694#endif
1695 break;
1696
1697 case eSIR_SME_BACKGROUND_SCAN_FAIL:
1698 limPackBkgndScanFailNotify(pMac,
1699 statusChangeCode,
1700 (tpSirBackgroundScanInfo)pStatusChangeInfo,
1701 pSirSmeWmStatusChangeNtf, sessionId);
1702 break;
1703
1704 default:
1705#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1706 sirStoreU16N((tANI_U8*)&pSirSmeWmStatusChangeNtf->messageType,
1707 eWNI_SME_WM_STATUS_CHANGE_NTF );
1708 sirStoreU16N((tANI_U8*)&pSirSmeWmStatusChangeNtf->length,
1709 (sizeof(tSirSmeWmStatusChangeNtf)));
1710 pSirSmeWmStatusChangeNtf->sessionId = sessionId;
1711 sirStoreU32N((tANI_U8*)&pSirSmeWmStatusChangeNtf->statusChangeCode,
1712 statusChangeCode);
1713#else
1714 pSirSmeWmStatusChangeNtf->messageType = eWNI_SME_WM_STATUS_CHANGE_NTF;
1715 pSirSmeWmStatusChangeNtf->statusChangeCode = statusChangeCode;
1716 pSirSmeWmStatusChangeNtf->length = sizeof(tSirSmeWmStatusChangeNtf);
1717 pSirSmeWmStatusChangeNtf->sessionId = sessionId;
1718#endif
1719 if(sizeof(pSirSmeWmStatusChangeNtf->statusChangeInfo) >= infoLen)
1720 {
1721 palCopyMemory( pMac->hHdd, (tANI_U8 *)&pSirSmeWmStatusChangeNtf->statusChangeInfo, (tANI_U8 *)pStatusChangeInfo, infoLen);
1722 }
1723 limLog(pMac, LOGE, FL("***---*** StatusChg: code 0x%x, length %d ***---***\n"),
1724 statusChangeCode, infoLen);
1725 break;
1726 }
1727
1728
Jeff Johnsone7245742012-09-05 17:12:55 -07001729 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001730 if (eSIR_SUCCESS != limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT))
1731 {
1732 palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
1733 limLog( pMac, LOGP, FL("limSysProcessMmhMsgApi failed\n"));
1734 }
1735
1736} /*** end limSendSmeWmStatusChangeNtf() ***/
1737
1738
1739/**
1740 * limSendSmeSetContextRsp()
1741 *
1742 *FUNCTION:
1743 * This function is called by limProcessSmeMessages() to send
1744 * eWNI_SME_SETCONTEXT_RSP message to host
1745 *
1746 *PARAMS:
1747 *
1748 *LOGIC:
1749 *
1750 *ASSUMPTIONS:
1751 * NA
1752 *
1753 *NOTE:
1754 *
1755 * @param pMac Pointer to Global MAC structure
1756 * @param peerMacAddr Indicates the peer MAC addr to which
1757 * setContext was performed
1758 * @param aid Indicates the aid corresponding to the peer MAC
1759 * address
1760 * @param resultCode Indicates the result of previously issued
1761 * eWNI_SME_SETCONTEXT_RSP message
1762 *
1763 * @return None
1764 */
1765void
1766limSendSmeSetContextRsp(tpAniSirGlobal pMac,
1767 tSirMacAddr peerMacAddr, tANI_U16 aid,
1768 tSirResultCodes resultCode,
1769 tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId)
1770{
1771
1772 tANI_U8 *pBuf;
1773 tSirMsgQ mmhMsg;
1774 tSirSmeSetContextRsp *pSirSmeSetContextRsp;
1775
1776 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeSetContextRsp, sizeof(tSirSmeSetContextRsp)))
1777 {
1778 // Log error
1779 limLog(pMac, LOGP,
1780 FL("call to palAllocateMemory failed for SmeSetContextRsp\n"));
1781
1782 return;
1783 }
1784
1785#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
1786 sirStoreU16N((tANI_U8*)&pSirSmeSetContextRsp->messageType,
1787 eWNI_SME_SETCONTEXT_RSP);
1788 sirStoreU16N((tANI_U8*)&pSirSmeSetContextRsp->length,
1789 sizeof(tSirSmeSetContextRsp));
1790#else
1791 pSirSmeSetContextRsp->messageType = eWNI_SME_SETCONTEXT_RSP;
1792 pSirSmeSetContextRsp->length = sizeof(tSirSmeSetContextRsp);
1793#endif
1794 pSirSmeSetContextRsp->statusCode = resultCode;
1795
1796 pBuf = pSirSmeSetContextRsp->peerMacAddr;
1797
1798 palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
1799 pBuf += sizeof(tSirMacAddr);
1800
1801#if (WNI_POLARIS_FW_PRODUCT == AP)
1802 limCopyU16(pBuf, aid);
1803 pBuf += sizeof(tANI_U16);
1804#endif
1805
1806 /* Update SME session and transaction Id*/
1807 pSirSmeSetContextRsp->sessionId = smesessionId;
1808 pSirSmeSetContextRsp->transactionId = smetransactionId;
1809
1810 mmhMsg.type = eWNI_SME_SETCONTEXT_RSP;
1811 mmhMsg.bodyptr = pSirSmeSetContextRsp;
1812 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07001813 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001814
1815#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
1816 limDiagEventReport(pMac, WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
1817#endif //FEATURE_WLAN_DIAG_SUPPORT
1818
1819 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1820} /*** end limSendSmeSetContextRsp() ***/
1821
1822/**
1823 * limSendSmeRemoveKeyRsp()
1824 *
1825 *FUNCTION:
1826 * This function is called by limProcessSmeMessages() to send
1827 * eWNI_SME_REMOVEKEY_RSP message to host
1828 *
1829 *PARAMS:
1830 *
1831 *LOGIC:
1832 *
1833 *ASSUMPTIONS:
1834 * NA
1835 *
1836 *NOTE:
1837 *
1838 * @param pMac Pointer to Global MAC structure
1839 * @param peerMacAddr Indicates the peer MAC addr to which
1840 * Removekey was performed
1841 * @param aid Indicates the aid corresponding to the peer MAC
1842 * address
1843 * @param resultCode Indicates the result of previously issued
1844 * eWNI_SME_REMOVEKEY_RSP message
1845 *
1846 * @return None
1847 */
1848void
1849limSendSmeRemoveKeyRsp(tpAniSirGlobal pMac,
1850 tSirMacAddr peerMacAddr,
1851 tSirResultCodes resultCode,
1852 tpPESession psessionEntry,tANI_U8 smesessionId,
1853 tANI_U16 smetransactionId)
1854{
1855 tANI_U8 *pBuf;
1856 tSirMsgQ mmhMsg;
1857 tSirSmeRemoveKeyRsp *pSirSmeRemoveKeyRsp;
1858
1859 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRemoveKeyRsp, sizeof(tSirSmeRemoveKeyRsp)))
1860 {
1861 // Log error
1862 limLog(pMac, LOGP,
1863 FL("call to palAllocateMemory failed for SmeRemoveKeyRsp\n"));
1864
1865 return;
1866 }
1867
1868#if defined (ANI_PRODUCT_TYPE_AP) && defined(ANI_LITTLE_BYTE_ENDIAN)
1869 sirStoreU16N((tANI_U8*)&pSirSmeRemoveKeyRsp->messageType,
1870 eWNI_SME_REMOVEKEY_RSP);
1871 sirStoreU16N((tANI_U8*)&pSirSmeRemoveKeyRsp->length,
1872 sizeof(tSirSmeRemoveKeyRsp));
1873
1874#endif
1875
1876
1877 if(psessionEntry != NULL)
1878 {
1879 pBuf = pSirSmeRemoveKeyRsp->peerMacAddr;
1880 palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
1881 pBuf += sizeof(tSirMacAddr);
1882 limCopyU32(pBuf, resultCode);
1883 }
1884
1885 pSirSmeRemoveKeyRsp->messageType = eWNI_SME_REMOVEKEY_RSP;
1886 pSirSmeRemoveKeyRsp->length = sizeof(tSirSmeRemoveKeyRsp);
1887 pSirSmeRemoveKeyRsp->statusCode = resultCode;
1888
1889 /* Update SME session and transaction Id*/
1890 pSirSmeRemoveKeyRsp->sessionId = smesessionId;
1891 pSirSmeRemoveKeyRsp->transactionId = smetransactionId;
1892
1893 mmhMsg.type = eWNI_SME_REMOVEKEY_RSP;
1894 mmhMsg.bodyptr = pSirSmeRemoveKeyRsp;
1895 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07001896 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001897 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1898} /*** end limSendSmeSetContextRsp() ***/
1899
1900
1901/**
1902 * limSendSmePromiscuousModeRsp()
1903 *
1904 *FUNCTION:
1905 * This function is called by limProcessSmeMessages() to send
1906 * eWNI_PROMISCUOUS_MODE_RSP message to host
1907 *
1908 *PARAMS:
1909 *
1910 *LOGIC:
1911 *
1912 *ASSUMPTIONS:
1913 * NA
1914 *
1915 *NOTE:
1916 * This function is used for sending eWNI_SME_PROMISCUOUS_MODE_RSP to
1917 * host as a reply to eWNI_SME_PROMISCUOUS_MODE_REQ directive from it.
1918 *
1919 * @param None
1920 * @return None
1921 */
1922void
1923limSendSmePromiscuousModeRsp(tpAniSirGlobal pMac)
1924{
1925#if 0
1926 tSirMsgQ mmhMsg;
1927 tSirMbMsg *pMbMsg;
1928
1929 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMbMsg, sizeof(tSirMbMsg)))
1930 {
1931 // Log error
1932 limLog(pMac, LOGP, FL("call to palAllocateMemory failed\n"));
1933
1934 return;
1935 }
1936
1937 pMbMsg->type = eWNI_SME_PROMISCUOUS_MODE_RSP;
1938 pMbMsg->msgLen = 4;
1939
1940 mmhMsg.type = eWNI_SME_PROMISCUOUS_MODE_RSP;
1941 mmhMsg.bodyptr = pMbMsg;
1942 mmhMsg.bodyval = 0;
1943 MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
1944 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
1945#endif
1946} /*** end limSendSmePromiscuousModeRsp() ***/
1947
1948
1949
1950/**
1951 * limSendSmeNeighborBssInd()
1952 *
1953 *FUNCTION:
1954 * This function is called by limLookupNaddHashEntry() to send
1955 * eWNI_SME_NEIGHBOR_BSS_IND message to host
1956 *
1957 *PARAMS:
1958 *
1959 *LOGIC:
1960 *
1961 *ASSUMPTIONS:
1962 * NA
1963 *
1964 *NOTE:
1965 * This function is used for sending eWNI_SME_NEIGHBOR_BSS_IND to
1966 * host upon detecting new BSS during background scanning if CFG
1967 * option is enabled for sending such indication
1968 *
1969 * @param pMac - Pointer to Global MAC structure
1970 * @return None
1971 */
1972
1973void
1974limSendSmeNeighborBssInd(tpAniSirGlobal pMac,
1975 tLimScanResultNode *pBssDescr)
1976{
1977 tSirMsgQ msgQ;
1978 tANI_U32 val;
1979 tSirSmeNeighborBssInd *pNewBssInd;
1980
1981 if ((pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_WT_SCAN_STATE) ||
1982 ((pMac->lim.gLimSmeState == eLIM_SME_LINK_EST_WT_SCAN_STATE) &&
1983 pMac->lim.gLimRspReqd))
1984 {
1985 // LIM is not in background scan state OR
1986 // current scan is initiated by HDD.
1987 // No need to send new BSS indication to HDD
1988 return;
1989 }
1990
1991 if (wlan_cfgGetInt(pMac, WNI_CFG_NEW_BSS_FOUND_IND, &val) != eSIR_SUCCESS)
1992 {
1993 limLog(pMac, LOGP, FL("could not get NEIGHBOR_BSS_IND from CFG\n"));
1994
1995 return;
1996 }
1997
1998 if (val == 0)
1999 return;
2000
2001 /**
2002 * Need to indicate new BSSs found during
2003 * background scanning to host.
2004 * Allocate buffer for sending indication.
2005 * Length of buffer is length of BSS description
2006 * and length of header itself
2007 */
2008 val = pBssDescr->bssDescription.length + sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(tANI_U8);
2009 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pNewBssInd, val))
2010 {
2011 // Log error
2012 limLog(pMac, LOGP,
2013 FL("call to palAllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND\n"));
2014
2015 return;
2016 }
2017
2018#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
2019 sirStoreU16N((tANI_U8*) &pNewBssInd->messageType,
2020 eWNI_SME_NEIGHBOR_BSS_IND);
2021 sirStoreU16N((tANI_U8*)&pNewBssInd->length, (tANI_U16)val );
2022#else
2023 pNewBssInd->messageType = eWNI_SME_NEIGHBOR_BSS_IND;
2024 pNewBssInd->length = (tANI_U16) val;
2025#endif
2026 pNewBssInd->sessionId = 0;
2027
2028#if (WNI_POLARIS_FW_PRODUCT == WLAN_STA)
2029 palCopyMemory( pMac->hHdd, (tANI_U8 *) pNewBssInd->bssDescription,
2030 (tANI_U8 *) &pBssDescr->bssDescription,
2031 pBssDescr->bssDescription.length + sizeof(tANI_U16));
2032#endif
2033
2034 msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND;
2035 msgQ.bodyptr = pNewBssInd;
2036 msgQ.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002037 MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002038 limSysProcessMmhMsgApi(pMac, &msgQ, ePROT);
2039} /*** end limSendSmeNeighborBssInd() ***/
2040
2041/** -----------------------------------------------------------------
2042 \brief limSendSmeAddtsRsp() - sends SME ADDTS RSP
2043 \ This function sends a eWNI_SME_ADDTS_RSP to SME.
2044 \ SME only looks at rc and tspec field.
2045 \param pMac - global mac structure
2046 \param rspReqd - is SmeAddTsRsp required
2047 \param status - status code of SME_ADD_TS_RSP
2048 \return tspec
2049 \sa
2050 ----------------------------------------------------------------- */
2051void
2052limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESession psessionEntry,
2053 tSirMacTspecIE tspec, tANI_U8 smesessionId, tANI_U16 smetransactionId)
2054{
2055 tpSirAddtsRsp rsp;
2056 tSirMsgQ mmhMsg;
2057
2058 if (! rspReqd)
2059 return;
2060
2061 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirAddtsRsp)))
2062 {
2063 limLog(pMac, LOGP, FL("palAllocateMemory failed for ADDTS_RSP"));
2064 return;
2065 }
2066
2067 palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
2068 rsp->messageType = eWNI_SME_ADDTS_RSP;
2069 rsp->rc = status;
2070 rsp->rsp.status = (enum eSirMacStatusCodes) status;
2071 //palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec));
2072 rsp->rsp.tspec = tspec;
2073
2074 /* Update SME session Id and transcation Id */
2075 rsp->sessionId = smesessionId;
2076 rsp->transactionId = smetransactionId;
2077
2078 mmhMsg.type = eWNI_SME_ADDTS_RSP;
2079 mmhMsg.bodyptr = rsp;
2080 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002081 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002082#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
2083 limDiagEventReport(pMac, WLAN_PE_DIAG_ADDTS_RSP_EVENT, psessionEntry, 0, 0);
2084#endif //FEATURE_WLAN_DIAG_SUPPORT
2085
2086 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2087 return;
2088}
2089
2090void
2091limSendSmeAddtsInd(tpAniSirGlobal pMac, tpSirAddtsReqInfo addts)
2092{
2093 tpSirAddtsRsp rsp;
2094 tSirMsgQ mmhMsg;
2095
2096 limLog(pMac, LOGW, "SendSmeAddtsInd (token %d, tsid %d, up %d)\n",
2097 addts->dialogToken,
2098 addts->tspec.tsinfo.traffic.tsid,
2099 addts->tspec.tsinfo.traffic.userPrio);
2100
2101 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirAddtsRsp)))
2102 {
2103 // Log error
2104 limLog(pMac, LOGP, FL("palAllocateMemory failed for ADDTS_IND\n"));
2105 return;
2106 }
2107 palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
2108
2109 rsp->messageType = eWNI_SME_ADDTS_IND;
2110
2111 palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) addts, sizeof(*addts));
2112
2113 mmhMsg.type = eWNI_SME_ADDTS_IND;
2114 mmhMsg.bodyptr = rsp;
2115 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002116 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002117 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2118}
2119
2120void
2121limSendSmeDeltsRsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, tANI_U32 status,tpPESession psessionEntry,tANI_U8 smesessionId,tANI_U16 smetransactionId)
2122{
2123 tpSirDeltsRsp rsp;
2124 tSirMsgQ mmhMsg;
2125
2126 limLog(pMac, LOGW, "SendSmeDeltsRsp (aid %d, tsid %d, up %d) status %d\n",
2127 delts->aid,
2128 delts->req.tsinfo.traffic.tsid,
2129 delts->req.tsinfo.traffic.userPrio,
2130 status);
2131 if (! delts->rspReqd)
2132 return;
2133
2134 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirDeltsRsp)))
2135 {
2136 // Log error
2137 limLog(pMac, LOGP, FL("palAllocateMemory failed for DELTS_RSP\n"));
2138 return;
2139 }
2140 palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
2141
2142 if(psessionEntry != NULL)
2143 {
2144
2145 rsp->aid = delts->aid;
2146 palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->macAddr[0], (tANI_U8 *) &delts->macAddr[0], 6);
2147 palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) &delts->req, sizeof(tSirDeltsReqInfo));
2148 }
2149
2150
2151 rsp->messageType = eWNI_SME_DELTS_RSP;
2152 rsp->rc = status;
2153
2154 /* Update SME session Id and transcation Id */
2155 rsp->sessionId = smesessionId;
2156 rsp->transactionId = smetransactionId;
2157
2158 mmhMsg.type = eWNI_SME_DELTS_RSP;
2159 mmhMsg.bodyptr = rsp;
2160 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002161 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002162#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
2163 limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_RSP_EVENT, psessionEntry, (tANI_U16)status, 0);
2164#endif //FEATURE_WLAN_DIAG_SUPPORT
2165
2166 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2167}
2168
2169void
2170limSendSmeDeltsInd(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, tANI_U16 aid,tpPESession psessionEntry)
2171{
2172 tpSirDeltsRsp rsp;
2173 tSirMsgQ mmhMsg;
2174
2175 limLog(pMac, LOGW, "SendSmeDeltsInd (aid %d, tsid %d, up %d)\n",
2176 aid,
2177 delts->tsinfo.traffic.tsid,
2178 delts->tsinfo.traffic.userPrio);
2179
2180 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirDeltsRsp)))
2181 {
2182 // Log error
2183 limLog(pMac, LOGP, FL("palAllocateMemory failed for DELTS_IND\n"));
2184 return;
2185 }
2186 palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
2187
2188 rsp->messageType = eWNI_SME_DELTS_IND;
2189 rsp->rc = eSIR_SUCCESS;
2190 rsp->aid = aid;
2191 palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) delts, sizeof(*delts));
2192
2193 /* Update SME session Id and SME transaction Id */
2194
2195 rsp->sessionId = psessionEntry->smeSessionId;
2196 rsp->transactionId = psessionEntry->transactionId;
2197
2198 mmhMsg.type = eWNI_SME_DELTS_IND;
2199 mmhMsg.bodyptr = rsp;
2200 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002201 MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002202#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
2203 limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_IND_EVENT, psessionEntry, 0, 0);
2204#endif //FEATURE_WLAN_DIAG_SUPPORT
2205
2206 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2207}
2208
2209/**
2210 * limSendSmeStatsRsp()
2211 *
2212 *FUNCTION:
2213 * This function is called to send 802.11 statistics response to HDD.
2214 * This function posts the result back to HDD. This is a response to
2215 * HDD's request for statistics.
2216 *
2217 *PARAMS:
2218 *
2219 *LOGIC:
2220 *
2221 *ASSUMPTIONS:
2222 * NA
2223 *
2224 *NOTE:
2225 * NA
2226 *
2227 * @param pMac Pointer to Global MAC structure
2228 * @param p80211Stats Statistics sent in response
2229 * @param resultCode TODO:
2230 *
2231 *
2232 * @return none
2233 */
2234
2235void
2236limSendSmeStatsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
2237{
2238 tSirMsgQ mmhMsg;
2239 tSirSmeRsp *pMsgHdr = (tSirSmeRsp*) stats;
2240
2241 switch(msgType)
2242 {
2243 case WDA_STA_STAT_RSP:
2244 mmhMsg.type = eWNI_SME_STA_STAT_RSP;
2245 break;
2246 case WDA_AGGR_STAT_RSP:
2247 mmhMsg.type = eWNI_SME_AGGR_STAT_RSP;
2248 break;
2249 case WDA_GLOBAL_STAT_RSP:
2250 mmhMsg.type = eWNI_SME_GLOBAL_STAT_RSP;
2251 break;
2252 case WDA_STAT_SUMM_RSP:
2253 mmhMsg.type = eWNI_SME_STAT_SUMM_RSP;
2254 break;
2255 default:
2256 mmhMsg.type = msgType; //Response from within PE
2257 break;
2258 }
2259
2260 pMsgHdr->messageType = mmhMsg.type;
2261
2262 mmhMsg.bodyptr = stats;
2263 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002264 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002265 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2266
2267 return;
2268
2269} /*** end limSendSmeStatsRsp() ***/
2270
2271/**
2272 * limSendSmePEStatisticsRsp()
2273 *
2274 *FUNCTION:
2275 * This function is called to send 802.11 statistics response to HDD.
2276 * This function posts the result back to HDD. This is a response to
2277 * HDD's request for statistics.
2278 *
2279 *PARAMS:
2280 *
2281 *LOGIC:
2282 *
2283 *ASSUMPTIONS:
2284 * NA
2285 *
2286 *NOTE:
2287 * NA
2288 *
2289 * @param pMac Pointer to Global MAC structure
2290 * @param p80211Stats Statistics sent in response
2291 * @param resultCode TODO:
2292 *
2293 *
2294 * @return none
2295 */
2296
2297void
2298limSendSmePEStatisticsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
2299{
2300 tSirMsgQ mmhMsg;
2301 tANI_U8 sessionId;
2302 tAniGetPEStatsRsp *pPeStats = (tAniGetPEStatsRsp *) stats;
2303 tpPESession pPeSessionEntry;
2304
2305 //Get the Session Id based on Sta Id
2306 pPeSessionEntry = peFindSessionByStaId(pMac, pPeStats->staId, &sessionId);
2307
2308 //Fill the Session Id
2309 if(NULL != pPeSessionEntry)
2310 {
2311 //Fill the Session Id
2312 pPeStats->sessionId = pPeSessionEntry->smeSessionId;
2313 }
2314
2315 pPeStats->msgType = eWNI_SME_GET_STATISTICS_RSP;
2316
2317
2318 //msgType should be WDA_GET_STATISTICS_RSP
2319 mmhMsg.type = eWNI_SME_GET_STATISTICS_RSP;
2320
2321 mmhMsg.bodyptr = stats;
2322 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002323 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002324 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2325
2326 return;
2327
2328} /*** end limSendSmePEStatisticsRsp() ***/
2329
2330
2331void
2332limSendSmeIBSSPeerInd(
2333 tpAniSirGlobal pMac,
2334 tSirMacAddr peerMacAddr,
2335 tANI_U16 staIndex,
2336 tANI_U8 ucastIdx,
2337 tANI_U8 bcastIdx,
2338 tANI_U8 *beacon,
2339 tANI_U16 beaconLen,
2340 tANI_U16 msgType,
2341 tANI_U8 sessionId)
2342{
2343 tSirMsgQ mmhMsg;
2344 tSmeIbssPeerInd *pNewPeerInd;
2345
Jeff Johnson43971f52012-07-17 12:26:56 -07002346 if(eHAL_STATUS_SUCCESS !=
Jeff Johnson295189b2012-06-20 16:38:30 -07002347 palAllocateMemory(pMac->hHdd,(void * *) &pNewPeerInd,(sizeof(tSmeIbssPeerInd) + beaconLen)))
2348 {
2349 PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
2350 return;
2351 }
2352
2353 palZeroMemory(pMac->hHdd, (void *) pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen));
2354
2355 palCopyMemory( pMac->hHdd, (tANI_U8 *) pNewPeerInd->peerAddr,
2356 peerMacAddr, sizeof(tSirMacAddr));
2357 pNewPeerInd->staId= staIndex;
2358 pNewPeerInd->ucastSig = ucastIdx;
2359 pNewPeerInd->bcastSig = bcastIdx;
2360 pNewPeerInd->mesgLen = sizeof(tSmeIbssPeerInd) + beaconLen;
2361 pNewPeerInd->mesgType = msgType;
2362 pNewPeerInd->sessionId = sessionId;
2363
2364 if ( beacon != NULL )
2365 {
2366 palCopyMemory(pMac->hHdd, (void*) ((tANI_U8*)pNewPeerInd+sizeof(tSmeIbssPeerInd)), (void*)beacon, beaconLen);
2367 }
2368
2369 mmhMsg.type = msgType;
2370// mmhMsg.bodyval = (tANI_U32) pNewPeerInd;
2371 mmhMsg.bodyptr = pNewPeerInd;
Jeff Johnsone7245742012-09-05 17:12:55 -07002372 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002373 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2374
2375}
2376
2377
2378/** -----------------------------------------------------------------
2379 \brief limSendExitBmpsInd() - sends exit bmps indication
2380
2381 This function sends a eWNI_PMC_EXIT_BMPS_IND with a specific reason
2382 code to SME. This will trigger SME to get out of BMPS mode.
2383
2384 \param pMac - global mac structure
2385 \param reasonCode - reason for which PE wish to exit BMPS
2386 \return none
2387 \sa
2388 ----------------------------------------------------------------- */
2389void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode)
2390{
2391 tSirMsgQ mmhMsg;
2392 tANI_U16 msgLen = 0;
2393 tpSirSmeExitBmpsInd pExitBmpsInd;
2394
2395 msgLen = sizeof(tSirSmeExitBmpsInd);
2396 if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pExitBmpsInd, msgLen ))
2397 {
2398 limLog(pMac, LOGP, FL("palAllocateMemory failed for PMC_EXIT_BMPS_IND \n"));
2399 return;
2400 }
2401 palZeroMemory(pMac->hHdd, pExitBmpsInd, msgLen);
2402
2403#if defined (ANI_PRODUCT_TYPE_AP) && defined (ANI_LITTLE_BYTE_ENDIAN)
2404 sirStoreU16N((tANI_U8*)&pExitBmpsInd->mesgType, eWNI_PMC_EXIT_BMPS_IND);
2405 sirStoreU16N((tANI_U8*)&pExitBmpsInd->mesgLen, msgLen);
2406#else
2407 pExitBmpsInd->mesgType = eWNI_PMC_EXIT_BMPS_IND;
2408 pExitBmpsInd->mesgLen = msgLen;
2409#endif
2410 pExitBmpsInd->exitBmpsReason = reasonCode;
2411 pExitBmpsInd->statusCode = eSIR_SME_SUCCESS;
2412
2413 mmhMsg.type = eWNI_PMC_EXIT_BMPS_IND;
2414 mmhMsg.bodyptr = pExitBmpsInd;
2415 mmhMsg.bodyval = 0;
2416
2417 PELOG1(limLog(pMac, LOG1, FL("Sending eWNI_PMC_EXIT_BMPS_IND to SME. \n"));)
Jeff Johnsone7245742012-09-05 17:12:55 -07002418 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002419#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
2420 limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT, peGetValidPowerSaveSession(pMac), 0, (tANI_U16)reasonCode);
2421#endif //FEATURE_WLAN_DIAG_SUPPORT
2422
2423 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2424 return;
2425
2426} /*** end limSendExitBmpsInd() ***/
2427
2428
2429
2430
2431/*--------------------------------------------------------------------------
2432 \brief peDeleteSession() - Handle the Delete BSS Response from HAL.
2433
2434
2435 \param pMac - pointer to global adapter context
2436 \param sessionId - Message pointer.
2437
2438 \sa
2439 --------------------------------------------------------------------------*/
2440
2441void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ)
2442{
2443 tpPESession psessionEntry;
2444 tpDeleteBssParams pDelBss = (tpDeleteBssParams)(MsgQ->bodyptr);
2445 if((psessionEntry = peFindSessionBySessionId(pMac,pDelBss->sessionId))==NULL)
2446 {
2447 limLog(pMac, LOGP,FL("Session Does not exist for given sessionID\n"));
2448 return;
2449 }
2450 if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE)
2451 {
2452 limIbssDelBssRsp(pMac, MsgQ->bodyptr,psessionEntry);
2453 }
2454 else if(psessionEntry->limSystemRole == eLIM_UNKNOWN_ROLE)
2455 {
2456 limProcessSmeDelBssRsp(pMac, MsgQ->bodyval,psessionEntry);
2457 }
2458
2459 else
2460 limProcessMlmDelBssRsp(pMac,MsgQ,psessionEntry);
2461
2462}
2463
2464#ifdef WLAN_FEATURE_VOWIFI_11R
2465/** -----------------------------------------------------------------
2466 \brief limSendSmeAggrQosRsp() - sends SME FT AGGR QOS RSP
2467 \ This function sends a eWNI_SME_FT_AGGR_QOS_RSP to SME.
2468 \ SME only looks at rc and tspec field.
2469 \param pMac - global mac structure
2470 \param rspReqd - is SmeAddTsRsp required
2471 \param status - status code of eWNI_SME_FT_AGGR_QOS_RSP
2472 \return tspec
2473 \sa
2474 ----------------------------------------------------------------- */
2475void
2476limSendSmeAggrQosRsp(tpAniSirGlobal pMac, tpSirAggrQosRsp aggrQosRsp,
2477 tANI_U8 smesessionId)
2478{
2479 tSirMsgQ mmhMsg;
2480
2481 mmhMsg.type = eWNI_SME_FT_AGGR_QOS_RSP;
2482 mmhMsg.bodyptr = aggrQosRsp;
2483 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002484 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002485 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2486
2487 return;
2488}
2489#endif
2490
2491/** -----------------------------------------------------------------
2492 \brief limSendSmePreChannelSwitchInd() - sends an indication to SME
2493 before switching channels for spectrum manangement.
2494
2495 This function sends a eWNI_SME_PRE_SWITCH_CHL_IND to SME.
2496
2497 \param pMac - global mac structure
2498 \return none
2499 \sa
2500 ----------------------------------------------------------------- */
2501void
2502limSendSmePreChannelSwitchInd(tpAniSirGlobal pMac)
2503{
2504 tSirMsgQ mmhMsg;
2505
2506 mmhMsg.type = eWNI_SME_PRE_SWITCH_CHL_IND;
2507 mmhMsg.bodyptr = NULL;
2508 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002509 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002510 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2511
2512 return;
2513}
2514
2515/** -----------------------------------------------------------------
2516 \brief limSendSmePostChannelSwitchInd() - sends an indication to SME
2517 after channel switch for spectrum manangement is complete.
2518
2519 This function sends a eWNI_SME_POST_SWITCH_CHL_IND to SME.
2520
2521 \param pMac - global mac structure
2522 \return none
2523 \sa
2524 ----------------------------------------------------------------- */
2525void
2526limSendSmePostChannelSwitchInd(tpAniSirGlobal pMac)
2527{
2528 tSirMsgQ mmhMsg;
2529
2530 mmhMsg.type = eWNI_SME_POST_SWITCH_CHL_IND;
2531 mmhMsg.bodyptr = NULL;
2532 mmhMsg.bodyval = 0;
Jeff Johnsone7245742012-09-05 17:12:55 -07002533 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002534 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2535
2536 return;
2537}
2538
2539void limSendSmeMaxAssocExceededNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
2540 tANI_U8 smesessionId)
2541{
2542 tSirMsgQ mmhMsg;
2543 tSmeMaxAssocInd *pSmeMaxAssocInd;
2544
Jeff Johnson43971f52012-07-17 12:26:56 -07002545 if(eHAL_STATUS_SUCCESS !=
Jeff Johnson295189b2012-06-20 16:38:30 -07002546 palAllocateMemory(pMac->hHdd,(void **)&pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd)))
2547 {
2548 PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
2549 return;
2550 }
2551 palZeroMemory(pMac->hHdd, (void *) pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd));
2552 palCopyMemory( pMac->hHdd, (tANI_U8 *)pSmeMaxAssocInd->peerMac,
2553 (tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr));
2554 pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
2555 pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd);
2556 pSmeMaxAssocInd->sessionId = smesessionId;
2557 mmhMsg.type = pSmeMaxAssocInd->mesgType;
2558 mmhMsg.bodyptr = pSmeMaxAssocInd;
2559 PELOG1(limLog(pMac, LOG1, FL("msgType %s peerMacAddr %02x-%02x-%02x-%02x-%02x-%02x"
2560 "sme session id %d\n"),"eWNI_SME_MAX_ASSOC_EXCEEDED", peerMacAddr[0], peerMacAddr[1],
2561 peerMacAddr[2], peerMacAddr[3], peerMacAddr[4], peerMacAddr[5], smesessionId);)
Jeff Johnsone7245742012-09-05 17:12:55 -07002562 MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07002563 limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
2564
2565 return;
2566}