From f265344390977b1bbbfe8c4842b4ac5192345e27 Mon Sep 17 00:00:00 2001
From: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
Date: Wed, 7 Feb 2018 13:45:34 +0100
Subject: [PATCH] passing S+D from PDCP to lower layers (PC5-S)

---
 openair2/LAYER2/MAC/ue_procedures.c | 6 ------
 openair2/LAYER2/RLC/rlc.c           | 2 +-
 openair2/RRC/LITE/rrc_UE.c          | 9 +++++----
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c
index f0bde23edc6..ff9e59b7f2b 100644
--- a/openair2/LAYER2/MAC/ue_procedures.c
+++ b/openair2/LAYER2/MAC/ue_procedures.c
@@ -769,12 +769,6 @@ void ue_send_sl_sdu(module_id_t module_idP,
   //filter incoming packet based on destination address
   destinationL2Id = (longh->DST07<<16) | (longh->DST815 <<8) | (longh->DST1623);
   LOG_I( MAC, "[DestinationL2Id:  0x%08x]  \n", destinationL2Id );
-  //match the destinationL2Id with UE L2Id or groupL2ID
-/*  if (!((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) | (destinationL2Id == UE_mac_inst[module_idP].groupL2Id))){
-     LOG_I( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n");
-     return;
-  }
-*/
   //in case of 1-n communication, verify that UE belongs to that group
   int i=0;
   for (i=0; i< MAX_NUM_DEST; i++)
diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c
index ae7d49a3d37..48e5106259c 100644
--- a/openair2/LAYER2/RLC/rlc.c
+++ b/openair2/LAYER2/RLC/rlc.c
@@ -405,7 +405,7 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxt_pP,
     rlc_mode = rlc_union_p->mode;
   } else {
     rlc_mode = RLC_MODE_NONE;
-    AssertFatal (0 , "RLC not configured key %ju\n", key);
+    //AssertFatal (0 , "RLC not configured key %ju\n", key);
   }
 
   if (MBMS_flagP == 0) {
diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c
index eb05a000ae8..4db3b2e9de5 100644
--- a/openair2/RRC/LITE/rrc_UE.c
+++ b/openair2/RRC/LITE/rrc_UE.c
@@ -5832,6 +5832,7 @@ void *rrc_control_socket_thread_fct(void *arg)
          // configure lower layers PDCP/MAC/PHY for this communication
          //Establish a new RBID/LCID for this communication
          // Establish a SLRB (using DRB 10 for now)
+         UE  = &UE_rrc_inst[module_id];
          PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, 0x1234, 0, 0,0);
 
          UE->DRB_config[0][0] = CALLOC(1,sizeof(struct DRB_ToAddMod));
@@ -5917,7 +5918,7 @@ void *rrc_control_socket_thread_fct(void *arg)
                   (DRB_ToReleaseList_t*)NULL
 #ifdef Rel14
                   ,(PMCH_InfoList_r9_t *)NULL
-                  , sourceL2Id, groupL2Id
+                  , sourceL2Id, destinationL2Id
 #endif
             );
 
@@ -5956,11 +5957,11 @@ void *rrc_control_socket_thread_fct(void *arg)
 #if defined(Rel10) || defined(Rel14)
                   ,CONFIG_ACTION_ADD,
                   &sourceL2Id,
-                  &groupL2Id
+                  &destinationL2Id
 #endif
             );
          } else {//RX
-            rrc_rlc_config_asn1_req(&ctxt,
+/*            rrc_rlc_config_asn1_req(&ctxt,
                   (SRB_ToAddModList_t*)NULL,
                   UE->DRB_configList,
                   (DRB_ToReleaseList_t*)NULL
@@ -5969,7 +5970,7 @@ void *rrc_control_socket_thread_fct(void *arg)
                   , sourceL2Id, 0
 #endif
             );
-
+*/
 
             //configure MAC with sourceL2Id/groupL2ID
             rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
-- 
GitLab