Commit e395164a authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

fix issues to work with multiple carriers (conga-ercom)

parent c1490bb8
...@@ -105,8 +105,8 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -105,8 +105,8 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
__m128i t0, t1; __m128i t0, t1;
tx_buffer = memalign(16, MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + db_fulllength*sizeof(int16_t)); tx_buffer = memalign(16, MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + db_fulllength*sizeof(int16_t));
IF5_mobipass_header_t *header = (IF5_mobipass_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); IF5_mobipass_header_t *header = (IF5_mobipass_header_t *)((uint8_t *)tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block_head = (__m128i *)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + 4); data_block_head = (__m128i *)((uint8_t *)tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + 4);
header->flags = 0; header->flags = 0;
header->fifo_status = 0; header->fifo_status = 0;
...@@ -117,11 +117,11 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -117,11 +117,11 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
txp[0] = (void*)&eNB->common_vars.txdata[0][0][subframe*eNB->frame_parms.samples_per_tti]; txp[0] = (void*)&eNB->common_vars.txdata[0][0][subframe*eNB->frame_parms.samples_per_tti];
txp128 = (__m128i *) txp[0]; txp128 = (__m128i *) txp[0];
for (packet_id=0; packet_id<(fp->samples_per_tti*2)/db_fulllength; packet_id++) { for (packet_id=0; packet_id<fp->samples_per_tti/db_fulllength; packet_id++) {
header->time_stamp = proc_timestamp + packet_id*db_fulllength; header->time_stamp = (uint32_t)(proc_timestamp + packet_id*db_fulllength);
data_block = data_block_head; data_block = data_block_head;
for (i=0; i<db_fulllength>>3; i+=2) { for (i=0; i<db_fulllength>>2; i+=2) {
t0 = _mm_srai_epi16(*txp128++, 4); t0 = _mm_srai_epi16(*txp128++, 4);
t1 = _mm_srai_epi16(*txp128++, 4); t1 = _mm_srai_epi16(*txp128++, 4);
......
...@@ -234,6 +234,8 @@ typedef struct eNB_proc_t_s { ...@@ -234,6 +234,8 @@ typedef struct eNB_proc_t_s {
int thread_index; int thread_index;
/// timestamp received from HW /// timestamp received from HW
openair0_timestamp timestamp_rx; openair0_timestamp timestamp_rx;
/// timestamp to send to "slave rru"
openair0_timestamp timestamp_tx;
/// subframe to act upon for reception /// subframe to act upon for reception
int subframe_rx; int subframe_rx;
/// subframe to act upon for PRACH /// subframe to act upon for PRACH
......
...@@ -318,7 +318,7 @@ void enb_config_display(void) ...@@ -318,7 +318,7 @@ void enb_config_display(void)
for (j=0; j< enb_properties.properties[i]->nb_rrh_gw; j++) { for (j=0; j< enb_properties.properties[i]->nb_rrh_gw; j++) {
if (enb_properties.properties[i]->rrh_gw_config[j].active == 1 ){ if (enb_properties.properties[i]->rrh_gw_config[j].active == 1 ){
printf( "\n\tRRH GW %d config for eNB %u:\n\n", j, i); printf( "\n\tRRH GW %d config for eNB %u:\n\n", j, i);
printf( "\tinterface name : \t%s:\n",enb_properties.properties[i]->rrh_gw_if_name); printf( "\tinterface name : \t%s:\n",enb_properties.properties[i]->rrh_gw_config[j].rrh_gw_if_name);
printf( "\tlocal address : \t%s:\n",enb_properties.properties[i]->rrh_gw_config[j].local_address); printf( "\tlocal address : \t%s:\n",enb_properties.properties[i]->rrh_gw_config[j].local_address);
printf( "\tlocal port : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].local_port); printf( "\tlocal port : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].local_port);
printf( "\tremote address : \t%s:\n",enb_properties.properties[i]->rrh_gw_config[j].remote_address); printf( "\tremote address : \t%s:\n",enb_properties.properties[i]->rrh_gw_config[j].remote_address);
...@@ -2344,7 +2344,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -2344,7 +2344,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->nb_rrh_gw += 1; enb_properties.properties[enb_properties_index]->nb_rrh_gw += 1;
enb_properties.properties[enb_properties_index]->rrh_gw_if_name = strdup(if_name); enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rrh_gw_if_name = strdup(if_name);
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = strdup(ipv4); enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = strdup(ipv4);
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = strdup(ipv4_remote); enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = strdup(ipv4_remote);
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port = local_port; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port = local_port;
...@@ -2393,7 +2393,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -2393,7 +2393,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} }
} else { } else {
enb_properties.properties[enb_properties_index]->nb_rrh_gw = 0; enb_properties.properties[enb_properties_index]->nb_rrh_gw = 0;
enb_properties.properties[enb_properties_index]->rrh_gw_if_name = "none"; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rrh_gw_if_name = "none";
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = "0.0.0.0"; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_address = "0.0.0.0";
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = "0.0.0.0"; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].remote_address = "0.0.0.0";
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port= 0; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].local_port= 0;
......
...@@ -83,6 +83,7 @@ typedef struct rrh_gw_config_s { ...@@ -83,6 +83,7 @@ typedef struct rrh_gw_config_s {
unsigned udp:1; unsigned udp:1;
unsigned raw:1; unsigned raw:1;
unsigned active:1; unsigned active:1;
char *rrh_gw_if_name;
char *local_address; char *local_address;
char *remote_address; char *remote_address;
uint16_t local_port; uint16_t local_port;
......
This diff is collapsed.
...@@ -1066,7 +1066,7 @@ static void get_options (int argc, char **argv) ...@@ -1066,7 +1066,7 @@ static void get_options (int argc, char **argv)
if (enb_properties->properties[i]->rrh_gw_config[j].active == 1 ) { if (enb_properties->properties[i]->rrh_gw_config[j].active == 1 ) {
local_remote_radio = BBU_REMOTE_RADIO_HEAD; local_remote_radio = BBU_REMOTE_RADIO_HEAD;
(eth_params+j)->local_if_name = enb_properties->properties[i]->rrh_gw_if_name; (eth_params+j)->local_if_name = enb_properties->properties[i]->rrh_gw_config[j].rrh_gw_if_name;
(eth_params+j)->my_addr = enb_properties->properties[i]->rrh_gw_config[j].local_address; (eth_params+j)->my_addr = enb_properties->properties[i]->rrh_gw_config[j].local_address;
(eth_params+j)->my_port = enb_properties->properties[i]->rrh_gw_config[j].local_port; (eth_params+j)->my_port = enb_properties->properties[i]->rrh_gw_config[j].local_port;
(eth_params+j)->remote_addr = enb_properties->properties[i]->rrh_gw_config[j].remote_address; (eth_params+j)->remote_addr = enb_properties->properties[i]->rrh_gw_config[j].remote_address;
...@@ -1306,10 +1306,10 @@ void init_openair0() { ...@@ -1306,10 +1306,10 @@ void init_openair0() {
if (local_remote_radio == BBU_REMOTE_RADIO_HEAD) { if (local_remote_radio == BBU_REMOTE_RADIO_HEAD) {
openair0_cfg[card].remote_addr = eth_params->remote_addr; openair0_cfg[card].remote_addr = (eth_params+card)->remote_addr;
openair0_cfg[card].remote_port = eth_params->remote_port; openair0_cfg[card].remote_port = (eth_params+card)->remote_port;
openair0_cfg[card].my_addr = eth_params->my_addr; openair0_cfg[card].my_addr = (eth_params+card)->my_addr;
openair0_cfg[card].my_port = eth_params->my_port; openair0_cfg[card].my_port = (eth_params+card)->my_port;
} }
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment