lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-ccid-firmware[master]: add simple gangupdater for multiple octsim boards
by roh 15 Mar '25

15 Mar '25
roh has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 ) Change subject: add simple gangupdater for multiple octsim boards ...................................................................... add simple gangupdater for multiple octsim boards Change-Id: Ic10572c121ac55586ec43126b63d69529757132b --- A contrib/flash_all_octsim.sh 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/96/26896/1 diff --git a/contrib/flash_all_octsim.sh b/contrib/flash_all_octsim.sh new file mode 100644 index 0000000..4f4c89b --- /dev/null +++ b/contrib/flash_all_octsim.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# this script is to scan for octsim boards, sort them by usb path and call dfu-util on each to update the board +# basic flow +# - get usb path and serialno tupel from dfu-util -l +# - reformat and sort by usbpath, drop the usbpath (grep cut tr sort cut) +# - flash the boards + +# TODO: +# - error handling +# - filter dfu-util output and generate nice summary + +dfu-util -l \ + | grep "^Found" \ + | grep "\[1d50:6141\]" \ + | cut -d ' ' -f 8,13 \ + | tr -d ',' \ + | cut -d \" -f 2,4 \ + | tr \" ' ' \ + | sort \ + | cut -d ' ' -f 2 + | xargs -n 1 dfu-util -d 1d50:6141 -D sysmoOCTSIM.bin -R -p -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic10572c121ac55586ec43126b63d69529757132b Gerrit-Change-Number: 26896 Gerrit-PatchSet: 1 Gerrit-Owner: roh <jsteiger(a)sysmocom.de> Gerrit-MessageType: newchange
2 2
0 0
Change in osmocom-bb[master]: layer23: make all apps depend on libosmo-gprs-rlcmac
by fixeria 30 Dec '22

30 Dec '22
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/30811 to look at the new patch set (#2). Change subject: layer23: make all apps depend on libosmo-gprs-rlcmac ...................................................................... layer23: make all apps depend on libosmo-gprs-rlcmac This will be needed for the modem application, and is also used in a follow-up commit adding support for parsing SI13 Rest Octets. Change-Id: I8e0f826c9b2a886f94624176e34e7d197e93d25f Related: OS#5500 --- M contrib/jenkins.sh M src/host/layer23/configure.ac M src/host/layer23/src/common/Makefile.am M src/host/layer23/src/misc/Makefile.am M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/modem/Makefile.am 6 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/30811/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8e0f826c9b2a886f94624176e34e7d197e93d25f Gerrit-Change-Number: 30811 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: layer23: make all apps depend on libosmo-gprs-rlcmac
by fixeria 30 Dec '22

30 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30811 ) Change subject: layer23: make all apps depend on libosmo-gprs-rlcmac ...................................................................... layer23: make all apps depend on libosmo-gprs-rlcmac This will be needed for the modem application, and is also used in a follow-up commit adding support for parsing SI13 Rest Octets. Change-Id: I8e0f826c9b2a886f94624176e34e7d197e93d25f Related: OS#5500 --- M src/host/layer23/configure.ac M src/host/layer23/src/common/Makefile.am M src/host/layer23/src/misc/Makefile.am M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/modem/Makefile.am 5 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/30811/1 diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index 9c11dbd..053cf58 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -44,6 +44,7 @@ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm) PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec) +PKG_CHECK_MODULES(LIBOSMOGPRSRLCMAC, libosmo-gprs-rlcmac) AC_CHECK_LIB(gps, gps_waiting, LIBGPS_CFLAGS=" -D_HAVE_GPSD" LIBGPS_LIBS=" -lgps ",,) AC_SUBST([LIBGPS_CFLAGS]) AC_SUBST([LIBGPS_LIBS]) diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 6705ef9..185bf04 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -7,6 +7,7 @@ -Wall \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOGPRSRLCMAC_CFLAGS) \ $(LIBGPS_CFLAGS) \ $(NULL) diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index ad48bda..230c04f 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -7,6 +7,7 @@ -Wall \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOGPRSRLCMAC_CFLAGS) \ $(LIBGPS_CFLAGS) \ $(NULL) @@ -15,6 +16,7 @@ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOCODEC_LIBS) \ + $(LIBOSMOGPRSRLCMAC_LIBS) \ $(LIBGPS_LIBS) \ $(NULL) diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index b7b25e3..a83e082 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -8,6 +8,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOGPRSRLCMAC_CFLAGS) \ $(LIBOSMOCODEC_CFLAGS) \ $(LIBOSMOGAPK_CFLAGS) \ $(LIBGPS_CFLAGS) \ @@ -43,6 +44,7 @@ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOGPRSRLCMAC_LIBS) \ $(LIBOSMOCODEC_LIBS) \ $(LIBOSMOGAPK_LIBS) \ $(LIBGPS_LIBS) \ diff --git a/src/host/layer23/src/modem/Makefile.am b/src/host/layer23/src/modem/Makefile.am index a29cc62..4fb3c11 100644 --- a/src/host/layer23/src/modem/Makefile.am +++ b/src/host/layer23/src/modem/Makefile.am @@ -8,6 +8,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOGPRSRLCMAC_CFLAGS) \ $(NULL) bin_PROGRAMS = modem @@ -18,4 +19,5 @@ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOGPRSRLCMAC_LIBS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8e0f826c9b2a886f94624176e34e7d197e93d25f Gerrit-Change-Number: 30811 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23/sysinfo: implement decoding of SI13 Rest Octets
by fixeria 30 Dec '22

30 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30812 ) Change subject: layer23/sysinfo: implement decoding of SI13 Rest Octets ...................................................................... layer23/sysinfo: implement decoding of SI13 Rest Octets Change-Id: Ia6ff7d4e37816c6321b54c1f7f8d7110e557f8c5 Related: SYS#5500 --- M src/host/layer23/include/osmocom/bb/common/sysinfo.h M src/host/layer23/src/common/sysinfo.c M src/host/layer23/src/mobile/gsm48_rr.c 3 files changed, 169 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/12/30812/1 diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h b/src/host/layer23/include/osmocom/bb/common/sysinfo.h index 6a915d0..429b90d 100644 --- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h +++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h @@ -21,7 +21,8 @@ struct gsm48_sysinfo { /* flags of available information */ uint8_t si1, si2, si2bis, si2ter, si3, - si4, si5, si5bis, si5ter, si6; + si4, si5, si5bis, si5ter, si6, + si13; /* memory maps to simply detect change in system info messages */ uint8_t si1_msg[23]; @@ -34,6 +35,7 @@ uint8_t si5b_msg[18]; uint8_t si5t_msg[18]; uint8_t si6_msg[18]; + uint8_t si13_msg[23]; struct gsm_sysinfo_freq freq[1024]; /* all frequencies */ uint16_t hopping[64]; /* hopping arfcn */ @@ -66,9 +68,46 @@ uint8_t ecsm; uint8_t sched; uint8_t sched_where; - uint8_t gprs; - uint8_t gprs_ra_colour; - uint8_t gprs_si13_pos; + + struct { + /* si3/si4 rest */ + uint8_t supported; + uint8_t ra_colour; + uint8_t si13_pos; + + /* si13 rest */ + uint8_t hopping; + uint8_t hsn; + uint8_t rfl_num_len; + uint8_t rfl_num[4]; + + uint8_t ma_bitlen; + uint8_t ma_bitmap[64 / 8]; + uint8_t arfcn_idx_len; + uint8_t arfcn_idx[16]; + + /* PBCCH is not present */ + uint8_t rac; + uint8_t prio_acc_thresh; + uint8_t nco; + + /* GPRS Cell Options */ + uint8_t nmo; + uint8_t T3168; + uint8_t T3192; + uint8_t ab_type; + uint8_t ctrl_ack_type; + uint8_t bs_cv_max; + uint8_t pan_params_present; + uint8_t pan_dec; + uint8_t pan_inc; + uint8_t pan_max; + + /* EGPRS Cell Options */ + uint8_t egprs_supported; + uint8_t egprs_pkt_chan_req; + uint8_t egprs_bep_period; + } gprs; /* cell selection */ int8_t ms_txpwr_max_cch; @@ -151,6 +190,8 @@ const struct gsm48_system_information_type_5ter *si, int len); int gsm48_decode_sysinfo6(struct gsm48_sysinfo *s, const struct gsm48_system_information_type_6 *si, int len); +int gsm48_decode_sysinfo13(struct gsm48_sysinfo *s, + const struct gsm48_system_information_type_13 *si, int len); int gsm48_decode_mobile_alloc(struct gsm_sysinfo_freq *freq, const uint8_t *ma, uint8_t len, uint16_t *hopping, uint8_t *hopp_len, int si4); diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index a912e9c..7f86b57 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -23,6 +23,8 @@ #include <osmocom/core/utils.h> #include <osmocom/core/bitvec.h> +#include <osmocom/gprs/rlcmac/gprs_rlcmac.h> + #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/networks.h> #include <osmocom/bb/common/logging.h> @@ -536,11 +538,11 @@ s->sched = 0; /* GPRS Indicator */ if (bitvec_get_bit_high(&bv) == H) { - s->gprs = 1; - s->gprs_ra_colour = bitvec_get_uint(&bv, 3); - s->gprs_si13_pos = bitvec_get_uint(&bv, 1); + s->gprs.supported = 1; + s->gprs.ra_colour = bitvec_get_uint(&bv, 3); + s->gprs.si13_pos = bitvec_get_uint(&bv, 1); } else - s->gprs = 0; + s->gprs.supported = 0; return 0; } @@ -571,11 +573,11 @@ s->po = 0; /* GPRS Indicator */ if (bitvec_get_bit_high(&bv) == H) { - s->gprs = 1; - s->gprs_ra_colour = bitvec_get_uint(&bv, 3); - s->gprs_si13_pos = bitvec_get_uint(&bv, 1); + s->gprs.supported = 1; + s->gprs.ra_colour = bitvec_get_uint(&bv, 3); + s->gprs.si13_pos = bitvec_get_uint(&bv, 1); } else - s->gprs = 0; + s->gprs.supported = 0; // todo: more rest octet bits return 0; @@ -840,6 +842,86 @@ return 0; } +int gsm48_decode_sysinfo13(struct gsm48_sysinfo *s, + const struct gsm48_system_information_type_13 *si, int len) +{ + SI13_RestOctets_t si13ro; + int rc; + + rc = osmo_gprs_rlcmac_decode_si13ro(&si13ro, si->rest_octets, sizeof(s->si13_msg)); + if (rc != 0) { + LOGP(DRR, LOGL_ERROR, "Failed to parse SI13 Rest Octets\n"); + return rc; + } + + if (si13ro.UnionType != 0) { + LOGP(DRR, LOGL_NOTICE, "PBCCH is deprecated and not supported\n"); + return -ENOTSUP; + } + + s->gprs.hopping = si13ro.Exist_MA; + if (s->gprs.hopping) { + const GPRS_Mobile_Allocation_t *gma = &si13ro.GPRS_Mobile_Allocation; + + s->gprs.hsn = gma->HSN; + s->gprs.rfl_num_len = gma->ElementsOf_RFL_NUMBER; + memcpy(&s->gprs.rfl_num[0], &gma->RFL_NUMBER[0], sizeof(gma->RFL_NUMBER)); + + if (gma->UnionType == 0) { /* MA Bitmap */ + const MobileAllocation_t *ma = &gma->u.MA; + s->gprs.ma_bitlen = ma->MA_BitLength; + memcpy(&s->gprs.ma_bitmap[0], &ma->MA_BITMAP[0], sizeof(ma->MA_BITMAP)); + } else { /* ARFCN Index List */ + const ARFCN_index_list_t *ai = &gma->u.ARFCN_index_list; + s->gprs.arfcn_idx_len = ai->ElementsOf_ARFCN_INDEX; + memcpy(&s->gprs.arfcn_idx[0], &ai->ARFCN_INDEX[0], sizeof(ai->ARFCN_INDEX)); + } + } + + const PBCCH_Not_present_t *np = &si13ro.u.PBCCH_Not_present; + + s->gprs.rac = np->RAC; + s->gprs.prio_acc_thresh = np->PRIORITY_ACCESS_THR; + s->gprs.nco = np->NETWORK_CONTROL_ORDER; + + const GPRS_Cell_Options_t *gco = &np->GPRS_Cell_Options; + + s->gprs.nmo = gco->NMO; + s->gprs.T3168 = gco->T3168; + s->gprs.T3192 = gco->T3192; + s->gprs.ab_type = gco->ACCESS_BURST_TYPE; + s->gprs.ctrl_ack_type = !gco->CONTROL_ACK_TYPE; /* inversed */ + s->gprs.bs_cv_max = gco->BS_CV_MAX; + + s->gprs.pan_params_present = gco->Exist_PAN; + if (s->gprs.pan_params_present) { + s->gprs.pan_dec = gco->PAN_DEC; + s->gprs.pan_dec = gco->PAN_INC; + s->gprs.pan_dec = gco->PAN_MAX; + } + + s->gprs.egprs_supported = 0; + if (gco->Exist_Extension_Bits) { + /* CSN.1 codec is not powerful enough (yet?) to decode this part :( */ + unsigned int ext_len = gco->Extension_Bits.extension_length; + const uint8_t *ext = &gco->Extension_Bits.Extension_Info[0]; + + s->gprs.egprs_supported = (ext[0] >> 7); + if (s->gprs.egprs_supported) { + if (ext_len < 6) + return -EINVAL; + s->gprs.egprs_pkt_chan_req = ~ext[0] & (1 << 6); /* inversed */ + s->gprs.egprs_bep_period = (ext[0] >> 2) & 0x0f; + } + } + + /* TODO: GPRS_Power_Control_Parameters */ + + s->si13 = 1; + + return 0; +} + int gsm48_encode_lai_hex(struct gsm48_loc_area_id *lai, uint16_t mcc, uint16_t mnc, uint16_t lac) { diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 8a920ee..deb76c9 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -2086,6 +2086,38 @@ return gsm48_new_sysinfo(ms, si->system_information); } +/* receive "SYSTEM INFORMATION 13" message (9.1.43a) */ +static int gsm48_rr_rx_sysinfo13(struct osmocom_ms *ms, struct msgb *msg) +{ + const struct gsm48_system_information_type_13 *si = msgb_l3(msg); + int rest_octets_len = msgb_l3len(msg) - sizeof(si->header); + struct gsm48_sysinfo *s = ms->cellsel.si; + + if (!s) { + LOGP(DRR, LOGL_INFO, + "No cell selected, SYSTEM INFORMATION 13 ignored\n"); + return -EINVAL; + } + + if (rest_octets_len < 0) { + LOGP(DRR, LOGL_NOTICE, + "Short read of SYSTEM INFORMATION 13 message.\n"); + return -EINVAL; + } + + if (!memcmp(si, s->si13_msg, MIN(msgb_l3len(msg), sizeof(s->si6_msg)))) + return 0; + + gsm48_decode_sysinfo13(s, si, msgb_l3len(msg)); + + LOGP(DRR, LOGL_INFO, + "New SYSTEM INFORMATION 13 (%s, RAC 0x%02x, NCO %u, MNO %u)\n", + s->gprs.egprs_supported ? "EGPRS" : "GPRS only", + s->gprs.rac, s->gprs.nco, s->gprs.nmo); + + return gsm48_new_sysinfo(ms, si->header.system_information); +} + /* * paging */ @@ -4820,6 +4852,8 @@ return gsm48_rr_rx_sysinfo3(ms, msg); case GSM48_MT_RR_SYSINFO_4: return gsm48_rr_rx_sysinfo4(ms, msg); + case GSM48_MT_RR_SYSINFO_13: + return gsm48_rr_rx_sysinfo13(ms, msg); default: #if 0 LOGP(DRR, LOGL_NOTICE, "BCCH message type 0x%02x not sup.\n", -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia6ff7d4e37816c6321b54c1f7f8d7110e557f8c5 Gerrit-Change-Number: 30812 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23/sysinfo: use OSMO_MIN from libosmocore
by fixeria 30 Dec '22

30 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30809 ) Change subject: layer23/sysinfo: use OSMO_MIN from libosmocore ...................................................................... layer23/sysinfo: use OSMO_MIN from libosmocore Change-Id: Ic01cadda13a7d7a3d34ddb94bd3964044f38959c --- M src/host/layer23/src/common/sysinfo.c 1 file changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/09/30809/1 diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index 8103647..7105e09 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -20,6 +20,7 @@ #include <string.h> #include <arpa/inet.h> +#include <osmocom/core/utils.h> #include <osmocom/core/bitvec.h> #include <osmocom/bb/common/osmocom_data.h> @@ -27,8 +28,6 @@ #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/sysinfo.h> -#define MIN(a, b) ((a < b) ? a : b) - /* * dumping */ @@ -594,7 +593,7 @@ { int payload_len = len - sizeof(*si); - memcpy(s->si1_msg, si, MIN(len, sizeof(s->si1_msg))); + memcpy(s->si1_msg, si, OSMO_MIN(len, sizeof(s->si1_msg))); /* Cell Channel Description */ decode_freq_list(s->freq, si->cell_channel_description, @@ -621,7 +620,7 @@ int gsm48_decode_sysinfo2(struct gsm48_sysinfo *s, struct gsm48_system_information_type_2 *si, int len) { - memcpy(s->si2_msg, si, MIN(len, sizeof(s->si2_msg))); + memcpy(s->si2_msg, si, OSMO_MIN(len, sizeof(s->si2_msg))); /* Neighbor Cell Description */ s->nb_ext_ind_si2 = (si->bcch_frequency_list[0] >> 6) & 1; @@ -641,7 +640,7 @@ int gsm48_decode_sysinfo2bis(struct gsm48_sysinfo *s, struct gsm48_system_information_type_2bis *si, int len) { - memcpy(s->si2b_msg, si, MIN(len, sizeof(s->si2b_msg))); + memcpy(s->si2b_msg, si, OSMO_MIN(len, sizeof(s->si2b_msg))); /* Neighbor Cell Description */ s->nb_ext_ind_si2bis = (si->bcch_frequency_list[0] >> 6) & 1; @@ -659,7 +658,7 @@ int gsm48_decode_sysinfo2ter(struct gsm48_sysinfo *s, struct gsm48_system_information_type_2ter *si, int len) { - memcpy(s->si2t_msg, si, MIN(len, sizeof(s->si2t_msg))); + memcpy(s->si2t_msg, si, OSMO_MIN(len, sizeof(s->si2t_msg))); /* Neighbor Cell Description 2 */ s->nb_multi_rep_si2ter = (si->ext_bcch_frequency_list[0] >> 6) & 3; @@ -678,7 +677,7 @@ { int payload_len = len - sizeof(*si); - memcpy(s->si3_msg, si, MIN(len, sizeof(s->si3_msg))); + memcpy(s->si3_msg, si, OSMO_MIN(len, sizeof(s->si3_msg))); /* Cell Identity */ s->cell_id = ntohs(si->cell_identity); @@ -713,7 +712,7 @@ uint8_t *data = si->data; struct gsm48_chan_desc *cd; - memcpy(s->si4_msg, si, MIN(len, sizeof(s->si4_msg))); + memcpy(s->si4_msg, si, OSMO_MIN(len, sizeof(s->si4_msg))); /* LAI */ gsm48_decode_lai_hex(&si->lai, &s->mcc, &s->mnc, &s->lac); @@ -768,7 +767,7 @@ int gsm48_decode_sysinfo5(struct gsm48_sysinfo *s, struct gsm48_system_information_type_5 *si, int len) { - memcpy(s->si5_msg, si, MIN(len, sizeof(s->si5_msg))); + memcpy(s->si5_msg, si, OSMO_MIN(len, sizeof(s->si5_msg))); /* Neighbor Cell Description */ s->nb_ext_ind_si5 = (si->bcch_frequency_list[0] >> 6) & 1; @@ -784,7 +783,7 @@ int gsm48_decode_sysinfo5bis(struct gsm48_sysinfo *s, struct gsm48_system_information_type_5bis *si, int len) { - memcpy(s->si5b_msg, si, MIN(len, sizeof(s->si5b_msg))); + memcpy(s->si5b_msg, si, OSMO_MIN(len, sizeof(s->si5b_msg))); /* Neighbor Cell Description */ s->nb_ext_ind_si5bis = (si->bcch_frequency_list[0] >> 6) & 1; @@ -800,7 +799,7 @@ int gsm48_decode_sysinfo5ter(struct gsm48_sysinfo *s, struct gsm48_system_information_type_5ter *si, int len) { - memcpy(s->si5t_msg, si, MIN(len, sizeof(s->si5t_msg))); + memcpy(s->si5t_msg, si, OSMO_MIN(len, sizeof(s->si5t_msg))); /* Neighbor Cell Description */ s->nb_multi_rep_si5ter = (si->bcch_frequency_list[0] >> 6) & 3; @@ -818,7 +817,7 @@ { int payload_len = len - sizeof(*si); - memcpy(s->si6_msg, si, MIN(len, sizeof(s->si6_msg))); + memcpy(s->si6_msg, si, OSMO_MIN(len, sizeof(s->si6_msg))); /* Cell Identity */ if (s->si6 && s->cell_id != ntohs(si->cell_identity)) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic01cadda13a7d7a3d34ddb94bd3964044f38959c Gerrit-Change-Number: 30809 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23/sysinfo: update coding style, make pointers const
by fixeria 30 Dec '22

30 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30810 ) Change subject: layer23/sysinfo: update coding style, make pointers const ...................................................................... layer23/sysinfo: update coding style, make pointers const Change-Id: Ia518251eae1b45ad573d076d97cba83ed25ea9ea Depends: libosmocore.git Ide9110b984d3302aec6b439c563eb10e2dcdec9e --- M src/host/layer23/include/osmocom/bb/common/sysinfo.h M src/host/layer23/src/common/sysinfo.c 2 files changed, 105 insertions(+), 104 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/10/30810/1 diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h b/src/host/layer23/include/osmocom/bb/common/sysinfo.h index 7fea2da..6a915d0 100644 --- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h +++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h @@ -121,42 +121,42 @@ }; char *gsm_print_arfcn(uint16_t arfcn); -uint8_t gsm_refer_pcs(uint16_t arfcn, struct gsm48_sysinfo *s); -int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn, - void (*print)(void *, const char *, ...), void *priv, - uint8_t *freq_map); +uint8_t gsm_refer_pcs(uint16_t arfcn, const struct gsm48_sysinfo *s); +int gsm48_sysinfo_dump(const struct gsm48_sysinfo *s, uint16_t arfcn, + void (*print)(void *, const char *, ...), + void *priv, uint8_t *freq_map); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, uint16_t *mnc, uint16_t *lac); -int gsm48_decode_chan_h0(struct gsm48_chan_desc *cd, uint8_t *tsc, - uint16_t *arfcn); -int gsm48_decode_chan_h1(struct gsm48_chan_desc *cd, uint8_t *tsc, - uint8_t *maio, uint8_t *hsn); +int gsm48_decode_chan_h0(const struct gsm48_chan_desc *cd, + uint8_t *tsc, uint16_t *arfcn); +int gsm48_decode_chan_h1(const struct gsm48_chan_desc *cd, + uint8_t *tsc, uint8_t *maio, uint8_t *hsn); int gsm48_decode_sysinfo1(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_1 *si, int len); + const struct gsm48_system_information_type_1 *si, int len); int gsm48_decode_sysinfo2(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2 *si, int len); + const struct gsm48_system_information_type_2 *si, int len); int gsm48_decode_sysinfo2bis(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2bis *si, int len); + const struct gsm48_system_information_type_2bis *si, int len); int gsm48_decode_sysinfo2ter(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2ter *si, int len); + const struct gsm48_system_information_type_2ter *si, int len); int gsm48_decode_sysinfo3(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_3 *si, int len); + const struct gsm48_system_information_type_3 *si, int len); int gsm48_decode_sysinfo4(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_4 *si, int len); + const struct gsm48_system_information_type_4 *si, int len); int gsm48_decode_sysinfo5(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5 *si, int len); + const struct gsm48_system_information_type_5 *si, int len); int gsm48_decode_sysinfo5bis(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5bis *si, int len); + const struct gsm48_system_information_type_5bis *si, int len); int gsm48_decode_sysinfo5ter(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5ter *si, int len); + const struct gsm48_system_information_type_5ter *si, int len); int gsm48_decode_sysinfo6(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_6 *si, int len); + const struct gsm48_system_information_type_6 *si, int len); int gsm48_decode_mobile_alloc(struct gsm_sysinfo_freq *freq, - uint8_t *ma, uint8_t len, uint16_t *hopping, uint8_t *hopp_len, - int si4); -int gsm48_encode_lai_hex(struct gsm48_loc_area_id *lai, uint16_t mcc, - uint16_t mnc, uint16_t lac); -int gsm48_decode_lai_hex(struct gsm48_loc_area_id *lai, uint16_t *mcc, - uint16_t *mnc, uint16_t *lac); + const uint8_t *ma, uint8_t len, + uint16_t *hopping, uint8_t *hopp_len, int si4); +int gsm48_encode_lai_hex(struct gsm48_loc_area_id *lai, + uint16_t mcc, uint16_t mnc, uint16_t lac); +int gsm48_decode_lai_hex(const struct gsm48_loc_area_id *lai, + uint16_t *mcc, uint16_t *mnc, uint16_t *lac); #endif /* _SYSINFO_H */ diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index 7105e09..a912e9c 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -47,7 +47,7 @@ } /* check if the cell 'talks' about DCS (0) or PCS (1) */ -uint8_t gsm_refer_pcs(uint16_t arfcn, struct gsm48_sysinfo *s) +uint8_t gsm_refer_pcs(uint16_t arfcn, const struct gsm48_sysinfo *s) { /* If ARFCN is PCS band, the cell refers to PCS */ if ((arfcn & ARFCN_PCS)) @@ -62,8 +62,9 @@ return s->band_ind; } -int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn, - void (*print)(void *, const char *, ...), void *priv, uint8_t *freq_map) +int gsm48_sysinfo_dump(const struct gsm48_sysinfo *s, uint16_t arfcn, + void (*print)(void *, const char *, ...), + void *priv, uint8_t *freq_map) { char buffer[81]; int i, j, k, index; @@ -301,8 +302,8 @@ * decoding */ -int gsm48_decode_chan_h0(struct gsm48_chan_desc *cd, uint8_t *tsc, - uint16_t *arfcn) +int gsm48_decode_chan_h0(const struct gsm48_chan_desc *cd, + uint8_t *tsc, uint16_t *arfcn) { *tsc = cd->h0.tsc; *arfcn = cd->h0.arfcn_low | (cd->h0.arfcn_high << 8); @@ -310,8 +311,8 @@ return 0; } -int gsm48_decode_chan_h1(struct gsm48_chan_desc *cd, uint8_t *tsc, - uint8_t *maio, uint8_t *hsn) +int gsm48_decode_chan_h1(const struct gsm48_chan_desc *cd, + uint8_t *tsc, uint8_t *maio, uint8_t *hsn) { *tsc = cd->h1.tsc; *maio = cd->h1.maio_low | (cd->h1.maio_high << 2); @@ -321,8 +322,9 @@ } /* decode "Cell Channel Description" (10.5.2.1b) and other frequency lists */ -static int decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd, - uint8_t len, uint8_t mask, uint8_t frqt) +static int decode_freq_list(struct gsm_sysinfo_freq *f, + const uint8_t *cd, uint8_t len, + uint8_t mask, uint8_t frqt) { #if 0 /* only Bit map 0 format for P-GSM */ @@ -336,7 +338,7 @@ /* decode "Cell Selection Parameters" (10.5.2.4) */ static int gsm48_decode_cell_sel_param(struct gsm48_sysinfo *s, - struct gsm48_cell_sel_par *cs) + const struct gsm48_cell_sel_par *cs) { s->ms_txpwr_max_cch = cs->ms_txpwr_max_ccch; s->cell_resel_hyst_db = cs->cell_resel_hyst * 2; @@ -349,7 +351,7 @@ /* decode "Cell Options (BCCH)" (10.5.2.3) */ static int gsm48_decode_cellopt_bcch(struct gsm48_sysinfo *s, - struct gsm48_cell_options *co) + const struct gsm48_cell_options *co) { s->bcch_radio_link_timeout = (co->radio_link_timeout + 1) * 4; s->bcch_dtx = co->dtx; @@ -360,7 +362,7 @@ /* decode "Cell Options (SACCH)" (10.5.2.3a) */ static int gsm48_decode_cellopt_sacch(struct gsm48_sysinfo *s, - struct gsm48_cell_options *co) + const struct gsm48_cell_options *co) { s->sacch_radio_link_timeout = (co->radio_link_timeout + 1) * 4; s->sacch_dtx = co->dtx; @@ -371,7 +373,7 @@ /* decode "Control Channel Description" (10.5.2.11) */ static int gsm48_decode_ccd(struct gsm48_sysinfo *s, - struct gsm48_control_channel_descr *cc) + const struct gsm48_control_channel_descr *cc) { s->ccch_conf = cc->ccch_conf; s->bs_ag_blks_res = cc->bs_ag_blks_res; @@ -384,7 +386,8 @@ /* decode "Mobile Allocation" (10.5.2.21) */ int gsm48_decode_mobile_alloc(struct gsm_sysinfo_freq *freq, - uint8_t *ma, uint8_t len, uint16_t *hopping, uint8_t *hopp_len, int si4) + const uint8_t *ma, uint8_t len, + uint16_t *hopping, uint8_t *hopp_len, int si4) { int i, j = 0; uint16_t f[len << 3]; @@ -437,16 +440,16 @@ } /* Rach Control decode tables */ -static uint8_t gsm48_max_retrans[4] = { +static const uint8_t gsm48_max_retrans[4] = { 1, 2, 4, 7 }; -static uint8_t gsm48_tx_integer[16] = { +static const uint8_t gsm48_tx_integer[16] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 25, 32, 50 }; /* decode "RACH Control Parameter" (10.5.2.29) */ static int gsm48_decode_rach_ctl_param(struct gsm48_sysinfo *s, - struct gsm48_rach_control *rc) + const struct gsm48_rach_control *rc) { s->reest_denied = rc->re; s->cell_barr = rc->cell_bar; @@ -457,7 +460,7 @@ return 0; } static int gsm48_decode_rach_ctl_neigh(struct gsm48_sysinfo *s, - struct gsm48_rach_control *rc) + const struct gsm48_rach_control *rc) { s->nb_reest_denied = rc->re; s->nb_cell_barr = rc->cell_bar; @@ -469,14 +472,13 @@ } /* decode "SI 1 Rest Octets" (10.5.2.32) */ -static int gsm48_decode_si1_rest(struct gsm48_sysinfo *s, uint8_t *si, - uint8_t len) +static int gsm48_decode_si1_rest(struct gsm48_sysinfo *s, + const uint8_t *si, uint8_t len) { - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data_len = len; - bv.data = si; + struct bitvec bv = { + .data_len = len, + .data = (uint8_t *)si, + }; /* Optional Selection Parameters */ if (bitvec_get_bit_high(&bv) == H) { @@ -493,14 +495,13 @@ } /* decode "SI 3 Rest Octets" (10.5.2.34) */ -static int gsm48_decode_si3_rest(struct gsm48_sysinfo *s, uint8_t *si, - uint8_t len) +static int gsm48_decode_si3_rest(struct gsm48_sysinfo *s, + const uint8_t *si, uint8_t len) { - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data_len = len; - bv.data = si; + struct bitvec bv = { + .data_len = len, + .data = (uint8_t *)si, + }; /* Optional Selection Parameters */ if (bitvec_get_bit_high(&bv) == H) { @@ -545,14 +546,13 @@ } /* decode "SI 4 Rest Octets" (10.5.2.35) */ -static int gsm48_decode_si4_rest(struct gsm48_sysinfo *s, uint8_t *si, - uint8_t len) +static int gsm48_decode_si4_rest(struct gsm48_sysinfo *s, + const uint8_t *si, uint8_t len) { - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data_len = len; - bv.data = si; + struct bitvec bv = { + .data_len = len, + .data = (uint8_t *)si, + }; /* Optional Selection Parameters */ if (bitvec_get_bit_high(&bv) == H) { @@ -581,15 +581,15 @@ return 0; } -/* decode "SI 6 Rest Octets" (10.5.2.35a) */ -static int gsm48_decode_si6_rest(struct gsm48_sysinfo *s, uint8_t *si, - uint8_t len) +/* TODO: decode "SI 6 Rest Octets" (10.5.2.35a) */ +static int gsm48_decode_si6_rest(struct gsm48_sysinfo *s, + const uint8_t *si, uint8_t len) { return 0; } int gsm48_decode_sysinfo1(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_1 *si, int len) + const struct gsm48_system_information_type_1 *si, int len) { int payload_len = len - sizeof(*si); @@ -597,7 +597,8 @@ /* Cell Channel Description */ decode_freq_list(s->freq, si->cell_channel_description, - sizeof(si->cell_channel_description), 0xce, FREQ_TYPE_SERV); + sizeof(si->cell_channel_description), + 0xce, FREQ_TYPE_SERV); /* RACH Control Parameter */ gsm48_decode_rach_ctl_param(s, &si->rach_control); /* SI 1 Rest Octets */ @@ -607,18 +608,17 @@ s->si1 = 1; if (s->si4) { - LOGP(DRR, LOGL_NOTICE, "Now updating previously received " - "SYSTEM INFORMATION 4\n"); - gsm48_decode_sysinfo4(s, - (struct gsm48_system_information_type_4 *) s->si4_msg, - sizeof(s->si4_msg)); + const struct gsm48_system_information_type_4 *si4 = (void *)s->si4_msg; + LOGP(DRR, LOGL_NOTICE, + "Now updating previously received SYSTEM INFORMATION 4\n"); + gsm48_decode_sysinfo4(s, si4, sizeof(s->si4_msg)); } return 0; } int gsm48_decode_sysinfo2(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2 *si, int len) + const struct gsm48_system_information_type_2 *si, int len) { memcpy(s->si2_msg, si, OSMO_MIN(len, sizeof(s->si2_msg))); @@ -626,7 +626,8 @@ s->nb_ext_ind_si2 = (si->bcch_frequency_list[0] >> 6) & 1; s->nb_ba_ind_si2 = (si->bcch_frequency_list[0] >> 5) & 1; decode_freq_list(s->freq, si->bcch_frequency_list, - sizeof(si->bcch_frequency_list), 0xce, FREQ_TYPE_NCELL_2); + sizeof(si->bcch_frequency_list), + 0xce, FREQ_TYPE_NCELL_2); /* NCC Permitted */ s->nb_ncc_permitted_si2 = si->ncc_permitted; /* RACH Control Parameter */ @@ -638,7 +639,7 @@ } int gsm48_decode_sysinfo2bis(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2bis *si, int len) + const struct gsm48_system_information_type_2bis *si, int len) { memcpy(s->si2b_msg, si, OSMO_MIN(len, sizeof(s->si2b_msg))); @@ -656,7 +657,7 @@ } int gsm48_decode_sysinfo2ter(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_2ter *si, int len) + const struct gsm48_system_information_type_2ter *si, int len) { memcpy(s->si2t_msg, si, OSMO_MIN(len, sizeof(s->si2t_msg))); @@ -673,7 +674,7 @@ } int gsm48_decode_sysinfo3(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_3 *si, int len) + const struct gsm48_system_information_type_3 *si, int len) { int payload_len = len - sizeof(*si); @@ -695,9 +696,9 @@ if (payload_len >= 4) gsm48_decode_si3_rest(s, si->rest_octets, payload_len); - LOGP(DRR, LOGL_INFO, "New SYSTEM INFORMATION 3 (mcc %s mnc %s " - "lac 0x%04x)\n", gsm_print_mcc(s->mcc), - gsm_print_mnc(s->mnc), s->lac); + LOGP(DRR, LOGL_INFO, + "New SYSTEM INFORMATION 3 (mcc %s mnc %s lac 0x%04x)\n", + gsm_print_mcc(s->mcc), gsm_print_mnc(s->mnc), s->lac); s->si3 = 1; @@ -705,12 +706,12 @@ } int gsm48_decode_sysinfo4(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_4 *si, int len) + const struct gsm48_system_information_type_4 *si, int len) { int payload_len = len - sizeof(*si); - uint8_t *data = si->data; - struct gsm48_chan_desc *cd; + const uint8_t *data = si->data; + const struct gsm48_chan_desc *cd; memcpy(s->si4_msg, si, OSMO_MIN(len, sizeof(s->si4_msg))); @@ -728,15 +729,13 @@ LOGP(DRR, LOGL_NOTICE, "Short read!\n"); return -EIO; } - cd = (struct gsm48_chan_desc *) (data + 1); + cd = (const struct gsm48_chan_desc *)(data + 1); s->chan_nr = cd->chan_nr; - if (cd->h0.h) { - s->h = 1; + s->h = cd->h0.h; + if (s->h) gsm48_decode_chan_h1(cd, &s->tsc, &s->maio, &s->hsn); - } else { - s->h = 0; + else gsm48_decode_chan_h0(cd, &s->tsc, &s->arfcn); - } payload_len -= 4; data += 4; } @@ -746,11 +745,10 @@ goto short_read; if (!s->si1) { LOGP(DRR, LOGL_NOTICE, "Ignoring CBCH allocation of " - "SYSTEM INFORMATION 4 until SI 1 is " - "received.\n"); + "SYSTEM INFORMATION 4 until SI 1 is received.\n"); } else { gsm48_decode_mobile_alloc(s->freq, data + 2, data[1], - s->hopping, &s->hopp_len, 1); + s->hopping, &s->hopp_len, 1); } payload_len -= 2 + data[1]; data += 2 + data[1]; @@ -765,7 +763,7 @@ } int gsm48_decode_sysinfo5(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5 *si, int len) + const struct gsm48_system_information_type_5 *si, int len) { memcpy(s->si5_msg, si, OSMO_MIN(len, sizeof(s->si5_msg))); @@ -773,7 +771,8 @@ s->nb_ext_ind_si5 = (si->bcch_frequency_list[0] >> 6) & 1; s->nb_ba_ind_si5 = (si->bcch_frequency_list[0] >> 5) & 1; decode_freq_list(s->freq, si->bcch_frequency_list, - sizeof(si->bcch_frequency_list), 0xce, FREQ_TYPE_REP_5); + sizeof(si->bcch_frequency_list), + 0xce, FREQ_TYPE_REP_5); s->si5 = 1; @@ -781,7 +780,7 @@ } int gsm48_decode_sysinfo5bis(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5bis *si, int len) + const struct gsm48_system_information_type_5bis *si, int len) { memcpy(s->si5b_msg, si, OSMO_MIN(len, sizeof(s->si5b_msg))); @@ -789,7 +788,8 @@ s->nb_ext_ind_si5bis = (si->bcch_frequency_list[0] >> 6) & 1; s->nb_ba_ind_si5bis = (si->bcch_frequency_list[0] >> 5) & 1; decode_freq_list(s->freq, si->bcch_frequency_list, - sizeof(si->bcch_frequency_list), 0xce, FREQ_TYPE_REP_5bis); + sizeof(si->bcch_frequency_list), + 0xce, FREQ_TYPE_REP_5bis); s->si5bis = 1; @@ -797,7 +797,7 @@ } int gsm48_decode_sysinfo5ter(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_5ter *si, int len) + const struct gsm48_system_information_type_5ter *si, int len) { memcpy(s->si5t_msg, si, OSMO_MIN(len, sizeof(s->si5t_msg))); @@ -805,7 +805,8 @@ s->nb_multi_rep_si5ter = (si->bcch_frequency_list[0] >> 6) & 3; s->nb_ba_ind_si5ter = (si->bcch_frequency_list[0] >> 5) & 1; decode_freq_list(s->freq, si->bcch_frequency_list, - sizeof(si->bcch_frequency_list), 0x8e, FREQ_TYPE_REP_5ter); + sizeof(si->bcch_frequency_list), + 0x8e, FREQ_TYPE_REP_5ter); s->si5ter = 1; @@ -813,7 +814,7 @@ } int gsm48_decode_sysinfo6(struct gsm48_sysinfo *s, - struct gsm48_system_information_type_6 *si, int len) + const struct gsm48_system_information_type_6 *si, int len) { int payload_len = len - sizeof(*si); @@ -839,8 +840,8 @@ return 0; } -int gsm48_encode_lai_hex(struct gsm48_loc_area_id *lai, uint16_t mcc, - uint16_t mnc, uint16_t lac) +int gsm48_encode_lai_hex(struct gsm48_loc_area_id *lai, + uint16_t mcc, uint16_t mnc, uint16_t lac) { lai->digits[0] = (mcc >> 8) | (mcc & 0xf0); lai->digits[1] = (mcc & 0x0f) | (mnc << 4); @@ -850,8 +851,8 @@ return 0; } - int gsm48_decode_lai_hex(struct gsm48_loc_area_id *lai, uint16_t *mcc, - uint16_t *mnc, uint16_t *lac) +int gsm48_decode_lai_hex(const struct gsm48_loc_area_id *lai, + uint16_t *mcc, uint16_t *mnc, uint16_t *lac) { *mcc = ((lai->digits[0] & 0x0f) << 8) | (lai->digits[0] & 0xf0) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia518251eae1b45ad573d076d97cba83ed25ea9ea Gerrit-Change-Number: 30810 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmocore[master]: gsm48_ie: gsm48_decode_freq_list(): make 'cd' argument const
by fixeria 30 Dec '22

30 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/30808 ) Change subject: gsm48_ie: gsm48_decode_freq_list(): make 'cd' argument const ...................................................................... gsm48_ie: gsm48_decode_freq_list(): make 'cd' argument const Change-Id: Ide9110b984d3302aec6b439c563eb10e2dcdec9e --- M include/osmocom/gsm/gsm48_ie.h M src/gsm/gsm48_ie.c 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/30808/1 diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h index b79cbfc..4768283 100644 --- a/include/osmocom/gsm/gsm48_ie.h +++ b/include/osmocom/gsm/gsm48_ie.h @@ -117,8 +117,9 @@ }; /* decode "Cell Channel Description" (10.5.2.1b) and other frequency lists */ -int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd, - uint8_t len, uint8_t mask, uint8_t frqt); +int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, + const uint8_t *cd, uint8_t len, + uint8_t mask, uint8_t frqt); /* decode "CSN.1 encoded Classmark 3" (10.5.1.7) */ int gsm48_decode_classmark3(struct gsm48_classmark3 *classmark3_out, diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index bbaec3d..5eca978 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -880,8 +880,9 @@ * \param[in] cd Cell Channel Description IE * \param[in] len Length of \a cd in bytes * \returns 0 on success; negative on error */ -int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd, - uint8_t len, uint8_t mask, uint8_t frqt) +int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, + const uint8_t *cd, uint8_t len, + uint8_t mask, uint8_t frqt) { int i; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ide9110b984d3302aec6b439c563eb10e2dcdec9e Gerrit-Change-Number: 30808 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ci[master]: coverity: build osmo-trx with MS TRX (--with-mstrx)
by laforge 30 Dec '22

30 Dec '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30801 ) Change subject: coverity: build osmo-trx with MS TRX (--with-mstrx) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30801 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4fbb052eacd8e6b8ddb8130d2e280a248719b250 Gerrit-Change-Number: 30801 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 30 Dec 2022 18:38:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-gsm-tester[master]: jenkins-build-common: use 'git submodule update'
by laforge 30 Dec '22

30 Dec '22
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/30781 ) Change subject: jenkins-build-common: use 'git submodule update' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/30781 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic2b9207b942a8a9edff82737117b2ed9d6d3cfe3 Gerrit-Change-Number: 30781 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 30 Dec 2022 18:38:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: rename s/SI_13_t/SI13_RestOctets_t/
by laforge 30 Dec '22

30 Dec '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30804 ) Change subject: rlcmac: rename s/SI_13_t/SI13_RestOctets_t/ ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30804 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I74ed534b9b52b70cdf8e4e2d4d960bb1d9aaf27b Gerrit-Change-Number: 30804 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 30 Dec 2022 18:38:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.