Commit 5cdfcc4c authored by WANG Tsu-Han's avatar WANG Tsu-Han

bugfix after merge

parent e08b5c1c
...@@ -73,7 +73,7 @@ typedef struct { ...@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t; } T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (248) #define VCD_NUM_FUNCTIONS (249)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187) #define VCD_NUM_VARIABLES (187)
......
...@@ -286,6 +286,7 @@ typedef struct { ...@@ -286,6 +286,7 @@ typedef struct {
int cc; int cc;
signed char first_packet; signed char first_packet;
signed char last_packet; signed char last_packet;
int flags_msb;
} openair0_write_package_t; } openair0_write_package_t;
typedef struct { typedef struct {
......
...@@ -458,7 +458,7 @@ static int trx_usrp_write(openair0_device *device, ...@@ -458,7 +458,7 @@ static int trx_usrp_write(openair0_device *device,
pthread_mutex_lock(&write_thread->mutex_write); pthread_mutex_lock(&write_thread->mutex_write);
if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE){ if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE){
LOG_W("Buffer overflow, count_write = %d, start = %d end = %d, resetting write package\n", write_thread->count_write, write_thread->start, write_thread->end); LOG_W(HW,"Buffer overflow, count_write = %d, start = %d end = %d, resetting write package\n", write_thread->count_write, write_thread->start, write_thread->end);
write_thread->end = write_thread->start; write_thread->end = write_thread->start;
write_thread->count_write = 0; write_thread->count_write = 0;
} }
...@@ -469,6 +469,7 @@ static int trx_usrp_write(openair0_device *device, ...@@ -469,6 +469,7 @@ static int trx_usrp_write(openair0_device *device,
write_package[end].cc = cc; write_package[end].cc = cc;
write_package[end].first_packet = first_packet_state; write_package[end].first_packet = first_packet_state;
write_package[end].last_packet = last_packet_state; write_package[end].last_packet = last_packet_state;
write_package[end].flags_msb = flags_msb;
for (int i = 0; i < cc; i++) for (int i = 0; i < cc; i++)
write_package[end].buff[i] = buff[i]; write_package[end].buff[i] = buff[i];
write_thread->count_write++; write_thread->count_write++;
...@@ -504,6 +505,7 @@ void *trx_usrp_write_thread(void * arg){ ...@@ -504,6 +505,7 @@ void *trx_usrp_write_thread(void * arg){
int cc; int cc;
signed char first_packet; signed char first_packet;
signed char last_packet; signed char last_packet;
int flags_msb;
while(1){ while(1){
pthread_mutex_lock(&write_thread->mutex_write); pthread_mutex_lock(&write_thread->mutex_write);
...@@ -519,6 +521,7 @@ void *trx_usrp_write_thread(void * arg){ ...@@ -519,6 +521,7 @@ void *trx_usrp_write_thread(void * arg){
cc = write_package[start].cc; cc = write_package[start].cc;
first_packet = write_package[start].first_packet; first_packet = write_package[start].first_packet;
last_packet = write_package[start].last_packet; last_packet = write_package[start].last_packet;
flags_msb = write_package[start].flags_msb;
write_thread->start = (write_thread->start + 1)% MAX_WRITE_THREAD_PACKAGE; write_thread->start = (write_thread->start + 1)% MAX_WRITE_THREAD_PACKAGE;
write_thread->count_write--; write_thread->count_write--;
pthread_mutex_unlock(&write_thread->mutex_write); pthread_mutex_unlock(&write_thread->mutex_write);
......
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