mirror of https://github.com/PentHertz/srsLTE.git
update of rrc_interface_mac to remove signal from mac to rrc that RA failed in case of handover failure
This commit is contained in:
parent
46e1e101d3
commit
92221eb780
|
@ -129,8 +129,8 @@ public:
|
|||
class rrc_interface_mac : public rrc_interface_mac_common
|
||||
{
|
||||
public:
|
||||
virtual void ho_ra_completed(bool ra_successful) = 0;
|
||||
virtual void release_pucch_srs() = 0;
|
||||
virtual void ho_ra_completed() = 0;
|
||||
virtual void release_pucch_srs() = 0;
|
||||
};
|
||||
|
||||
// RRC interface for PHY
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
void new_cell_meas(const std::vector<phy_meas_t>& meas);
|
||||
|
||||
// MAC interface
|
||||
void ho_ra_completed(bool ra_successful) final;
|
||||
void ho_ra_completed() final;
|
||||
void release_pucch_srs();
|
||||
void run_tti();
|
||||
void ra_problem();
|
||||
|
|
|
@ -539,7 +539,7 @@ void ra_proc::complete()
|
|||
mux_unit->msg3_flush();
|
||||
|
||||
if (ra_is_ho) {
|
||||
rrc->ho_ra_completed(true);
|
||||
rrc->ho_ra_completed();
|
||||
}
|
||||
log_h->console("Random Access Complete. c-rnti=0x%x, ta=%d\n", rntis->crnti, current_ta);
|
||||
rInfo("Random Access Complete. c-rnti=0x%x, ta=%d\n", rntis->crnti, current_ta);
|
||||
|
|
|
@ -821,11 +821,11 @@ void rrc::send_rrc_con_reconfig_complete()
|
|||
send_ul_dcch_msg(RB_ID_SRB1, ul_dcch_msg);
|
||||
}
|
||||
|
||||
void rrc::ho_ra_completed(bool ra_successful)
|
||||
void rrc::ho_ra_completed()
|
||||
{
|
||||
cmd_msg_t msg;
|
||||
msg.command = cmd_msg_t::HO_COMPLETE;
|
||||
msg.lcid = ra_successful ? 1 : 0;
|
||||
msg.lcid = 1;
|
||||
cmd_q.push(std::move(msg));
|
||||
}
|
||||
|
||||
|
|
|
@ -321,15 +321,10 @@ private:
|
|||
class rrc_dummy : public rrc_interface_mac
|
||||
{
|
||||
public:
|
||||
void ho_ra_completed(bool ra_successful)
|
||||
{
|
||||
ho_finish = true;
|
||||
ho_finish_successful = ra_successful;
|
||||
}
|
||||
void ho_ra_completed() { ho_finish_successful = true; }
|
||||
void release_pucch_srs() { printf("%s\n", __FUNCTION__); }
|
||||
void run_tti(uint32_t tti) { printf("%s\n", __FUNCTION__); }
|
||||
void ra_problem() { rach_problem++; }
|
||||
bool ho_finish = false;
|
||||
bool ho_finish_successful = false;
|
||||
uint32_t rach_problem = 0;
|
||||
};
|
||||
|
@ -1430,7 +1425,6 @@ int mac_random_access_test()
|
|||
phy.set_crnti(0);
|
||||
mac.start_cont_ho();
|
||||
stack.run_tti(tti++);
|
||||
rrc.ho_finish = false;
|
||||
my_test.nof_prachs = rach_cfg.ra_supervision_info.preamb_trans_max.to_number();
|
||||
my_test.temp_rnti++; // Temporal C-RNTI has to change to avoid duplicate
|
||||
my_test.msg4_valid_conres = false;
|
||||
|
@ -1438,7 +1432,7 @@ int mac_random_access_test()
|
|||
my_test.check_ra_successful = false;
|
||||
my_test.send_valid_ul_grant = false;
|
||||
TESTASSERT(!run_mac_ra_test(my_test, &mac, &phy, &tti, &stack));
|
||||
TESTASSERT(!rrc.ho_finish_successful && rrc.ho_finish);
|
||||
TESTASSERT(!rrc.ho_finish_successful);
|
||||
|
||||
// Test 8: Test Contention based Random Access. Same as above but we let the procedure finish successfully.
|
||||
mac_log->info("\n=========== Test %d =============\n", test_id++);
|
||||
|
@ -1446,21 +1440,20 @@ int mac_random_access_test()
|
|||
phy.set_crnti(0);
|
||||
mac.start_cont_ho();
|
||||
stack.run_tti(tti++);
|
||||
rrc.ho_finish = false;
|
||||
my_test.nof_prachs = 1;
|
||||
my_test.temp_rnti++; // Temporal C-RNTI has to change to avoid duplicate
|
||||
my_test.send_valid_ul_grant = true;
|
||||
TESTASSERT(!run_mac_ra_test(my_test, &mac, &phy, &tti, &stack));
|
||||
TESTASSERT(rrc.ho_finish_successful && rrc.ho_finish);
|
||||
TESTASSERT(rrc.ho_finish_successful);
|
||||
|
||||
// Test 9: Test non-Contention based HO. Used in HO but preamble is given by the network. In addition to checking
|
||||
// that the given preamble is correctly passed to the PHY, in this case there is no contention.
|
||||
// In this first test, no RAR is received and RA procedure fails
|
||||
mac_log->info("\n=========== Test %d =============\n", test_id++);
|
||||
rrc.ho_finish_successful = false;
|
||||
phy.set_prach_tti(tti + phy.prach_delay);
|
||||
stack.run_tti(tti++);
|
||||
phy.set_crnti(0);
|
||||
rrc.ho_finish = false;
|
||||
my_test.preamble_idx = 3;
|
||||
mac.start_noncont_ho(my_test.preamble_idx, 0);
|
||||
stack.run_pending_tasks();
|
||||
|
@ -1469,7 +1462,7 @@ int mac_random_access_test()
|
|||
my_test.temp_rnti++; // Temporal C-RNTI has to change to avoid duplicate
|
||||
TESTASSERT(!run_mac_ra_test(my_test, &mac, &phy, &tti, &stack));
|
||||
stack.run_tti(tti++);
|
||||
TESTASSERT(!rrc.ho_finish_successful && rrc.ho_finish);
|
||||
TESTASSERT(!rrc.ho_finish_successful);
|
||||
|
||||
// Test 10: Test non-Contention based HO. Used in HO but preamble is given by the network. We check that
|
||||
// the procedure is considered successful without waiting for contention
|
||||
|
@ -1477,7 +1470,6 @@ int mac_random_access_test()
|
|||
phy.set_prach_tti(tti + phy.prach_delay);
|
||||
stack.run_tti(tti++);
|
||||
phy.set_crnti(0);
|
||||
rrc.ho_finish = false;
|
||||
my_test.preamble_idx = 3;
|
||||
mac.start_noncont_ho(my_test.preamble_idx, 0);
|
||||
stack.run_pending_tasks();
|
||||
|
@ -1487,7 +1479,7 @@ int mac_random_access_test()
|
|||
my_test.temp_rnti++; // Temporal C-RNTI has to change to avoid duplicate
|
||||
TESTASSERT(!run_mac_ra_test(my_test, &mac, &phy, &tti, &stack));
|
||||
stack.run_tti(tti++);
|
||||
TESTASSERT(rrc.ho_finish_successful && rrc.ho_finish);
|
||||
TESTASSERT(rrc.ho_finish_successful);
|
||||
|
||||
mac.stop();
|
||||
|
||||
|
|
Loading…
Reference in New Issue