MAC Clean-up [Issue-ID: ODUHIGH-212]
[o-du/l2.git] / src / du_app / du_sys_info_hdl.c
index 90f4203..f2c6a96 100644 (file)
 *******************************************************************************/
 
 /* This file contains ASN codec for MIB and SIB1 msgs */
-
+#include "common_def.h"
+#include "lrg.h"
+#include "lkw.x"
+#include "lrg.x"
+#include "legtp.h"
+#include "du_app_mac_inf.h"
+#include "du_cfg.h"
 #include "du_mgr.h"
-#include "du_log.h"
+#include "du_utils.h"
 #include "BCCH-BCH-Message.h"
 #include "MIB.h"
 #include "PLMN-IdentityInfo.h"
@@ -48,7 +54,9 @@
 #include "ServingCellConfigCommonSIB.h"
 #include "MCC.h"
 #include "SIB1.h"
+#include "odu_common_codec.h"
 #include "du_sys_info_hdl.h"
+
 void FreeSib1Msg(SIB1_t *sib1Msg);
 uint8_t FreqInfoUlret = RFAILED;
 uint8_t RachCfgCommonret = RFAILED;
@@ -57,6 +65,7 @@ uint8_t UlCfgCommSibret = RFAILED;
 uint8_t FreqInfoDlret = RFAILED;
 uint8_t DlCfgCommSibret = RFAILED;
 uint8_t CommonSerachSpaceListret = RFAILED;
+
 /*******************************************************************
  *
  * @brief Builds MIB
@@ -2175,7 +2184,34 @@ uint8_t BuildServCellCfgCommonSib(ServingCellConfigCommonSIB_t *srvCellCfg)
    ssbPosInBurst->buf[0] = duSrvCellCfg.ssbPosInBurst;  
    ssbPosInBurst->bits_unused = 0;
 
-   srvCellCfg->ssb_PeriodicityServingCell = duSrvCellCfg.ssbPrdServingCell;
+       switch(duSrvCellCfg.ssbPrdServingCell)
+       {
+          case SSB_PERIODICITY_5MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms5;
+                       break;
+          case SSB_PERIODICITY_10MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms10;
+                       break;
+               case SSB_PERIODICITY_20MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms20;
+                       break;
+               case SSB_PERIODICITY_40MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms40;
+                       break;
+               case SSB_PERIODICITY_80MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms80;
+                       break;
+               case SSB_PERIODICITY_160MS:
+                  srvCellCfg->ssb_PeriodicityServingCell = \
+                          ServingCellConfigCommonSIB__ssb_PeriodicityServingCell_ms160;
+                       break;
+       }
+
    srvCellCfg->ss_PBCH_BlockPower = duSrvCellCfg.ssPbchBlockPwr;
 
    /* Downlink config common */