mirror of https://github.com/PentHertz/srsLTE.git
Merge branch 'next'
This commit is contained in:
commit
c011526e38
|
@ -82,7 +82,8 @@ void parse_args(int argc, char **argv) {
|
||||||
codebook_idx = (uint32_t) atoi(argv[optind]);
|
codebook_idx = (uint32_t) atoi(argv[optind]);
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
strncpy(decoder_type_name, argv[optind], 16);
|
strncpy(decoder_type_name, argv[optind], 15);
|
||||||
|
decoder_type_name[15] = 0;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
snr_db = (float) atof(argv[optind]);
|
snr_db = (float) atof(argv[optind]);
|
||||||
|
|
|
@ -392,7 +392,7 @@ int mac::rach_detected(uint32_t tti, uint32_t preamble_idx, uint32_t time_adv)
|
||||||
|
|
||||||
// Find empty slot for pending rars
|
// Find empty slot for pending rars
|
||||||
uint32_t ra_id=0;
|
uint32_t ra_id=0;
|
||||||
while(pending_rars[ra_id].temp_crnti && ra_id<MAX_PENDING_RARS) {
|
while(pending_rars[ra_id].temp_crnti && ra_id<MAX_PENDING_RARS-1) {
|
||||||
ra_id++;
|
ra_id++;
|
||||||
}
|
}
|
||||||
if (ra_id == MAX_PENDING_RARS) {
|
if (ra_id == MAX_PENDING_RARS) {
|
||||||
|
|
|
@ -256,7 +256,7 @@ void ue::push_pdu(uint32_t tti, uint32_t len)
|
||||||
bool ue::process_ce(srslte::sch_subh *subh) {
|
bool ue::process_ce(srslte::sch_subh *subh) {
|
||||||
uint32_t buff_size[4] = {0, 0, 0, 0};
|
uint32_t buff_size[4] = {0, 0, 0, 0};
|
||||||
float phr = 0;
|
float phr = 0;
|
||||||
int idx = 0;
|
uint32_t idx = 0;
|
||||||
uint16_t old_rnti = 0;
|
uint16_t old_rnti = 0;
|
||||||
bool is_bsr = false;
|
bool is_bsr = false;
|
||||||
switch(subh->ce_type()) {
|
switch(subh->ce_type()) {
|
||||||
|
@ -289,7 +289,7 @@ bool ue::process_ce(srslte::sch_subh *subh) {
|
||||||
break;
|
break;
|
||||||
case srslte::sch_subh::LONG_BSR:
|
case srslte::sch_subh::LONG_BSR:
|
||||||
subh->get_bsr(buff_size);
|
subh->get_bsr(buff_size);
|
||||||
for (int idx=0;idx<4;idx++) {
|
for (idx=0;idx<4;idx++) {
|
||||||
for (uint32_t i=0;i<lc_groups[idx].size();i++) {
|
for (uint32_t i=0;i<lc_groups[idx].size();i++) {
|
||||||
sched->ul_bsr(rnti, lc_groups[idx][i], buff_size[idx]);
|
sched->ul_bsr(rnti, lc_groups[idx][i], buff_size[idx]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -618,6 +618,7 @@ int setup_if_addr(char *ip_addr)
|
||||||
if(0 > ioctl(sock, SIOCGIFFLAGS, &ifr))
|
if(0 > ioctl(sock, SIOCGIFFLAGS, &ifr))
|
||||||
{
|
{
|
||||||
perror("socket");
|
perror("socket");
|
||||||
|
close(sock);
|
||||||
close(tun_fd);
|
close(tun_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -625,10 +626,13 @@ int setup_if_addr(char *ip_addr)
|
||||||
if(0 > ioctl(sock, SIOCSIFFLAGS, &ifr))
|
if(0 > ioctl(sock, SIOCSIFFLAGS, &ifr))
|
||||||
{
|
{
|
||||||
perror("ioctl2");
|
perror("ioctl2");
|
||||||
|
close(sock);
|
||||||
close(tun_fd);
|
close(tun_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(sock);
|
||||||
|
|
||||||
// Setup the IP address
|
// Setup the IP address
|
||||||
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
ifr.ifr_addr.sa_family = AF_INET;
|
ifr.ifr_addr.sa_family = AF_INET;
|
||||||
|
@ -636,6 +640,7 @@ int setup_if_addr(char *ip_addr)
|
||||||
if(0 > ioctl(sock, SIOCSIFADDR, &ifr))
|
if(0 > ioctl(sock, SIOCSIFADDR, &ifr))
|
||||||
{
|
{
|
||||||
perror("ioctl");
|
perror("ioctl");
|
||||||
|
close(sock);
|
||||||
close(tun_fd);
|
close(tun_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -644,9 +649,12 @@ int setup_if_addr(char *ip_addr)
|
||||||
if(0 > ioctl(sock, SIOCSIFNETMASK, &ifr))
|
if(0 > ioctl(sock, SIOCSIFNETMASK, &ifr))
|
||||||
{
|
{
|
||||||
perror("ioctl");
|
perror("ioctl");
|
||||||
|
close(sock);
|
||||||
close(tun_fd);
|
close(tun_fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(sock);
|
||||||
|
|
||||||
return(tun_fd);
|
return(tun_fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue