ODUHIGH-199:Addressing mux review comments 13/4513/2
authorBalaji Shankaran <balaji.shankaran@radisys.com>
Thu, 6 Aug 2020 07:22:23 +0000 (12:52 +0530)
committerBalaji Shankaran <balaji.shankaran@radisys.com>
Thu, 6 Aug 2020 11:15:23 +0000 (16:45 +0530)
Change-Id: Ifb0442cecc0ac85a3e2be77e73ac89fc486747d3
Signed-off-by: Balaji Shankaran <balaji.shankaran@radisys.com>
src/5gnrmac/mac.h
src/5gnrmac/mac_slot_ind.c
src/5gnrmac/rg_tom.c

index 99c769d..800b49d 100644 (file)
@@ -148,7 +148,8 @@ void fillMacCe(MacCeInfo  *macCeData, uint8_t *msg3Pdu);
 void macMuxPdu(MacDlData *dlData, MacCeInfo *macCeData, uint8_t *msg4TxPdu, uint16_t tbSize);
 int unpackRxData(RxDataIndPdu *rxDataIndPdu);
 uint16_t macSendUlCcchInd(uint8_t *rrcContainer, uint16_t cellId, uint16_t crnti);
-void BuildAndSendMsg4MuxPdu(Msg4Alloc *msg4Alloc);
+void fillMg4Pdu(Msg4Alloc *msg4Alloc);
+void buildAndSendMuxPdu(SlotIndInfo currTimingInfo);
 
 #endif
 /**********************************************************************
index c30b946..bca05f2 100644 (file)
@@ -94,8 +94,19 @@ int MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo)
    return ROK;
 }
 
-void BuildAndSendMsg4MuxPdu(Msg4Alloc *msg4Alloc)
-{ 
+/**
+ * @brief Forming anf filling the MUX Pdu
+ * @details
+ *
+ *     Function : fillMsg4Pdu
+ * 
+ *      Forming and filling of Msg4Pdu
+ *           
+ *  @param[in]  Msg4Alloc  *msg4Alloc
+ *  @return  void
+ **/
+void fillMsg4Pdu(Msg4Alloc *msg4Alloc)
+{
    MacDlData msg4DlData;
    MacCeInfo  macCeData;
 
@@ -109,7 +120,7 @@ void BuildAndSendMsg4MuxPdu(Msg4Alloc *msg4Alloc)
       if(msg4DlData.pduInfo[0].dlPdu != NULLP)
       {
          fillMsg4DlData(&msg4DlData, macCb.macCell->macRaCb[0].msg4Pdu);
-         fillMacCe(&macCeData, &macCb.macCell->macRaCb[0].msg3Pdu);
+         fillMacCe(&macCeData, macCb.macCell->macRaCb[0].msg3Pdu);
          /* Forming Mux Pdu */
                        macCb.macCell->macRaCb[0].msg4TxPdu = NULLP;
                        MAC_ALLOC(macCb.macCell->macRaCb[0].msg4TxPdu, macCb.macCell->macRaCb[0].msg4TbSize);
@@ -150,6 +161,34 @@ void BuildAndSendMsg4MuxPdu(Msg4Alloc *msg4Alloc)
       MAC_FREE(macCb.macCell->macRaCb[0].msg4Pdu, macCb.macCell->macRaCb[0].msg4PduLen); */
 }
 
+/**
+ * @brief Builds and Send the Muxed Pdu to Lower MAC
+ *
+ * @details
+ *
+ *     Function : buildAndSendMuxPdu
+ * 
+ *      Build and Sends the Muxed Pdu to Lower MAC.
+ *           
+ *  @param[in]  SlotIndInfo    *slotInd
+ *  @return  void
+ **/
+
+void buildAndSendMuxPdu(SlotIndInfo currTimingInfo)
+{
+   MacDlSlot *currDlSlot = NULLP;
+   SlotIndInfo muxTimingInfo;
+   memset(&muxTimingInfo, 0, sizeof(SlotIndInfo));
+   
+       ADD_DELTA_TO_TIME(currTimingInfo, muxTimingInfo, PHY_DELTA);
+   currDlSlot = &macCb.macCell->dlSlot[muxTimingInfo.slot];
+   if(currDlSlot->dlInfo.msg4Alloc)
+       {
+      fillMsg4Pdu(currDlSlot->dlInfo.msg4Alloc);
+               currDlSlot = NULLP;
+   }
+}
+
 /**
  * @brief Transmission time interval indication from PHY.
  *
index f4cd5d9..e01b4aa 100755 (executable)
@@ -597,17 +597,8 @@ SlotIndInfo slotInd
 #endif
 
    /* Mux Pdu for Msg4 */
-   SlotIndInfo muxTimingInfo;
-   memset(&muxTimingInfo, 0, sizeof(SlotIndInfo));
-   MacDlSlot *currDlSlot = NULLP;
-   ADD_DELTA_TO_TIME(slotInd, muxTimingInfo, PHY_DELTA);
-   currDlSlot = &macCb.macCell->dlSlot[muxTimingInfo.slot];
-   if(currDlSlot->dlInfo.msg4Alloc)
-       {
-      BuildAndSendMsg4MuxPdu(currDlSlot->dlInfo.msg4Alloc);
-               currDlSlot = NULLP;
-   }
-   
+   buildAndSendMuxPdu(slotInd);
+
    /* Trigger for DL TTI REQ */
    handleDlTtiReq(slotInd);