mirror of https://github.com/PentHertz/srsLTE.git
Change the calculation of UE group A random access preamble selection to choose a random number from [0 nof_groupA_preambles) rather than incrementing on the preambleTransmissionCounter. (#200)
This commit is contained in:
parent
dfce3ea155
commit
470953bf9c
|
@ -237,7 +237,8 @@ void ra_proc::step_resource_selection() {
|
|||
}
|
||||
if (sel_group == RA_GROUP_A) {
|
||||
if (nof_groupA_preambles) {
|
||||
sel_preamble = preambleTransmissionCounter%nof_groupA_preambles;
|
||||
// randomly choose preamble from [0 nof_groupA_preambles)
|
||||
sel_preamble = rand() % nof_groupA_preambles;
|
||||
} else {
|
||||
rError("Selected group preamble A but nof_groupA_preambles=0\n");
|
||||
state = RA_PROBLEM;
|
||||
|
@ -245,6 +246,7 @@ void ra_proc::step_resource_selection() {
|
|||
}
|
||||
} else {
|
||||
if (nof_groupB_preambles) {
|
||||
// randomly choose preamble from [nof_groupA_preambles nof_groupB_preambles)
|
||||
sel_preamble = nof_groupA_preambles + rand() % nof_groupB_preambles;
|
||||
} else {
|
||||
rError("Selected group preamble B but nof_groupA_preambles=0\n");
|
||||
|
|
Loading…
Reference in New Issue