]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/nwal-lld.git/commitdiff
Fix SA destination queue config when addind security association
authorTinku Mannan <tmannan@ti.com>
Mon, 17 Mar 2014 19:55:05 +0000 (15:55 -0400)
committerTinku Mannan <tmannan@ti.com>
Mon, 17 Mar 2014 19:55:05 +0000 (15:55 -0400)
ti/drv/nwal/src/nwal_sec.c

index 3bf8523b67431c4cdec0f03027671ad32d4b061b..b4d70bc843c9108019a0c4a105925ca9794fba15 100755 (executable)
@@ -1093,6 +1093,7 @@ nwal_RetValue nwal_setSecAssoc( nwal_Inst               nwalInst,
     uint32_t                key;
     nwal_utlSecAssocParam_t utlSecAssocParam;
     nwalLocRouteInfo_t         routeInfo;
+    nwalGlobContext_t*  pIhandle = (nwalGlobContext_t*)nwalInst;
 
     pLocContext = nwal_getLocContext(pNwalContext);
     if(pLocContext == NULL)
@@ -1213,15 +1214,24 @@ nwal_RetValue nwal_setSecAssoc( nwal_Inst               nwalInst,
     pIpSecInfo->dir = pCreateParam->saIpSecParam.dir;
     if(pIpSecInfo->dir == NWAL_SA_DIR_INBOUND)
     {
-        if(pIpSecInfo->saMode == nwal_SA_MODE_TUNNEL)
+        if(pIhandle->cfg.pDeviceCfg->nssGen == NWAL_CFG_NSS_GEN2)
         {
             genCfgParam.destInfo.queueID =
-                pNwalContext->txQMap[NWAL_TX_QUEUE_INDEX_PDSP2];
+                  pNwalContext->txQMap[NWAL_TX_QUEUE_INDEX_PDSP3];
         }
         else
         {
-            genCfgParam.destInfo.queueID =
-                pNwalContext->txQMap[NWAL_TX_QUEUE_INDEX_PDSP3];
+            if(pIpSecInfo->saMode == nwal_SA_MODE_TUNNEL)
+            {
+                genCfgParam.destInfo.queueID =
+                    pNwalContext->txQMap[NWAL_TX_QUEUE_INDEX_PDSP2];
+                    printf("nwal_setSecAssoc: queueId %d\n", genCfgParam.destInfo.queueID);
+            }
+            else
+            {
+                genCfgParam.destInfo.queueID =
+                    pNwalContext->txQMap[NWAL_TX_QUEUE_INDEX_PDSP3];
+            }
         }
     }
     else