Commit 618d56bd authored by Lionel Gauthier's avatar Lionel Gauthier

Sebastian Held patches15/0012-reformatted.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7314 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 6333fa20
...@@ -1385,8 +1385,8 @@ do_RRCConnectionSetup( ...@@ -1385,8 +1385,8 @@ do_RRCConnectionSetup(
const uint8_t transmission_mode, const uint8_t transmission_mode,
const uint8_t Transaction_id, const uint8_t Transaction_id,
const LTE_DL_FRAME_PARMS* const frame_parms, const LTE_DL_FRAME_PARMS* const frame_parms,
SRB_ToAddModList_t **SRB_configList, SRB_ToAddModList_t **SRB_configList,
struct PhysicalConfigDedicated **physicalConfigDedicated) struct PhysicalConfigDedicated **physicalConfigDedicated)
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -1421,6 +1421,7 @@ do_RRCConnectionSetup( ...@@ -1421,6 +1421,7 @@ do_RRCConnectionSetup(
if (*SRB_configList) { if (*SRB_configList) {
free(*SRB_configList); free(*SRB_configList);
} }
*SRB_configList = CALLOC(1,sizeof(SRB_ToAddModList_t)); *SRB_configList = CALLOC(1,sizeof(SRB_ToAddModList_t));
/// SRB1 /// SRB1
...@@ -1626,8 +1627,7 @@ do_RRCConnectionSetup( ...@@ -1626,8 +1627,7 @@ do_RRCConnectionSetup(
if (frame_parms->frame_type == 0) { // FDD if (frame_parms->frame_type == 0) { // FDD
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 5+(ue_context_pP->local_uid%10); // Isr = 5 (every 10 subframes, offset=2+UE_id mod3) physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 5+(ue_context_pP->local_uid%10); // Isr = 5 (every 10 subframes, offset=2+UE_id mod3)
} } else {
else {
switch (frame_parms->tdd_config) { switch (frame_parms->tdd_config) {
case 1: case 1:
physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+(( physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+((
...@@ -1877,30 +1877,30 @@ do_UECapabilityEnquiry( ...@@ -1877,30 +1877,30 @@ do_UECapabilityEnquiry(
uint16_t uint16_t
do_RRCConnectionReconfiguration( do_RRCConnectionReconfiguration(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
uint8_t Transaction_id, uint8_t Transaction_id,
SRB_ToAddModList_t *SRB_list, SRB_ToAddModList_t *SRB_list,
DRB_ToAddModList_t *DRB_list, DRB_ToAddModList_t *DRB_list,
DRB_ToReleaseList_t *DRB_list2, DRB_ToReleaseList_t *DRB_list2,
struct SPS_Config *sps_Config, struct SPS_Config *sps_Config,
struct PhysicalConfigDedicated *physicalConfigDedicated, struct PhysicalConfigDedicated *physicalConfigDedicated,
MeasObjectToAddModList_t *MeasObj_list, MeasObjectToAddModList_t *MeasObj_list,
ReportConfigToAddModList_t *ReportConfig_list, ReportConfigToAddModList_t *ReportConfig_list,
QuantityConfig_t *quantityConfig, QuantityConfig_t *quantityConfig,
MeasIdToAddModList_t *MeasId_list, MeasIdToAddModList_t *MeasId_list,
MAC_MainConfig_t *mac_MainConfig, MAC_MainConfig_t *mac_MainConfig,
MeasGapConfig_t *measGapConfig, MeasGapConfig_t *measGapConfig,
MobilityControlInfo_t *mobilityInfo, MobilityControlInfo_t *mobilityInfo,
struct MeasConfig__speedStatePars *speedStatePars, struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp, RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti, C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
*dedicatedInfoNASList *dedicatedInfoNASList
#ifdef Rel10 #ifdef Rel10
, SCellToAddMod_r10_t *SCell_config , SCellToAddMod_r10_t *SCell_config
#endif #endif
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
......
...@@ -140,10 +140,10 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -140,10 +140,10 @@ unsigned short config_frames[4] = {2,9,11,13};
//#define USRP_DEBUG 1 //#define USRP_DEBUG 1
struct timing_info_t { struct timing_info_t {
//unsigned int frame, hw_slot, last_slot, next_slot; //unsigned int frame, hw_slot, last_slot, next_slot;
RTIME time_min, time_max, time_avg, time_last, time_now; RTIME time_min, time_max, time_avg, time_last, time_now;
//unsigned int mbox0, mbox1, mbox2, mbox_target; //unsigned int mbox0, mbox1, mbox2, mbox_target;
unsigned int n_samples; unsigned int n_samples;
} timing_info; } timing_info;
......
...@@ -423,9 +423,9 @@ static void *UE_thread_synch(void *arg) ...@@ -423,9 +423,9 @@ static void *UE_thread_synch(void *arg)
} }
LOG_I( PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n", openair_daq_vars.freq_offset, LOG_I( PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n", openair_daq_vars.freq_offset,
UE->rx_total_gain_dB, UE->rx_total_gain_dB,
downlink_frequency[0][0]+openair_daq_vars.freq_offset, downlink_frequency[0][0]+openair_daq_vars.freq_offset,
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+openair_daq_vars.freq_offset ); downlink_frequency[0][0]+uplink_frequency_offset[0][0]+openair_daq_vars.freq_offset );
for (card=0; card<MAX_CARDS; card++) { for (card=0; card<MAX_CARDS; card++) {
for (i=0; i<openair0_cfg[card].rx_num_channels; i++) { for (i=0; i<openair0_cfg[card].rx_num_channels; i++) {
...@@ -451,6 +451,7 @@ static void *UE_thread_synch(void *arg) ...@@ -451,6 +451,7 @@ static void *UE_thread_synch(void *arg)
printf("Unknown number of RBs %d\n",UE->lte_frame_parms.N_RB_DL); printf("Unknown number of RBs %d\n",UE->lte_frame_parms.N_RB_DL);
break; break;
} }
#endif #endif
} }
} }
...@@ -535,6 +536,7 @@ static void *UE_thread_tx(void *arg) ...@@ -535,6 +536,7 @@ static void *UE_thread_tx(void *arg)
perror("[SCHED] eNB tx thread: sched_setattr failed\n"); perror("[SCHED] eNB tx thread: sched_setattr failed\n");
return &UE_thread_tx_retval; return &UE_thread_tx_retval;
} }
#endif #endif
#endif #endif
...@@ -596,15 +598,15 @@ static void *UE_thread_tx(void *arg) ...@@ -596,15 +598,15 @@ static void *UE_thread_tx(void *arg)
if (ret == CONNECTION_LOST) { if (ret == CONNECTION_LOST) {
LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, returning to PRACH\n", LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, returning to PRACH\n",
UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 );
UE->UE_mode[0] = PRACH; UE->UE_mode[0] = PRACH;
} else if (ret == PHY_RESYNCH) { } else if (ret == PHY_RESYNCH) {
LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, trying to resynch\n", LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, trying to resynch\n",
UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 );
UE->UE_mode[0] = RESYNCH; UE->UE_mode[0] = RESYNCH;
} else if (ret == PHY_HO_PRACH) { } else if (ret == PHY_HO_PRACH) {
LOG_I( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u, return to PRACH and perform a contention-free access\n", LOG_I( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u, return to PRACH and perform a contention-free access\n",
UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx /*FIXME really _rx?*/, UE->slot_tx>>1 );
UE->UE_mode[0] = PRACH; UE->UE_mode[0] = PRACH;
} }
} }
...@@ -745,15 +747,15 @@ static void *UE_thread_rx(void *arg) ...@@ -745,15 +747,15 @@ static void *UE_thread_rx(void *arg)
if (ret == CONNECTION_LOST) { if (ret == CONNECTION_LOST) {
LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, returning to PRACH\n", LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, returning to PRACH\n",
UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 );
UE->UE_mode[0] = PRACH; UE->UE_mode[0] = PRACH;
} else if (ret == PHY_RESYNCH) { } else if (ret == PHY_RESYNCH) {
LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, trying to resynch\n", LOG_E( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u RRC Connection lost, trying to resynch\n",
UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 );
UE->UE_mode[0] = RESYNCH; UE->UE_mode[0] = RESYNCH;
} else if (ret == PHY_HO_PRACH) { } else if (ret == PHY_HO_PRACH) {
LOG_I( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u, return to PRACH and perform a contention-free access\n", LOG_I( PHY, "[UE %"PRIu8"] Frame %"PRIu32", subframe %u, return to PRACH and perform a contention-free access\n",
UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 ); UE->Mod_id, UE->frame_rx, UE->slot_tx>>1 );
UE->UE_mode[0] = PRACH; UE->UE_mode[0] = PRACH;
} }
} }
...@@ -891,14 +893,15 @@ void *UE_thread(void *arg) ...@@ -891,14 +893,15 @@ void *UE_thread(void *arg)
DevAssert( UE->lte_frame_parms.nb_antennas_rx <= 2 ); DevAssert( UE->lte_frame_parms.nb_antennas_rx <= 2 );
void* rxp[2]; void* rxp[2];
for (int i=0; i<UE->lte_frame_parms.nb_antennas_rx; i++) for (int i=0; i<UE->lte_frame_parms.nb_antennas_rx; i++)
rxp[i] = (dummy_dump==0) ? (void*)&rxdata[i][rxpos] : (void*)dummy[i]; rxp[i] = (dummy_dump==0) ? (void*)&rxdata[i][rxpos] : (void*)dummy[i];
unsigned int rxs = openair0.trx_read_func(&openair0, unsigned int rxs = openair0.trx_read_func(&openair0,
&timestamp, &timestamp,
rxp, rxp,
spp - ((first_rx==1) ? rx_off_diff : 0), spp - ((first_rx==1) ? rx_off_diff : 0),
UE->lte_frame_parms.nb_antennas_rx); UE->lte_frame_parms.nb_antennas_rx);
if (rxs != (spp- ((first_rx==1) ? rx_off_diff : 0))) { if (rxs != (spp- ((first_rx==1) ? rx_off_diff : 0))) {
exit_fun("problem in rx"); exit_fun("problem in rx");
...@@ -914,6 +917,7 @@ void *UE_thread(void *arg) ...@@ -914,6 +917,7 @@ void *UE_thread(void *arg)
DevAssert( UE->lte_frame_parms.nb_antennas_tx <= 2 ); DevAssert( UE->lte_frame_parms.nb_antennas_tx <= 2 );
void* txp[2]; void* txp[2];
for (int i=0; i<UE->lte_frame_parms.nb_antennas_tx; i++) for (int i=0; i<UE->lte_frame_parms.nb_antennas_tx; i++)
txp[i] = (void*)&txdata[i][txpos]; txp[i] = (void*)&txdata[i][txpos];
...@@ -1068,6 +1072,7 @@ void *UE_thread(void *arg) ...@@ -1068,6 +1072,7 @@ void *UE_thread(void *arg)
int fail = pthread_mutex_lock(&UE->mutex_synch); int fail = pthread_mutex_lock(&UE->mutex_synch);
int instance_cnt_synch = UE->instance_cnt_synch; int instance_cnt_synch = UE->instance_cnt_synch;
fail = fail || pthread_mutex_unlock(&UE->mutex_synch); fail = fail || pthread_mutex_unlock(&UE->mutex_synch);
if (fail) { if (fail) {
LOG_E( PHY, "[SCHED][UE] error (un-)locking mutex for UE synch\n" ); LOG_E( PHY, "[SCHED][UE] error (un-)locking mutex for UE synch\n" );
exit_fun("noting to add"); exit_fun("noting to add");
...@@ -1087,10 +1092,10 @@ void *UE_thread(void *arg) ...@@ -1087,10 +1092,10 @@ void *UE_thread(void *arg)
#ifndef USRP_DEBUG #ifndef USRP_DEBUG
unsigned int rxs = openair0.trx_read_func(&openair0, unsigned int rxs = openair0.trx_read_func(&openair0,
&timestamp, &timestamp,
(void**)rxdata, (void**)rxdata,
UE->rx_offset, UE->rx_offset,
UE->lte_frame_parms.nb_antennas_rx); UE->lte_frame_parms.nb_antennas_rx);
#else #else
rt_sleep_ns(10000000); rt_sleep_ns(10000000);
#endif #endif
......
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