fixed Bug 1763 - Message 3 should be sent using the UL GRANT in the RAR

This commit is contained in:
Nicola Baldo
2013-09-17 18:02:32 +02:00
parent d60e59b608
commit 1e6493c8ee
2 changed files with 19 additions and 1 deletions

View File

@@ -130,7 +130,6 @@ LteRlcTm::DoNotifyTxOpportunity (uint32_t bytes, uint8_t layer, uint8_t harqId)
if (bytes < packet->GetSize ())
{
// Stingy MAC: Header fix part is 2 bytes, we need more bytes for the data
NS_LOG_WARN ("TX opportunity too small = " << bytes << " (PDU size: " << packet->GetSize () << ")");
return;
}

View File

@@ -339,6 +339,10 @@ LteUeMac::SendReportBufferStatus (void)
std::map <uint8_t, LcInfo>::iterator lcInfoMapIt;
lcInfoMapIt = m_lcInfoMap.find (lcid);
NS_ASSERT (lcInfoMapIt != m_lcInfoMap.end ());
NS_ASSERT_MSG ((lcid != 0) || (((*it).second.txQueueSize == 0)
&& ((*it).second.retxQueueSize == 0)
&& ((*it).second.statusPduSize == 0)),
"BSR should not be used for LCID 0");
uint8_t lcg = lcInfoMapIt->second.lcConfig.logicalChannelGroup;
queue.at (lcg) += ((*it).second.txQueueSize + (*it).second.retxQueueSize + (*it).second.statusPduSize);
}
@@ -411,6 +415,21 @@ LteUeMac::RecvRaResponse (BuildRarListElement_s raResponse)
// preambles are sent no one is received, so there is no need
// for contention resolution
m_cmacSapUser->NotifyRandomAccessSuccessful ();
// trigger tx opportunity for Message 3 over LC 0
// this is needed since Message 3's UL GRANT is in the RAR, not in UL-DCIs
const uint8_t lc0Lcid = 0;
std::map <uint8_t, LcInfo>::iterator lc0InfoIt = m_lcInfoMap.find (lc0Lcid);
NS_ASSERT (lc0InfoIt != m_lcInfoMap.end ());
std::map <uint8_t, LteMacSapProvider::ReportBufferStatusParameters>::iterator lc0BsrIt
= m_ulBsrReceived.find (lc0Lcid);
if ((lc0BsrIt != m_ulBsrReceived.end ())
&& (lc0BsrIt->second.txQueueSize > 0))
{
NS_ASSERT_MSG (raResponse.m_grant.m_tbSize > lc0BsrIt->second.txQueueSize,
"segmentation of Message 3 is not allowed");
lc0InfoIt->second.macSapUser->NotifyTxOpportunity (raResponse.m_grant.m_tbSize, 0, 0);
lc0BsrIt->second.txQueueSize = 0;
}
}
void