mirror of https://github.com/PentHertz/srsLTE.git
fix issue in SS where Msg4 wouldn't be sent because ConnectionSetup is provided too late
This commit is contained in:
parent
b88e877b4c
commit
39f2011699
|
@ -41,7 +41,7 @@ const char* state_str[] = {"RA: INIT: ",
|
||||||
"RA: INIT: ",
|
"RA: INIT: ",
|
||||||
"RA: PDCCH: ",
|
"RA: PDCCH: ",
|
||||||
"RA: Rx: ",
|
"RA: Rx: ",
|
||||||
"RA: Backoff:",
|
"RA: Backoff: ",
|
||||||
"RA: ConRes: ",
|
"RA: ConRes: ",
|
||||||
"RA: WaitComplt: ",
|
"RA: WaitComplt: ",
|
||||||
"RA: Complt: "};
|
"RA: Complt: "};
|
||||||
|
|
|
@ -269,7 +269,8 @@ public:
|
||||||
// look for DL data to be send in each bearer and provide grant accordingly
|
// look for DL data to be send in each bearer and provide grant accordingly
|
||||||
for (int lcid = 0; lcid < SRSLTE_N_RADIO_BEARERS; lcid++) {
|
for (int lcid = 0; lcid < SRSLTE_N_RADIO_BEARERS; lcid++) {
|
||||||
uint32_t buf_state = rlc.get_buffer_state(lcid);
|
uint32_t buf_state = rlc.get_buffer_state(lcid);
|
||||||
if (buf_state > 0) {
|
// Schedule DL transmission if there is data in RLC buffer or we need to send Msg4
|
||||||
|
if (buf_state > 0 || (msg3_tti != -1 && conres_id != 0)) {
|
||||||
log.debug("LCID=%d, buffer_state=%d\n", lcid, buf_state);
|
log.debug("LCID=%d, buffer_state=%d\n", lcid, buf_state);
|
||||||
const uint32_t mac_header_size = 10; // Add MAC header (10 B for all subheaders, etc)
|
const uint32_t mac_header_size = 10; // Add MAC header (10 B for all subheaders, etc)
|
||||||
if (tmp_rlc_buffer.get_tailroom() > (buf_state + mac_header_size)) {
|
if (tmp_rlc_buffer.get_tailroom() > (buf_state + mac_header_size)) {
|
||||||
|
@ -278,20 +279,19 @@ public:
|
||||||
mac_msg_dl.init_tx(&tx_payload_buffer, pdu_size + mac_header_size, false);
|
mac_msg_dl.init_tx(&tx_payload_buffer, pdu_size + mac_header_size, false);
|
||||||
|
|
||||||
// check if this is Msg4 that needs to contain the contention resolution ID CE
|
// check if this is Msg4 that needs to contain the contention resolution ID CE
|
||||||
if (msg3_tti != -1) {
|
if (msg3_tti != -1 && lcid == 0 && conres_id != 0) {
|
||||||
if (lcid == 0) {
|
|
||||||
if (mac_msg_dl.new_subh()) {
|
if (mac_msg_dl.new_subh()) {
|
||||||
if (mac_msg_dl.get()->set_con_res_id(conres_id)) {
|
if (mac_msg_dl.get()->set_con_res_id(conres_id)) {
|
||||||
log.info("CE: Added Contention Resolution ID=0x%" PRIx64 "\n", conres_id);
|
log.info("CE: Added Contention Resolution ID=0x%" PRIx64 "\n", conres_id);
|
||||||
} else {
|
} else {
|
||||||
log.error("CE: Setting Contention Resolution ID CE\n");
|
log.error("CE: Setting Contention Resolution ID CE\n");
|
||||||
}
|
}
|
||||||
|
conres_id = 0; // reset CR so it's not sent twice
|
||||||
} else {
|
} else {
|
||||||
log.error("CE: Setting Contention Resolution ID CE. No space for a subheader\n");
|
log.error("CE: Setting Contention Resolution ID CE. No space for a subheader\n");
|
||||||
}
|
}
|
||||||
msg3_tti = -1;
|
msg3_tti = -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Add payload
|
// Add payload
|
||||||
if (mac_msg_dl.new_subh()) {
|
if (mac_msg_dl.new_subh()) {
|
||||||
|
|
Loading…
Reference in New Issue