Merge branch 'master' into next
This commit is contained in:
commit
cb6adba46a
2 changed files with 10 additions and 7 deletions
|
@ -80,8 +80,9 @@ typedef struct pcaprec_hdr_s {
|
|||
#define MAC_LTE_UEID_TAG 0x03
|
||||
/* 2 bytes, network order */
|
||||
|
||||
#define MAC_LTE_SUBFRAME_TAG 0x04
|
||||
#define MAC_LTE_FRAME_SUBFRAME_TAG 0x04
|
||||
/* 2 bytes, network order */
|
||||
/* SFN is stored in 12 MSB and SF in 4 LSB */
|
||||
|
||||
#define MAC_LTE_PREDFINED_DATA_TAG 0x05
|
||||
/* 1 byte */
|
||||
|
@ -150,7 +151,7 @@ inline int MAC_LTE_PCAP_WritePDU(FILE *fd, MAC_Context_Info_t *context,
|
|||
pcaprec_hdr_t packet_header;
|
||||
char context_header[256];
|
||||
int offset = 0;
|
||||
unsigned short tmp16;
|
||||
uint16_t tmp16;
|
||||
|
||||
/* Can't write if file wasn't successfully opened */
|
||||
if (fd == NULL) {
|
||||
|
@ -176,9 +177,11 @@ inline int MAC_LTE_PCAP_WritePDU(FILE *fd, MAC_Context_Info_t *context,
|
|||
memcpy(context_header+offset, &tmp16, 2);
|
||||
offset += 2;
|
||||
|
||||
/* Subframe number */
|
||||
context_header[offset++] = MAC_LTE_SUBFRAME_TAG;
|
||||
tmp16 = htons(context->subFrameNumber);
|
||||
/* Subframe Number and System Frame Number */
|
||||
/* SFN is stored in 12 MSB and SF in 4 LSB */
|
||||
context_header[offset++] = MAC_LTE_FRAME_SUBFRAME_TAG;
|
||||
tmp16 = (context->sysFrameNumber << 4) | context->subFrameNumber;
|
||||
tmp16 = htons(tmp16);
|
||||
memcpy(context_header+offset, &tmp16, 2);
|
||||
offset += 2;
|
||||
|
||||
|
@ -215,4 +218,4 @@ inline void MAC_LTE_PCAP_Close(FILE *fd)
|
|||
fclose(fd);
|
||||
}
|
||||
|
||||
#endif /* UEPCAP_H */
|
||||
#endif /* UEPCAP_H */
|
||||
|
|
|
@ -749,7 +749,7 @@ int enb::parse_sibs(all_args_t *args, rrc_cfg_t *rrc_cfg, phy_cfg_t *phy_config_
|
|||
}
|
||||
|
||||
// Fill rest of data from enb config
|
||||
sib1->cell_id = args->enb.s1ap.enb_id;
|
||||
sib1->cell_id = (args->enb.s1ap.enb_id << 8) + args->enb.s1ap.cell_id;
|
||||
sib1->tracking_area_code = args->enb.s1ap.tac;
|
||||
sib1->freq_band_indicator = srslte_band_get_band(args->rf.dl_earfcn);
|
||||
sib1->N_plmn_ids = 1;
|
||||
|
|
Loading…
Reference in a new issue