mirror of https://github.com/PentHertz/srsLTE.git
Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next
This commit is contained in:
commit
87711f55bd
|
@ -60,7 +60,7 @@ int srslte_enb_ul_init(srslte_enb_ul_t *q, srslte_cell_t cell,
|
|||
memcpy(&q->hopping_cfg, hopping_cfg, sizeof(srslte_pusch_hopping_cfg_t));
|
||||
}
|
||||
|
||||
q->users = calloc(sizeof(srslte_enb_ul_user_t*), SRSLTE_SIRNTI);
|
||||
q->users = calloc(sizeof(srslte_enb_ul_user_t*), (1+SRSLTE_SIRNTI));
|
||||
if (!q->users) {
|
||||
perror("malloc");
|
||||
goto clean_exit;
|
||||
|
@ -161,7 +161,7 @@ void srslte_enb_ul_free(srslte_enb_ul_t *q)
|
|||
int srslte_enb_ul_add_rnti(srslte_enb_ul_t *q, uint16_t rnti)
|
||||
{
|
||||
if (!q->users[rnti]) {
|
||||
q->users[rnti] = malloc(sizeof(srslte_enb_ul_user_t));
|
||||
q->users[rnti] = calloc(1, sizeof(srslte_enb_ul_user_t));
|
||||
|
||||
if (srslte_pucch_set_crnti(&q->pucch, rnti)) {
|
||||
fprintf(stderr, "Error setting PUCCH rnti\n");
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
|
||||
|
||||
phch_common(uint32_t max_mutex_) : tx_mutex(max_mutex_) {
|
||||
nof_mutex = 0;
|
||||
max_mutex = max_mutex_;
|
||||
params.max_prach_offset_us = 20;
|
||||
}
|
||||
|
|
|
@ -113,16 +113,6 @@ void mac::reset()
|
|||
/* Setup scheduler */
|
||||
scheduler.reset();
|
||||
|
||||
/* Setup SI-RNTI in PHY */
|
||||
phy_h->add_rnti(SRSLTE_SIRNTI);
|
||||
|
||||
/* Setup P-RNTI in PHY */
|
||||
phy_h->add_rnti(SRSLTE_PRNTI);
|
||||
|
||||
/* Setup RA-RNTI in PHY */
|
||||
for (int i=0;i<10;i++) {
|
||||
phy_h->add_rnti(1+i);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t mac::get_unique_id()
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace srsenb {
|
|||
*******************************************************/
|
||||
sched::sched()
|
||||
{
|
||||
current_tti = 0;
|
||||
log_h = NULL;
|
||||
pthread_mutex_init(&mutex, NULL);
|
||||
reset();
|
||||
|
@ -39,6 +40,7 @@ void sched::init(rrc_interface_mac *rrc_, srslte::log* log)
|
|||
|
||||
int sched::reset()
|
||||
{
|
||||
bzero(pending_msg3, sizeof(pending_msg3_t)*10);
|
||||
bzero(pending_rar, sizeof(sched_rar_t)*SCHED_MAX_PENDING_RAR);
|
||||
bzero(pending_sibs, sizeof(sched_sib_t)*MAX_SIBS);
|
||||
ue_db.clear();
|
||||
|
|
|
@ -60,7 +60,7 @@ bool phch_common::init(srslte_cell_t *cell_, srslte::radio* radio_h_, mac_interf
|
|||
|
||||
is_first_of_burst = true;
|
||||
is_first_tx = true;
|
||||
for (uint32_t i=0;i<nof_mutex;i++) {
|
||||
for (uint32_t i=0;i<max_mutex;i++) {
|
||||
pthread_mutex_init(&tx_mutex[i], NULL);
|
||||
}
|
||||
reset();
|
||||
|
|
|
@ -110,7 +110,18 @@ void phch_worker::init(phch_common* phy_, srslte::log *log_h_)
|
|||
fprintf(stderr, "Error initiating ENB DL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Setup SI-RNTI in PHY */
|
||||
add_rnti(SRSLTE_SIRNTI);
|
||||
|
||||
/* Setup P-RNTI in PHY */
|
||||
add_rnti(SRSLTE_PRNTI);
|
||||
|
||||
/* Setup RA-RNTI in PHY */
|
||||
for (int i=0;i<10;i++) {
|
||||
add_rnti(1+i);
|
||||
}
|
||||
|
||||
srslte_pucch_set_threshold(&enb_ul.pucch, 0.8);
|
||||
srslte_sch_set_max_noi(&enb_ul.pusch.ul_sch, phy->params.pusch_max_its);
|
||||
srslte_enb_dl_set_amp(&enb_dl, phy->params.tx_amplitude);
|
||||
|
|
|
@ -56,8 +56,9 @@ int prach_worker::init(srslte_cell_t *cell_, srslte_prach_cfg_t *prach_cfg_, mac
|
|||
}
|
||||
|
||||
start(priority);
|
||||
initiated = true;
|
||||
|
||||
initiated = true;
|
||||
|
||||
sf_cnt = 0;
|
||||
pending_tti = 0;
|
||||
processed_tti = 0;
|
||||
return 0;
|
||||
|
|
|
@ -61,7 +61,8 @@ void rrc::init(rrc_cfg_t *cfg_,
|
|||
|
||||
pthread_mutex_init(&user_mutex, NULL);
|
||||
pthread_mutex_init(&paging_mutex, NULL);
|
||||
|
||||
|
||||
act_monitor.start(RRC_THREAD_PRIO);
|
||||
bzero(&sr_sched, sizeof(sr_sched_t));
|
||||
|
||||
start(RRC_THREAD_PRIO);
|
||||
|
@ -69,9 +70,8 @@ void rrc::init(rrc_cfg_t *cfg_,
|
|||
|
||||
rrc::activity_monitor::activity_monitor(rrc* parent_)
|
||||
{
|
||||
running = true;
|
||||
parent = parent_;
|
||||
start(RRC_THREAD_PRIO);
|
||||
running = true;
|
||||
parent = parent_;
|
||||
}
|
||||
|
||||
void rrc::activity_monitor::stop()
|
||||
|
|
|
@ -347,6 +347,7 @@ bool s1ap::setup_s1()
|
|||
uint16_t tmp16;
|
||||
srslte::byte_buffer_t msg;
|
||||
LIBLTE_S1AP_S1AP_PDU_STRUCT pdu;
|
||||
bzero(&pdu, sizeof(LIBLTE_S1AP_S1AP_PDU_STRUCT));
|
||||
|
||||
pdu.choice_type = LIBLTE_S1AP_S1AP_PDU_CHOICE_INITIATINGMESSAGE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue