wlan: Decouple insert NOA from suspend link

Suspend link in case of P2P GO is not working since as part of decoupling
NOA from Init scan req, we did not take care of suspend link which also
uses Init scan path (in LIM). This will cause no NOA to happen during
suspend link used for remain on channel, innav and Join (on other channel
for session 2) requests from SME.
The fix is to decouple "Insert NOA" from suspend link. We will hold the
SME requests using suspend link i.e. when there is an existing P2P GO
session in lim Global and send down an INSERT NOA msg to FW. No states
will be changed at LIM, TL or in FW. Once NOA starts, FW will send an
indication back to Host that NOA started at which point host will send
down the held SME request down to FW.

Change-Id: Icdba8ff9dfe77a48f559ce5291ca97fca1e7b653
CRs-Fixed: 456650
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index fceffcd..75c7156 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -310,7 +310,12 @@
     tANI_U32   gLimCurrentScanChannelId;
 
     // Hold onto SCAN criteria
-    tSirSmeScanReq *gpLimSmeScanReq; // this one is used in P2P GO case when scan needs to be actually done a few BIs later after publishing NOA
+    /* The below is used in P2P GO case when we need to defer processing SME Req
+     * to LIM and insert NOA first and process SME req once SNOA is started
+     */
+    tANI_U16 gDeferMsgTypeForNOA;
+    tANI_U32 *gpDefdSmeMsgForNOA;
+
     tLimMlmScanReq *gpLimMlmScanReq;
 
     /// This indicates total length of 'matched' scan results
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index 490a5e4..9404d40 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -111,7 +111,8 @@
 
     pMac->lim.gLimCurrentScanChannelId = 0;
     pMac->lim.gpLimMlmScanReq = NULL;
-    pMac->lim.gpLimSmeScanReq = NULL;
+    pMac->lim.gDeferMsgTypeForNOA = 0;
+    pMac->lim.gpDefdSmeMsgForNOA = NULL;
     pMac->lim.gLimMlmScanResultLength = 0;
     pMac->lim.gLimSmeScanResultLength = 0;
 
@@ -881,10 +882,10 @@
         pMac->lim.gpLimMlmRemoveKeyReq = NULL;
     }
 
-    if (pMac->lim.gpLimSmeScanReq != NULL)
+    if (pMac->lim.gpDefdSmeMsgForNOA != NULL)
     {
-        palFreeMemory(pMac->hHdd, pMac->lim.gpLimSmeScanReq);
-        pMac->lim.gpLimSmeScanReq = NULL;
+        palFreeMemory(pMac->hHdd, pMac->lim.gpDefdSmeMsgForNOA);
+        pMac->lim.gpDefdSmeMsgForNOA = NULL;
     }
 
     if (pMac->lim.gpLimMlmScanReq != NULL)
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c
index ec2c483..f48a9ea 100644
--- a/CORE/MAC/src/pe/lim/limP2P.c
+++ b/CORE/MAC/src/pe/lim/limP2P.c
@@ -399,19 +399,13 @@
  *------------------------------------------------------------------*/
 void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac)
 {
-    /* timeout means start NOA did not arrive; we need to restart the timer and
-     * send the scan response from here
+    /* timeout means start NOA did not arrive; we need to deactivate and change the timer for
+     * future activations
      */
     limDeactivateAndChangeTimer(pMac, eLIM_INSERT_SINGLESHOT_NOA_TIMER);
-    
-    // send the scan response back and do not even call insert NOA
-    limSendSmeScanRsp(pMac, sizeof(tSirSmeScanRsp), eSIR_SME_SCAN_FAILED, pMac->lim.gSmeSessionId, pMac->lim.gTransactionId);
 
-    if(pMac->lim.gpLimSmeScanReq != NULL)
-    {
-        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimSmeScanReq);
-        pMac->lim.gpLimSmeScanReq = NULL;
-    }
+    /* Even if insert NOA timedout, go ahead and process/send stored SME request */
+    limProcessRegdDefdSmeReqAfterNOAStart(pMac);
 
     return;
 }
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index b79b3ff..79dd0a0 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -90,9 +90,6 @@
 #include "vos_packet.h"
 #include "vos_memory.h"
 
-/* In P2P GO case, we want to call scan on NOA start indication from limProcessMessages */
-extern void __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
-
 void limLogSessionStates(tpAniSirGlobal pMac);
 
 /** -------------------------------------------------------------
@@ -153,6 +150,7 @@
         (limMsg->type != WDA_WOWL_EXIT_RSP) &&
         (limMsg->type != WDA_SWITCH_CHANNEL_RSP) &&
         (limMsg->type != WDA_P2P_NOA_ATTR_IND) &&
+        (limMsg->type != WDA_P2P_NOA_START_IND) &&
 #ifdef FEATURE_OEM_DATA_SUPPORT
         (limMsg->type != WDA_START_OEM_DATA_RSP) &&
 #endif
@@ -1362,36 +1360,43 @@
         {
             tpPESession psessionEntry = &pMac->lim.gpSession[0];
             tANI_U8  i;
+            tANI_U8 p2pGOExists = 0;
             
             limLog(pMac, LOG1, "LIM received NOA start %x\n", limMsg->type);
+
+            /* Since insert NOA is done and NOA start msg received, we should deactivate the Insert NOA timer */
+            limDeactivateAndChangeTimer(pMac, eLIM_INSERT_SINGLESHOT_NOA_TIMER);
+
             for(i=0; i < pMac->lim.maxBssId; i++)
             {
                 psessionEntry = &pMac->lim.gpSession[i];
                 if   ( (psessionEntry != NULL) && (psessionEntry->valid) &&
                     (psessionEntry->pePersona == VOS_P2P_GO_MODE))
                 { //Save P2P NOA start attributes for P2P Go persona
+                    p2pGOExists = 1;
                     palCopyMemory(pMac->hHdd, &psessionEntry->p2pGoPsNoaStartInd, limMsg->bodyptr, sizeof(tSirP2PNoaStart));
-                    
-                    if ((pMac->lim.gpLimSmeScanReq != NULL) && (psessionEntry->p2pGoPsNoaStartInd.status == eHAL_STATUS_SUCCESS))
+                    if (psessionEntry->p2pGoPsNoaStartInd.status != eHAL_STATUS_SUCCESS)
                     {
-                        /* We received the NOA start indication. Now we can send down the scan request */
-                        __limProcessSmeScanReq(pMac, (tANI_U32 *)pMac->lim.gpLimSmeScanReq);
-                        /* Since insert NOA is done and NOA start msg received, we should deactivate the Insert NOA timer */
-                        limDeactivateAndChangeTimer(pMac, eLIM_INSERT_SINGLESHOT_NOA_TIMER);
-                        /* __limProcessSmeScanReq consumed the buffer. We can free it. */
-                        palFreeMemory( pMac->hHdd, (tANI_U8 *) pMac->lim.gpLimSmeScanReq);
-                        pMac->lim.gpLimSmeScanReq = NULL;
+                        limLog(pMac, LOGW, FL("GO NOA start failure status %d reported by FW."
+                            " - still go ahead with deferred sme req. This is just info\n"),
+                            psessionEntry->p2pGoPsNoaStartInd.status);
                     }
-                    else
-                        limLog(pMac, LOGE, FL("GO NOA start failure reported by FW - don't do scan\n"));
                     break;
                 }
             }
-        }
+
+            if (p2pGOExists == 0)
+            {
+                limLog(pMac, LOGW, FL("By the time, we received NOA start, GO is already removed."
+                        " - still go ahead with deferred sme req. This is just info\n"));
+            }
+
+            /* We received the NOA start indication. Now we can send down the SME request which requires off-channel operation */
+            limProcessRegdDefdSmeReqAfterNOAStart(pMac);
             palFreeMemory(pMac->hHdd, (tANI_U8 *)limMsg->bodyptr);
             limMsg->bodyptr = NULL;
+         }
             break;
-            
 
         case SIR_HAL_P2P_NOA_ATTR_IND:
             {
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index b5a0473..3a17b7b 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -97,7 +97,10 @@
  * taking care of sending null data and receiving ACK to/from AP/Also SetChannel with calibration is taking
  * around 7ms .
  */
-#define SCAN_MESSAGING_OVERHEAD 10 // in msecs
+#define SCAN_MESSAGING_OVERHEAD             20      // in msecs
+#define JOIN_NOA_DURATION                   2000    // in msecs
+#define OEM_DATA_NOA_DURATION               60      // in msecs
+#define DEFAULT_PASSIVE_MAX_CHANNEL_TIME    110     // in msecs
 
 #define CONV_MS_TO_US 1024 //conversion factor from ms to us
 
@@ -105,7 +108,7 @@
 static void __limProcessSmeStartReq(tpAniSirGlobal, tANI_U32 *);
 static tANI_BOOLEAN __limProcessSmeSysReadyInd(tpAniSirGlobal, tANI_U32 *);
 static tANI_BOOLEAN __limProcessSmeStartBssReq(tpAniSirGlobal, tpSirMsgQ pMsg);
-void __limProcessSmeScanReq(tpAniSirGlobal, tANI_U32 *);
+static void __limProcessSmeScanReq(tpAniSirGlobal, tANI_U32 *);
 static void __limProcessSmeJoinReq(tpAniSirGlobal, tANI_U32 *);
 static void __limProcessSmeReassocReq(tpAniSirGlobal, tANI_U32 *);
 static void __limProcessSmeDisassocReq(tpAniSirGlobal, tANI_U32 *);
@@ -1076,7 +1079,7 @@
  * @return None
  */
 
-void
+static void
 __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
     tANI_U32            len;
@@ -4531,21 +4534,17 @@
 } /*** end __limProcessSmeRegisterMgmtFrameReq() ***/
 
 static tANI_BOOLEAN
-__limInsertSingleShotNOAForScan(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
+__limInsertSingleShotNOAForScan(tpAniSirGlobal pMac, tANI_U32 noaDuration)
 {
     tpP2pPsParams pMsgNoA;
     tSirMsgQ msg;
-    tpSirSmeScanReq     pScanReq;
-    tANI_U32 val = 0;
-    tANI_U8 i = 0;
 
-    pScanReq = (tpSirSmeScanReq) pMsgBuf;
     if( eHAL_STATUS_SUCCESS != palAllocateMemory(
                   pMac->hHdd, (void **) &pMsgNoA, sizeof( tP2pPsConfig )))
     {
         limLog( pMac, LOGP,
                      FL( "Unable to allocate memory during NoA Update\n" ));
-        return TRUE;
+        goto error;
     }
 
     palZeroMemory( pMac->hHdd, (tANI_U8 *)pMsgNoA, sizeof(tP2pPsConfig));
@@ -4556,51 +4555,14 @@
     pMsgNoA->interval = 0;
     pMsgNoA->count = 0;
 
-    pMac->lim.gpLimSmeScanReq = pScanReq;
-
     /* Below params used for Single Shot NOA - so assign proper values */
     pMsgNoA->psSelection = P2P_SINGLE_NOA;
-
-    /* Calculate the total duration of scan for all the channels
-     * listed in the channel list */
-    pMsgNoA->single_noa_duration = 0;
-
-    if (wlan_cfgGetInt(pMac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, &val) != eSIR_SUCCESS)
-    {
-        /*
-         * Could not get max channel value
-         * from CFG. Log error.
-         */
-        limLog(pMac, LOGP, FL("could not retrieve passive max channel value\n"));
-
-        /* use a default value of 110ms */
-        val = 110;
-    }
-
-    for (i = 0; i < pMac->lim.gpLimSmeScanReq->channelList.numChannels; i++) {
-        tANI_U8 channelNum = pMac->lim.gpLimSmeScanReq->channelList.channelNumber[i];
-
-        if (limActiveScanAllowed(pMac, channelNum)) {
-            /* Use min + max channel time to calculate the total duration of scan */
-            pMsgNoA->single_noa_duration += pMac->lim.gpLimSmeScanReq->minChannelTime + pMac->lim.gpLimSmeScanReq->maxChannelTime;
-        } else {
-            /* using the value from WNI_CFG_PASSIVE_MINIMUM_CHANNEL_TIME as is done in
-             * void limContinuePostChannelScan(tpAniSirGlobal pMac)
-             */
-            pMsgNoA->single_noa_duration += val;
-        }
-    }
-
-    /* Adding an overhead of 5ms to account for the scan messaging delays */
-    pMsgNoA->single_noa_duration += SCAN_MESSAGING_OVERHEAD;
-
-    /* Multiplying with 1024 since riva is expecting in micro Seconds */
-     pMsgNoA->single_noa_duration *= CONV_MS_TO_US;
+    pMsgNoA->single_noa_duration = noaDuration;
 
     /* Start Insert NOA timer
      * If insert NOA req fails or NOA rsp fails or start NOA indication doesn't come from FW due to GO session deletion
-     * or any other failure or reason, we still need to send probe response to SME with failure status. The insert NOA
-     * timer of 500 ms will ensure a response back to SME/HDD for the scan req
+     * or any other failure or reason, we still need to process the deferred SME req. The insert NOA
+     * timer of 500 ms will ensure the stored SME req always gets processed
      */
     if (tx_timer_activate(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer)
                                       == TX_TIMER_ERROR)
@@ -4611,9 +4573,11 @@
 
         // send the scan response back with status failure and do not even call insert NOA
         limSendSmeScanRsp(pMac, sizeof(tSirSmeScanRsp), eSIR_SME_SCAN_FAILED, pMac->lim.gSmeSessionId, pMac->lim.gTransactionId);
-        return TRUE;
+        goto error;
     }
 
+    MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_INSERT_SINGLESHOT_NOA_TIMER));
+
     msg.type = WDA_SET_P2P_GO_NOA_REQ;
     msg.reserved = 0;
     msg.bodyptr = pMsgNoA;
@@ -4623,13 +4587,143 @@
     {
         /* In this failure case, timer is already started, so its expiration will take care of sending scan response */
         limLog(pMac, LOGP, FL("wdaPost Msg failed\n"));
-        return TRUE;
+        /* Deactivate the NOA timer in failure case */
+        limDeactivateAndChangeTimer(pMac, eLIM_INSERT_SINGLESHOT_NOA_TIMER);
+        goto error;
     }
+    return FALSE;
 
+error:
+    /* In any of the failure cases, just go ahead with the processing of registered deferred SME request without
+     * worrying about the NOA
+     */
+    limProcessRegdDefdSmeReqAfterNOAStart(pMac);
+    // msg buffer is consumed and freed in above function so return FALSE
     return FALSE;
 
 }
 
+static void __limRegisterDeferredSmeReqForNOAStart(tpAniSirGlobal pMac, tANI_U16 msgType, tANI_U32 *pMsgBuf)
+{
+    limLog(pMac, LOG1, FL("Reg msgType %d\n"), msgType) ;
+    pMac->lim.gDeferMsgTypeForNOA = msgType;
+    pMac->lim.gpDefdSmeMsgForNOA = pMsgBuf;
+}
+
+static void __limDeregisterDeferredSmeReqAfterNOAStart(tpAniSirGlobal pMac)
+{
+    limLog(pMac, LOG1, FL("Dereg msgType %d\n"), pMac->lim.gDeferMsgTypeForNOA) ;
+    pMac->lim.gDeferMsgTypeForNOA = 0;
+    if (pMac->lim.gpDefdSmeMsgForNOA != NULL)
+    {
+        /* __limProcessSmeScanReq consumed the buffer. We can free it. */
+        palFreeMemory( pMac->hHdd, (tANI_U32 *) pMac->lim.gpDefdSmeMsgForNOA);
+        pMac->lim.gpDefdSmeMsgForNOA = NULL;
+    }
+}
+
+static
+tANI_U32 limCalculateNOADuration(tpAniSirGlobal pMac, tANI_U16 msgType, tANI_U32 *pMsgBuf)
+{
+    tANI_U32 noaDuration = 0;
+
+    switch (msgType)
+    {
+        case eWNI_SME_SCAN_REQ:
+        {
+            tANI_U32 val;
+            tANI_U8 i;
+            tpSirSmeScanReq pScanReq = (tpSirSmeScanReq) pMsgBuf;
+            if (wlan_cfgGetInt(pMac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME, &val) != eSIR_SUCCESS)
+            {
+                /*
+                 * Could not get max channel value
+                 * from CFG. Log error.
+                 */
+                limLog(pMac, LOGP, FL("could not retrieve passive max channel value\n"));
+
+                /* use a default value of 110ms */
+                val = DEFAULT_PASSIVE_MAX_CHANNEL_TIME;
+            }
+
+            for (i = 0; i < pScanReq->channelList.numChannels; i++) {
+                tANI_U8 channelNum = pScanReq->channelList.channelNumber[i];
+
+                if (limActiveScanAllowed(pMac, channelNum)) {
+                    /* Use min + max channel time to calculate the total duration of scan */
+                    noaDuration += pScanReq->minChannelTime + pScanReq->maxChannelTime;
+                } else {
+                    /* using the value from WNI_CFG_PASSIVE_MINIMUM_CHANNEL_TIME as is done in
+                     * void limContinuePostChannelScan(tpAniSirGlobal pMac)
+                     */
+                    noaDuration += val;
+                }
+            }
+
+            /* Adding an overhead of 20ms to account for the scan messaging delays */
+            noaDuration += SCAN_MESSAGING_OVERHEAD;
+            noaDuration *= CONV_MS_TO_US;
+
+            break;
+        }
+
+        case eWNI_SME_OEM_DATA_REQ:
+            noaDuration = OEM_DATA_NOA_DURATION*CONV_MS_TO_US; // use 60 msec as default
+            break;
+
+        case eWNI_SME_REMAIN_ON_CHANNEL_REQ:
+        {
+            tSirRemainOnChnReq *pRemainOnChnReq = (tSirRemainOnChnReq *) pMsgBuf;
+            noaDuration = (pRemainOnChnReq->duration)*CONV_MS_TO_US;
+            break;
+        }
+
+        case eWNI_SME_JOIN_REQ:
+            noaDuration = JOIN_NOA_DURATION*CONV_MS_TO_US;
+            break;
+
+        default:
+            noaDuration = 0;
+            break;
+
+    }
+    limLog(pMac, LOGW, FL("msgType %d noa %d\n"), msgType, noaDuration);
+    return noaDuration;
+}
+
+void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac)
+{
+
+    limLog(pMac, LOG1, FL("Process defd sme req %d\n"), pMac->lim.gDeferMsgTypeForNOA);
+    if ( (pMac->lim.gDeferMsgTypeForNOA != 0) &&
+         (pMac->lim.gpDefdSmeMsgForNOA != NULL) )
+    {
+        switch (pMac->lim.gDeferMsgTypeForNOA)
+        {
+            case eWNI_SME_SCAN_REQ:
+                __limProcessSmeScanReq(pMac, pMac->lim.gpDefdSmeMsgForNOA);
+                break;
+            case eWNI_SME_OEM_DATA_REQ:
+                __limProcessSmeOemDataReq(pMac, pMac->lim.gpDefdSmeMsgForNOA);
+                break;
+            case eWNI_SME_REMAIN_ON_CHANNEL_REQ:
+                limProcessRemainOnChnlReq(pMac, pMac->lim.gpDefdSmeMsgForNOA);
+                break;
+            case eWNI_SME_JOIN_REQ:
+                __limProcessSmeJoinReq(pMac, pMac->lim.gpDefdSmeMsgForNOA);
+                break;
+            default:
+                limLog(pMac, LOGE, FL("Unknown deferred msg type %d\n"), pMac->lim.gDeferMsgTypeForNOA);
+                break;
+        }
+        __limDeregisterDeferredSmeReqAfterNOAStart(pMac);
+    }
+    else
+    {
+        limLog( pMac, LOGW, FL("start received from FW when no sme deferred msg pending. Do nothing."
+            "It might happen sometime when NOA start ind and timeout happen at the same time\n"));
+    }
+}
 
 #ifdef FEATURE_WLAN_TDLS_INTERNAL
 /*
@@ -4992,6 +5086,28 @@
          limSmeStateStr(pMac->lim.gLimSmeState), pMac->lim.gLimSmeState,
          limMlmStateStr(pMac->lim.gLimMlmState), pMac->lim.gLimMlmState );)
 
+    /* Special handling of some SME Req msgs where we have an existing GO session and
+     * want to insert NOA before processing those msgs. These msgs will be processed later when
+     * start event happens
+     */
+    switch (pMsg->type)
+    {
+        case eWNI_SME_SCAN_REQ:
+        case eWNI_SME_OEM_DATA_REQ:
+        case eWNI_SME_REMAIN_ON_CHANNEL_REQ:
+        case eWNI_SME_JOIN_REQ:
+            /* If we have an existing P2P GO session we need to insert NOA before actually process this SME Req */
+            if ((limIsNOAInsertReqd(pMac) == TRUE) && IS_FEATURE_SUPPORTED_BY_FW(P2P_GO_NOA_DECOUPLE_INIT_SCAN))
+            {
+                tANI_U32 noaDuration;
+                __limRegisterDeferredSmeReqForNOAStart(pMac, pMsg->type, pMsgBuf);
+                noaDuration = limCalculateNOADuration(pMac, pMsg->type, pMsgBuf);
+                bufConsumed = __limInsertSingleShotNOAForScan(pMac, noaDuration);
+                return bufConsumed;
+            }
+    }
+    /* If no insert NOA required then execute the code below */
+
     switch (pMsg->type)
     {
         case eWNI_SME_START_REQ:
@@ -5002,27 +5118,17 @@
             bufConsumed = __limProcessSmeSysReadyInd(pMac, pMsgBuf);
             break;
 
-
         case eWNI_SME_START_BSS_REQ:
             bufConsumed = __limProcessSmeStartBssReq(pMac, pMsg);
             break;
 
         case eWNI_SME_SCAN_REQ:
-            /* If we are in P2P GO mode we need to insert NOA before actually starting a scan */
-            if ((limIsNOAInsertReqd(pMac) == TRUE) && IS_FEATURE_SUPPORTED_BY_FW(P2P_GO_NOA_DECOUPLE_INIT_SCAN))
-            {
-                bufConsumed = __limInsertSingleShotNOAForScan(pMac, pMsgBuf);
-            }
-            else
-            {
-                __limProcessSmeScanReq(pMac, pMsgBuf);
-            }
+            __limProcessSmeScanReq(pMac, pMsgBuf);
             break;
 
 #ifdef FEATURE_OEM_DATA_SUPPORT
         case eWNI_SME_OEM_DATA_REQ:
             __limProcessSmeOemDataReq(pMac, pMsgBuf);
-
             break;
 #endif
         case eWNI_SME_REMAIN_ON_CHANNEL_REQ:
@@ -5034,7 +5140,6 @@
             break;
         case eWNI_SME_JOIN_REQ:
             __limProcessSmeJoinReq(pMac, pMsgBuf);
-
             break;
 
         case eWNI_SME_AUTH_REQ:
diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h
index 2aa2c47..aecfd43 100644
--- a/CORE/MAC/src/pe/lim/limTypes.h
+++ b/CORE/MAC/src/pe/lim/limTypes.h
@@ -1069,6 +1069,7 @@
 void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
 void limAbortRemainOnChan(tpAniSirGlobal pMac);
 tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
+void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
 #ifdef FEATURE_WLAN_TDLS_INTERNAL
 void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
 void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,