src/lte/model/lte-ue-mac.cc
changeset 8726 f6f0e2531457
parent 8672 d02df5f59a0b
parent 8714 398bbcbb3f42
child 8729 74de12409ee5
--- a/src/lte/model/lte-ue-mac.cc	Thu Apr 19 17:43:47 2012 +0200
+++ b/src/lte/model/lte-ue-mac.cc	Mon Apr 23 13:16:03 2012 +0200
@@ -56,6 +56,7 @@
   virtual void ConfigureUe (uint16_t rnti);
   virtual void AddLc (uint8_t lcId, LteMacSapUser* msu);
   virtual void RemoveLc (uint8_t lcId);
+  virtual void RrcUpdateConfigurationReq (LteUeConfig_t params);
 
 private:
   LteUeMac* m_mac;
@@ -85,6 +86,11 @@
   m_mac->DoRemoveLc (lcid);
 }
 
+void
+UeMemberLteUeCmacSapProvider::RrcUpdateConfigurationReq (LteUeConfig_t params)
+{
+  m_mac->DoRrcUpdateConfigurationReq (params);
+}
 
 
 class UeMemberLteMacSapProvider : public LteMacSapProvider
@@ -244,7 +250,7 @@
 {
   NS_LOG_FUNCTION (this);
   NS_ASSERT_MSG (m_rnti == params.rnti, "RNTI mismatch between RLC and MAC");
-  LteRadioBearerTag tag (params.rnti, params.lcid);
+  LteRadioBearerTag tag (params.rnti, params.lcid, 0 /* UE works in SISO mode*/);
   params.pdu->AddPacketTag (tag);
 //   Ptr<PacketBurst> pb = CreateObject<PacketBurst> ();
 //   pb->AddPacket (params.pdu);
@@ -327,6 +333,14 @@
   m_macSapUserMap.erase (lcId);
 }
 
+void
+LteUeMac::DoRrcUpdateConfigurationReq (LteUeConfig_t params)
+{
+  NS_LOG_FUNCTION (this << " txMode " << (uint8_t) params.m_transmissionMode);
+  // forward info to PHY layer
+  m_uePhySapProvider->SetTransmissionMode (params.m_transmissionMode);
+}
+
 
 void
 LteUeMac::DoReceivePhyPdu (Ptr<Packet> p)
@@ -374,15 +388,8 @@
           if (itBsr!=m_ulBsrReceived.end ())
             {
               NS_LOG_FUNCTION (this << "\t" << dci.m_tbSize / m_macSapUserMap.size () << " bytes to LC " << (uint16_t)(*it).first << " queue " << (*itBsr).second);
-              (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs);
-              if ((*itBsr).second >=  dci.m_tbSize / activeLcs)
-                {
-                  (*itBsr).second -= dci.m_tbSize / activeLcs;
-                }
-              else
-                {
-                  (*itBsr).second = 0;
-                }
+              (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs, 0); // UE works only in SISO mode
+              (*itBsr).second -= dci.m_tbSize / activeLcs;
             }
         }