Commit c8111292 authored by Laurent's avatar Laurent

fix warnings from merge

parent 5c69510f
......@@ -29,23 +29,28 @@ the function main() initializes the data from configuration file
The infinite loop:
## rx_rf()
Collect radio signal samples from RF board
all SDR processing is triggered by I/Q sample reception and it's date (timestamp)
TX I/Q samples will have a date in the future, compared to RX timestamp
called for each 5G NR slot
it blocks until data is available
the internal time comes from the RF board sampling numbers
(each sample has a incremental number representing a very accurate timing)
raw incoming data is in buffer called "rxdata"
raw incoming data is in buffer called "rxdata"
We derivate frame number, slot number, ... from the RX timestamp
{: .func2}
### nr_fep_full()
## nr_fep_full()
"front end processing" of uplink signal
performs DFT on the signal
same function (duplicates): phy_procedures_gNB_common_RX()
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
same function (duplicates): phy_procedures_gNB_common_RX()
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
rxdataF is the rxdata in frequency domain, phase aligned
{: .func3}
### gNB_top()
## gNB_top()
only compute frame numbre, slot number, ...
{: .func3}
### ocp_rxtx()
## ocp_rxtx()
main processing for both UL and DL
start by calling oai_subframe_ind() that trigger processing in pnf_p7_subframe_ind() purpose ???
all the context is in the passed structure UL_INFO
the context is not very clear: there is a mutex on it,
but not actual coherency (see below handle_nr_rach() assumes data is up-to-date)
......@@ -54,7 +59,7 @@ Then, phy_procedures_gNB_uespec_RX will hereafter replace the data for the next
This is very tricky and not thread safe at all.
{: .func3}
#### NR_UL_indication()
### NR_UL_indication()
This block processes data already decoded and stored in structures behind UL_INFO
{: .func4}
......@@ -71,22 +76,19 @@ if the input is a UE RACH detection
handles ulsch data prepared by nr_fill_indication()
{: .func4}
* gNB_dlsch_ulsch_scheduler ()
also calls "run_pdcp()", as this is not a autonomous thread, it needs to be called here to update traffic requests (DL) and to propagate waiting UL to upper layers
Calls schedule_nr_mib() that calls mac_rrc_nr_data_req() to fill MIB,
Calls each channel allocation: schedule SI, schedule_ul, schedule_dl, ...
this is a major entry for "phy-test" mode: in this mode, the allocation is fixed
all these channels goes to mac_rrc_nr_data_req() to get the data to transmit
the **scheduler** is called here, see dedicated chapter
{: .func4}
* NR_Schedule_response()
process as per the scheduler decided
{: .func4}
#### L1_nr_prach_procedures()
### L1_nr_prach_procedures()
????
{: .func4}
#### phy_procedures_gNB_uespec_RX()
### phy_procedures_gNB_uespec_RX()
* nr_decode_pucch0()
actual CCH channel decoding
actual CCH channel decoding form rxdataF (rx data in frequency domain)
populates UL_INFO.uci_ind, actual uci data is in gNB->pucch
{: .func4}
* nr_rx_pusch()
{: .func4}
......@@ -113,12 +115,12 @@ this function creates the "likelyhood ratios"
{: .func4}
* nr_ulsch_decoding()
{: .func4}
* nr_fill_indication()
{: .func4}
populated the data for the next call to "NR_UL_indication()"
* nr_fill_indication()
populate the data for the next call to "NR_UL_indication()"
it would be better to call **NR_UL_indication()** now instead of before (on previous slot)
{: .func4}
#### phy_procedures_gNB_TX()
### phy_procedures_gNB_TX()
* nr_common_signal_procedures()
generate common signals
{: .func4}
......@@ -145,6 +147,25 @@ The scheduler is called by the chain: nr_ul_indication()=>gNB_dlsch_ulsch_schedu
It calls sub functions to process each physical channel (rach, ...)
The scheduler uses and internal map of used RB: vrb_map and vrb_map_UL, so each specific channel scheduler can see the already filled RB in each subframe (the function gNB_dlsch_ulsch_scheduler() clears these two arrays when it starts)
The scheduler also calls "run_pdcp()", as this is not a autonomous thread, it needs to be called here to update traffic requests (DL) and to propagate waiting UL to upper layers
After calling run_pdcp, it updates "rlc" time data but it doesn't actually process rlc
it sends a iiti message to activate the thread for RRC, the answer will be asynchronous in ????
Calls schedule_nr_mib() that calls mac_rrc_nr_data_req() to fill MIB,
Calls each channel allocation: schedule SI, schedule_ul, schedule_dl, ...
this is a major entry for "phy-test" mode: in this mode, the allocation is fixed
all these channels goes to mac_rrc_nr_data_req() to get the data to transmit
nr_schedule_ue_spec() is called
* calls nr_simple_dlsch_preprocessor()=> mac_rlc_status_ind() mac_rlc_status_ind() locks and checks directly inside rlc data the quantity of waiting data. So, the scheduler can allocate RBs
* calls nr_update_pucch_scheduling()
* get_pdsch_to_harq_feedback() to schedule retransmission in DL
Calls nr_fill_nfapi_dl_pdu() to actually populate what should be done by the lower layers to make the Tx subframe
# RRC
RRC is a regular thread with itti loop on queue: TASK_RRC_GNB
it receives it's configuration in message NRRRC_CONFIGURATION_REQ, then real time mesages for all events: S1/NGAP events, X2AP messages and RRC_SUBFRAME_PROCESS
......@@ -155,7 +176,8 @@ how does it communicate to scheduler ?
# RLC
RLC code is new implementation.
RLC code is new implementation, not using OAI mechanisms: it is implmented directly on pthreads, ignoring OAI common functions.
It runs a thread waiting incoming data, but it is mainly running inside calling thread.
It is a library, running in thread RRC (except on itti message: F1AP_UL_RRC_MESSAGE for F1).
# NGAP
......
......@@ -1098,8 +1098,6 @@ int restart_L1L2(module_id_t enb_id) {
/* TODO this should be done for all RUs associated to this eNB */
memcpy(&ru->frame_parms, &RC.eNB[enb_id][0]->frame_parms, sizeof(LTE_DL_FRAME_PARMS));
RC.ru_mask |= (1 << ru->idx);
/* reset the list of connected UEs in the MAC, since in this process with
* loose all UEs (have to reconnect) */
init_UE_info(&RC.mac[enb_id]->UE_info);
......@@ -1112,11 +1110,6 @@ int restart_L1L2(module_id_t enb_id) {
msg_p = itti_alloc_new_message(TASK_ENB_APP, RRC_CONFIGURATION_REQ);
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
/* TODO XForms might need to be restarted, but it is currently (09/02/18)
* broken, so we cannot test it */
init_RU_proc(ru);
ru->rf_map.card = 0;
ru->rf_map.chain = 0; /* CC_id + chain_offset;*/
init_eNB_afterRU();
printf("Sending sync to all threads\n");
pthread_mutex_lock(&sync_mutex);
......
......@@ -956,7 +956,7 @@ if(!IS_SOFTMODEM_NOS1)
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init gNBs\n");
if(IS_SOFTMODEM_DOFORMS) {
sleep(1);
scopeParms_t p;
p.argc=&argc;
p.argv=argv;
......
......@@ -56,7 +56,6 @@
#include <openair2/RRC/LTE/rrc_vars.h>
#include <openair1/SCHED/sched_common_vars.h>
volatile int oai_exit;
int transmission_mode;
int single_thread_flag=1;
uint32_t do_forms=0;
unsigned int mmapped_dma=0;
......@@ -201,23 +200,6 @@ static inline int ocp_rxtx(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc) {
return(0);
}
void gNB_top(gNB_L1_proc_t *proc, struct RU_t_s *ru) {
gNB_L1_rxtx_proc_t *L1_proc = &proc->L1_proc;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
RU_proc_t *ru_proc=&ru->proc;
proc->timestamp_rx = ru_proc->timestamp_rx;
L1_proc->frame_rx = proc->frame_rx = proc->frame_prach = ru_proc->frame_rx =
(ru_proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
L1_proc->slot_rx = proc->slot_rx = proc->slot_prach =
ru_proc->tti_rx; // computed before in caller function
L1_proc->timestamp_tx = proc->timestamp_tx = ru_proc->timestamp_tx =
ru_proc->timestamp_rx +
sf_ahead*fp->samples_per_subframe;
L1_proc->frame_tx = proc->frame_tx = ru_proc->frame_tx =
(proc->timestamp_tx / (fp->samples_per_subframe*10))&1023;
L1_proc->slot_tx = ru_proc->tti_tx =
(L1_proc->slot_rx + sl_ahead)%fp->slots_per_frame;
}
static void *process_stats_thread(void *param) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
......@@ -253,12 +235,11 @@ void init_gNB_proc(int inst) {
proc->RU_mask_tx = (1<<gNB->num_RU)-1;
proc->RU_mask_prach =0;
pthread_mutex_init( &gNB->UL_INFO_mutex, NULL);
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
gNB->threadPool = (tpool_t *)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
char ul_pool[] = "-1,-1";
initTpool(ul_pool, gNB->threadPool, false);
initNotifiedFIFO(gNB->respDecode);
}
/// eNB kept in function name for nffapi calls, TO FIX
......@@ -319,7 +300,7 @@ static void get_options(void) {
memset((void *)&RC,0,sizeof(RC));
/* Read RC configuration file */
NRRCConfig();
printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %hhu\n",RC.nb_nr_inst,RC.nb_nr_L1_inst,RC.nb_RU);
printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %hhd\n", RC.nb_nr_inst,RC.nb_nr_L1_inst,RC.nb_RU);
}
AssertFatal(RC.nb_nr_L1_inst == 1 && RC.nb_RU == 1, "Only one gNB, one RU and one carrier is supported\n");
......@@ -351,15 +332,8 @@ static void init_pdcp(void) {
}
pdcp_module_init(pdcp_initmask);
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
} else {*/
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
//}
/*} else {
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
}*/
}
void init_main_gNB(void) {
......@@ -807,15 +781,11 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
static void *ru_thread( void *param ) {
RU_t *ru = (RU_t *)param;
RU_proc_t *proc = &ru->proc;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, fp);
nr_dump_frame_parms(fp);
AssertFatal(openair0_device_load(&ru->rfdevice,&ru->openair0_cfg)==0,"Cannot connect to local radio\n");
AssertFatal(ru->rfdevice.trx_start_func(&ru->rfdevice) == 0,"Could not start the RF device\n");
tpool_t *threadPool=(tpool_t *)malloc(sizeof(tpool_t));
initTpool("-1,-1,-1", threadPool, true);
int64_t slot=-1;
int64_t nextHWTSshouldBe=0, nextRxTSlogical=0;
// weird globals, used in NR_IF_Module.c
......@@ -843,23 +813,23 @@ static void *ru_thread( void *param ) {
LOG_E(HW,"reading a stream must be continuous, %ld, %ld\n", HWtimeStamp, nextHWTSshouldBe);
nextHWTSshouldBe=HWtimeStamp+rxs;
proc->timestamp_rx=nextRxTSlogical;
ru->proc.timestamp_rx=nextRxTSlogical;
nextRxTSlogical+=samples_per_slot;
int64_t HW_to_logical_RxTSoffset=(int64_t)HWtimeStamp-(int64_t)proc->timestamp_rx;
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
uint32_t idx_sf = proc->timestamp_rx / fp->samples_per_subframe;
float offsetInSubframe=proc->timestamp_rx % fp->samples_per_subframe;
proc->tti_rx = (idx_sf * fp->slots_per_subframe +
lroundf(offsetInSubframe / fp->samples_per_slot0))%
fp->slots_per_frame;
int64_t HW_to_logical_RxTSoffset=(int64_t)HWtimeStamp-(int64_t)ru->proc.timestamp_rx;
ru->proc.frame_rx = (ru->proc.timestamp_rx / (fp->samples_per_subframe*10))&1023;
uint32_t idx_sf = ru->proc.timestamp_rx / fp->samples_per_subframe;
float offsetInSubframe=ru->proc.timestamp_rx % fp->samples_per_subframe;
ru->proc.tti_rx = (idx_sf * fp->slots_per_subframe +
lroundf(offsetInSubframe / fp->samples_per_slot0))%
fp->slots_per_frame;
LOG_D(PHY,"RU %d/%d TS %llu (off %d), frame %d, slot %d.%d / %d\n",
ru->idx, 0,
(unsigned long long int)proc->timestamp_rx,
(int)ru->ts_offset,proc->frame_rx,proc->tti_rx,proc->tti_tx,fp->slots_per_frame);
int slot_type = nr_slot_select(&ru->gNB_list[0]->gNB_config,proc->frame_rx,proc->tti_rx);
(unsigned long long int)ru->proc.timestamp_rx,
(int)ru->ts_offset,ru->proc.frame_rx,ru->proc.tti_rx,ru->proc.tti_tx,fp->slots_per_frame);
int slot_type = nr_slot_select(&ru->gNB_list[0]->gNB_config,ru->proc.frame_rx,ru->proc.tti_rx);
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
nr_fep_full(ru,proc->tti_rx);
nr_fep_full(ru,ru->proc.tti_rx);
for (int aa=0; aa<ru->nb_rx; aa++)
memcpy((void *)RC.gNB[0]->common_vars.rxdataF[aa],
......@@ -868,33 +838,47 @@ static void *ru_thread( void *param ) {
LOG_D(PHY, "rxdataF energy: %d\n", signal_energy(ru->common.rxdataF[0], fp->symbols_per_slot*fp->ofdm_symbol_size));
}
gNB_top(&RC.gNB[0][0].proc, ru);
gNB_L1_rxtx_proc_t *L1_proc = &RC.gNB[0][0].proc.L1_proc;
gNB_L1_proc_t *gNBproc=&RC.gNB[0][0].proc;
gNB_L1_rxtx_proc_t *L1_proc = &gNBproc->L1_proc;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
gNBproc->timestamp_rx = ru->proc.timestamp_rx;
L1_proc->frame_rx = gNBproc->frame_rx = gNBproc->frame_prach = ru->proc.frame_rx =
(ru->proc.timestamp_rx / (fp->samples_per_subframe*10))&1023;
L1_proc->slot_rx = gNBproc->slot_rx = gNBproc->slot_prach =
ru->proc.tti_rx; // computed before in caller function
L1_proc->timestamp_tx = gNBproc->timestamp_tx = ru->proc.timestamp_tx =
ru->proc.timestamp_rx +
sf_ahead*fp->samples_per_subframe;
L1_proc->frame_tx = gNBproc->frame_tx = ru->proc.frame_tx =
(gNBproc->timestamp_tx / (fp->samples_per_subframe*10))&1023;
L1_proc->slot_tx = ru->proc.tti_tx =
(L1_proc->slot_rx + sl_ahead)%fp->slots_per_frame;
if (ocp_rxtx(&RC.gNB[0][0],L1_proc) < 0)
LOG_E(PHY,"gNB %d CC_id %d failed during execution\n",RC.gNB[0][0].Mod_id,RC.gNB[0][0].CC_id);
// do TX front-end processing if needed (precoding and/or IDFTs)
//ru->feptx_prec(ru,proc->frame_tx,proc->tti_tx);
nr_feptx_prec(ru,proc->frame_tx,proc->tti_tx);
nr_feptx_prec(ru,ru->proc.frame_tx,ru->proc.tti_tx);
// do OFDM with/without TX front-end processing if needed
//ru->feptx_ofdm
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
if (nr_slot_select(cfg,proc->frame_tx, proc->tti_tx ) != NR_UPLINK_SLOT) {
if (nr_slot_select(cfg,ru->proc.frame_tx, ru->proc.tti_tx ) != NR_UPLINK_SLOT) {
int aa=0; // antenna 0 hardcoded
NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms;
nr_feptx0(ru,proc->tti_tx,0,fp->symbols_per_slot,aa);
int *txdata = &ru->common.txdata[aa][fp->get_samples_slot_timestamp(proc->tti_tx,fp,0)];
nr_feptx0(ru,ru->proc.tti_tx,0,fp->symbols_per_slot,aa);
int *txdata = &ru->common.txdata[aa][fp->get_samples_slot_timestamp(ru->proc.tti_tx,fp,0)];
int slot_sizeF = (fp->ofdm_symbol_size)*
((NFAPI_CP_NORMAL == 1) ? 12 : 14);
LOG_D(PHY,"feptx_ofdm (TXPATH): frame %d, slot %d: txp (time %ld) %d dB, txp (freq) %d dB\n",
proc->frame_tx,proc->tti_tx,proc->timestamp_tx,dB_fixed(signal_energy((int32_t *)txdata,fp->get_samples_per_slot(
proc->tti_tx,fp))),dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF)));
ru->proc.frame_tx,ru->proc.tti_tx,ru->proc.timestamp_tx,
dB_fixed(signal_energy((int32_t *)txdata,fp->get_samples_per_slot(ru->proc.tti_tx,fp))),
dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF)));
}
// do outgoing fronthaul (south) if needed
tx_rf(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx+HW_to_logical_RxTSoffset);
tx_rf(ru,ru->proc.frame_tx,ru->proc.tti_tx,ru->proc.timestamp_tx+HW_to_logical_RxTSoffset);
slot++;
}
......
......@@ -2248,7 +2248,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
uint8_t Nl0; //= dlsch0_harq->Nl;
uint8_t Nl1;
#endif
RU_t *ru;
if ((dlsch0 != NULL) && (dlsch1 != NULL)){
......@@ -2431,6 +2430,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
// mapping ue specific beamforming weights from UE specified DLSCH structure to RU beam weights for the eNB
/*
for (int ru_id=0;ru_id<RC.nb_RU;ru_id++) {
RU_t *ru;
ru = RC.ru[ru_id];
for (int eNB_id=0;eNB_id<ru->num_eNB;eNB_id++){
if (phy_vars_eNB == ru->eNB_list[eNB_id]) {
......
......@@ -144,7 +144,6 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
PHY_VARS_eNB *phy_vars_enb,
int UE_id) {
LOG_D(HW,"scope for UE%d\n", UE_id);
int eNB_id = 0;
int i,i2,arx,atx,ind,k;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->frame_parms;
int nsymb_ce = 12*frame_parms->N_RB_UL*frame_parms->symbols_per_tti;
......
This diff is collapsed.
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
}
......
......@@ -79,6 +79,9 @@ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
double DS_TDL = .03;
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
int emulate_rf = 0;
int split73=0;
......
......@@ -80,6 +80,9 @@ double t_tx_min = 1000000000; /*!< \brief initial min process time for tx */
double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
int split73=0;
......@@ -345,7 +348,7 @@ int main(int argc, char **argv) {
unsigned short input_buffer_length;
unsigned int ret;
unsigned int coded_bits_per_codeword,nsymb;
unsigned int tx_lev=0,tx_lev_dB,trials,errs[4]= {0,0,0,0},round_trials[4]= {0,0,0,0};
unsigned int tx_lev=0,tx_lev_dB,trials,errs[5]= {0,0,0,0,0},round_trials[4]= {0,0,0,0};
FILE *bler_fd=NULL;
char bler_fname[512];
FILE *time_meas_fd=NULL;
......
......@@ -45,6 +45,7 @@
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair1/PHY/MODULATION/nr_modulation.h"
//#define DEBUG_NR_PBCHSIM
......
......@@ -19,6 +19,9 @@
* contact@openairinterface.org
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include "nr_pdcp_ue_manager.h"
#include "NR_RadioBearerConfig.h"
#include "NR_RLC-BearerConfig.h"
......@@ -43,6 +46,7 @@ static uint64_t pdcp_optmask;
/* rlc_data_req queue - begin */
/****************************************************************************/
#include <pthread.h>
/* NR PDCP and RLC both use "big locks". In some cases a thread may do
......@@ -92,6 +96,7 @@ static void *rlc_data_req_thread(void *_)
{
int i;
pthread_setname_np(pthread_self(), "RLC queue");
while (1) {
if (pthread_mutex_lock(&q.m) != 0) abort();
while (q.length == 0)
......@@ -203,6 +208,7 @@ static void *enb_tun_read_thread(void *_)
protocol_ctxt_t ctxt;
int rb_id = 1;
pthread_setname_np( pthread_self(),"enb_tun_read");
while (1) {
len = read(nas_sock_fd[0], &rx_buf, NL_MAX_PAYLOAD);
......@@ -247,7 +253,7 @@ static void *ue_tun_read_thread(void *_)
protocol_ctxt_t ctxt;
int rb_id = 1;
pthread_setname_np( pthread_self(),"ue_tun_read");
while (1) {
len = read(nas_sock_fd[0], &rx_buf, NL_MAX_PAYLOAD);
if (len == -1) {
......
......@@ -230,6 +230,8 @@ static bool milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
Returns: 0 = success (sqn filled), -1 on failure
*/
#define p(a) printf("%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n", (int)((a)[0]), (int)((a)[1]), (int)((a)[2]), (int)((a)[3]),(int)((a)[4]), (int)((a)[5]));
// valid code but put in comment as it is not used right now
#if 0
static bool milenage_auts(const u8 *opc, const u8 *k, const u8 *_rand, const u8 *auts,
u8 *sqn) {
u8 amf[2] = { 0x00, 0x00 }; /* TS 33.102 v7.0.0, 6.3.3 */
......@@ -350,3 +352,4 @@ static void milenage_opc_gen(const u8 *k, const u8 *op, u8 *opc) {
opc[i] = opc[i] ^ op[i];
}
#endif
#endif
......@@ -187,5 +187,6 @@ int securityModeCommand(void **msg, NRUEcontext_t *UE) {
// KSI: N-NAS-int-alg 0x02
req->ngKSI=2;
*msg=req;
return 0;
}
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