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

January 2022

  • 3 participants
  • 781 discussions
Change in osmo-bsc[pespin/1-8-0]: hodec2: fix segv for inter-BSC ho target
by pespin 11 Jan '22

11 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26868 ) Change subject: hodec2: fix segv for inter-BSC ho target ...................................................................... hodec2: fix segv for inter-BSC ho target Related: OS#5324 SYS#5259 Change-Id: I5a3345ab0005a73597f5c27207480912a2f5aae6 --- M src/osmo-bsc/handover_decision_2.c 1 file changed, 30 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/68/26868/1 diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index 6730f26..14bc2d4 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -1027,27 +1027,39 @@ break; } - chan_counts_for_bts(&bts_counts, c->target.bts); - c->target.free_tchf = bts_counts.val[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_F]; - c->target.min_free_tchf = ho_get_hodec2_tchf_min_slots(c->target.bts->ho); - c->target.free_tchh = bts_counts.val[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_H]; - c->target.min_free_tchh = ho_get_hodec2_tchh_min_slots(c->target.bts->ho); + /* For inter-BSC handover, the target BTS is in a different BSC and hence NULL here. */ + if (c->target.bts) { + chan_counts_for_bts(&bts_counts, c->target.bts); + c->target.free_tchf = bts_counts.val[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_F]; + c->target.min_free_tchf = ho_get_hodec2_tchf_min_slots(c->target.bts->ho); + c->target.free_tchh = bts_counts.val[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_H]; + c->target.min_free_tchh = ho_get_hodec2_tchh_min_slots(c->target.bts->ho); - /* Would the next TCH/F lchan occupy a dynamic timeslot that currently counts for free TCH/H timeslots? */ - next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_F, false); - if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN) - c->target.next_tchf_reduces_tchh = 2; - else - c->target.next_tchf_reduces_tchh = 0; + /* Would the next TCH/F lchan occupy a dynamic timeslot that currently counts for free TCH/H timeslots? + */ + next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_F, false); + if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN) + c->target.next_tchf_reduces_tchh = 2; + else + c->target.next_tchf_reduces_tchh = 0; - /* Would the next TCH/H lchan occupy a dynamic timeslot that currently counts for free TCH/F timeslots? - * Note that a dyn TS already in TCH/H mode (half occupied) would not reduce free TCH/F. */ - next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_H, false); - if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN - && next_lchan->ts->pchan_is != GSM_PCHAN_TCH_H) - c->target.next_tchh_reduces_tchf = 1; - else + /* Would the next TCH/H lchan occupy a dynamic timeslot that currently counts for free TCH/F timeslots? + * Note that a dyn TS already in TCH/H mode (half occupied) would not reduce free TCH/F. */ + next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_H, false); + if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN + && next_lchan->ts->pchan_is != GSM_PCHAN_TCH_H) + c->target.next_tchh_reduces_tchf = 1; + else + c->target.next_tchh_reduces_tchf = 0; + } else { + + c->target.free_tchf = 0; + c->target.min_free_tchf = 0; c->target.next_tchh_reduces_tchf = 0; + c->target.free_tchh = 0; + c->target.min_free_tchh = 0; + c->target.next_tchf_reduces_tchh = 0; + } } /* add candidate for re-assignment within the current cell */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26868 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/1-8-0 Gerrit-Change-Id: I5a3345ab0005a73597f5c27207480912a2f5aae6 Gerrit-Change-Number: 26868 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
2 3
0 0
Change in osmo-iuh[master]: iu_helpers: add function ranap_transp_layer_addr_decode2
by dexter 11 Jan '22

11 Jan '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26857 ) Change subject: iu_helpers: add function ranap_transp_layer_addr_decode2 ...................................................................... iu_helpers: add function ranap_transp_layer_addr_decode2 Add ranap_transp_layer_addr_decode2 as AF agnostic version of ranap_transp_layer_addr_decode. Change-Id: Ia60e0ab671fc4185815a880377ab88fcf1b30ac9 --- M include/osmocom/ranap/iu_helpers.h M src/iu_helpers.c M src/tests/test-helpers.c M src/tests/test-helpers.ok 4 files changed, 122 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/57/26857/1 diff --git a/include/osmocom/ranap/iu_helpers.h b/include/osmocom/ranap/iu_helpers.h index d824646..bf2a580 100644 --- a/include/osmocom/ranap/iu_helpers.h +++ b/include/osmocom/ranap/iu_helpers.h @@ -15,6 +15,8 @@ int ranap_transp_assoc_decode(uint16_t *port, const RANAP_IuTransportAssociation_t *transp_assoc); int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, const RANAP_TransportLayerAddress_t *trasp_layer_addr); +int ranap_transp_layer_addr_decode2(struct osmo_sockaddr *addr, bool *uses_x213_nsap, + const RANAP_TransportLayerAddress_t *trasp_layer_addr); RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(struct osmo_sockaddr *addr, bool use_x213_nsap); RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(struct osmo_sockaddr *addr, uint32_t tei, bool use_x213_nsap); diff --git a/src/iu_helpers.c b/src/iu_helpers.c index 62f5c22..3e73d87 100644 --- a/src/iu_helpers.c +++ b/src/iu_helpers.c @@ -126,6 +126,56 @@ return 0; } +/* (same as ranap_transp_layer_addr_decode, but AF agnostic) */ +int ranap_transp_layer_addr_decode2(struct osmo_sockaddr *addr, bool *uses_x213_nsap, + const RANAP_TransportLayerAddress_t * trasp_layer_addr) +{ + unsigned char *buf; + int len; + bool x213_nsap = false; + uint16_t icp; + + buf = trasp_layer_addr->buf; + len = trasp_layer_addr->size; + + memset(addr, 0, sizeof(*addr)); + + if (len == 20 && buf[0] == 0x35) { + /* For an X.213 NSAP encoded address we expect a buffer of ecactly 20 bytes (3 bytes IDP + 17 bytes + * DSP). we also expect AFI = 0x35, which means that two byte IDI and an IP address follows. (see also + * comments in function new_transp_layer_addr below) */ + x213_nsap = true; + icp = osmo_load16be(&buf[1]); + switch (icp) { + case 0x0000: + addr->u.sa.sa_family = AF_INET6; + memcpy(addr->u.sin6.sin6_addr.s6_addr, buf + 3, sizeof(addr->u.sin6.sin6_addr.s6_addr)); + break; + case 0x0001: + addr->u.sa.sa_family = AF_INET; + memcpy((uint8_t *) & addr->u.sin.sin_addr.s_addr, buf + 3, sizeof(addr->u.sin.sin_addr.s_addr)); + break; + default: + return -EINVAL; + } + } else if (len == 4) { + /* A non X.213 NSAP encoded IPv4 address is 4 bytes long */ + addr->u.sa.sa_family = AF_INET; + memcpy((uint8_t *) & addr->u.sin.sin_addr.s_addr, buf, sizeof(addr->u.sin.sin_addr.s_addr)); + } else if (len == 16) { + /* A non X.213 NSAP encoded IPv6 address is 16 bytes long */ + addr->u.sa.sa_family = AF_INET6; + memcpy(addr->u.sin6.sin6_addr.s6_addr, buf + 3, sizeof(addr->u.sin6.sin6_addr.s6_addr)); + } else + return -EINVAL; + + /* In case the caller is interested in the encoding method that was used */ + if (uses_x213_nsap) + *uses_x213_nsap = x213_nsap; + + return 0; +} + static int new_transp_layer_addr(BIT_STRING_t *out, struct osmo_sockaddr *addr, bool use_x213_nsap) { uint8_t *buf; diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 4ca7334..0715014 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -29,6 +29,7 @@ #include <osmocom/core/utils.h> #include <osmocom/core/socket.h> +#include <osmocom/core/sockaddr_str.h> #include <osmocom/gsm/gsm48.h> #include <osmocom/ranap/RANAP_LAI.h> @@ -347,6 +348,65 @@ OSMO_ASSERT(rc == 0); } +void test_ranap_transp_layer_addr_decode2(void) +{ + int rc; + struct osmo_sockaddr addr; + struct osmo_sockaddr_str sockaddr_str; + bool uses_x213_nsap; + RANAP_TransportLayerAddress_t trasp_layer_addr = { 0 }; + uint8_t encoded_ipv4_addr_x213_nsap[] = + { 0x35, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; + uint8_t encoded_ipv4_addr[] = { 0x01, 0x02, 0x03, 0x04 }; + uint8_t encoded_ipv6_addr_x213_nsap[] = + { 0x35, 0x00, 0x00, 0xf1, 0x1f, 0xf2, 0x2f, 0xf3, + 0x3f, 0xf4, 0x4f, 0xf5, 0x5f, 0xf6, 0x6f, 0xf7, + 0x7f, 0xf8, 0x8f, 0x00 }; + uint8_t encoded_ipv6_addr[] = + { 0xf1, 0x1f, 0xf2, 0x2f, 0xf3, 0x3f, 0xf4, 0x4f, + 0xf5, 0x5f, 0xf6, 0x6f, 0xf7, 0x7f, 0xf8, 0x8f }; + + printf("Testing function ranap_transp_layer_addr_decode2()\n"); + + printf(" ipv4, x213_nsap\n"); + trasp_layer_addr.buf = encoded_ipv4_addr_x213_nsap; + trasp_layer_addr.size = sizeof(encoded_ipv4_addr_x213_nsap); + rc = ranap_transp_layer_addr_decode2(&addr, &uses_x213_nsap, &trasp_layer_addr); + OSMO_ASSERT(rc == 0); + memset(&sockaddr_str, 0, sizeof(sockaddr_str)); + osmo_sockaddr_str_from_sockaddr_in(&sockaddr_str, &addr.u.sin); + printf(" addr=%s, af=%i, x213_nsap=%u\n", sockaddr_str.ip, sockaddr_str.af, uses_x213_nsap); + + printf(" ipv4\n"); + trasp_layer_addr.buf = encoded_ipv4_addr; + trasp_layer_addr.size = sizeof(encoded_ipv4_addr); + rc = ranap_transp_layer_addr_decode2(&addr, &uses_x213_nsap, &trasp_layer_addr); + OSMO_ASSERT(rc == 0); + memset(&sockaddr_str, 0, sizeof(sockaddr_str)); + osmo_sockaddr_str_from_sockaddr_in(&sockaddr_str, &addr.u.sin); + printf(" addr=%s, af=%i, x213_nsap=%u\n", sockaddr_str.ip, sockaddr_str.af, uses_x213_nsap); + + printf(" ipv6, x213_nsap\n"); + trasp_layer_addr.buf = encoded_ipv6_addr_x213_nsap; + trasp_layer_addr.size = sizeof(encoded_ipv6_addr_x213_nsap); + rc = ranap_transp_layer_addr_decode2(&addr, &uses_x213_nsap, &trasp_layer_addr); + OSMO_ASSERT(rc == 0); + memset(&sockaddr_str, 0, sizeof(sockaddr_str)); + osmo_sockaddr_str_from_sockaddr_in6(&sockaddr_str, &addr.u.sin6); + printf(" addr=%s, af=%i, x213_nsap=%u\n", sockaddr_str.ip, sockaddr_str.af, uses_x213_nsap); + + printf(" ipv6\n"); + trasp_layer_addr.buf = encoded_ipv6_addr; + trasp_layer_addr.size = sizeof(encoded_ipv6_addr); + rc = ranap_transp_layer_addr_decode2(&addr, &uses_x213_nsap, &trasp_layer_addr); + OSMO_ASSERT(rc == 0); + memset(&sockaddr_str, 0, sizeof(sockaddr_str)); + osmo_sockaddr_str_from_sockaddr_in6(&sockaddr_str, &addr.u.sin6); + printf(" addr=%s, af=%i, x213_nsap=%u\n", sockaddr_str.ip, sockaddr_str.af, uses_x213_nsap); +} + int main(int argc, char **argv) { asn1_xer_print = 0; @@ -360,6 +420,7 @@ test_ranap_new_transp_info_gtp(); test_ranap_new_transp_info_rtp(); test_ranap_transp_layer_addr_decode(); + test_ranap_transp_layer_addr_decode2(); test_common_cleanup(); return 0; diff --git a/src/tests/test-helpers.ok b/src/tests/test-helpers.ok index fe08287..1a6a132 100644 --- a/src/tests/test-helpers.ok +++ b/src/tests/test-helpers.ok @@ -56,3 +56,12 @@ addr=1.2.3.4 ipv4 addr=1.2.3.4 +Testing function ranap_transp_layer_addr_decode2() + ipv4, x213_nsap + addr=1.2.3.4, af=2, x213_nsap=1 + ipv4 + addr=1.2.3.4, af=2, x213_nsap=0 + ipv6, x213_nsap + addr=f11f:f22f:f33f:f44f:f55f:f66f:f77f:f88f, af=10, x213_nsap=1 + ipv6 + addr=2ff3:3ff4:4ff5:5ff6:6ff7:7ff8:8f35:1, af=10, x213_nsap=0 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26857 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Ia60e0ab671fc4185815a880377ab88fcf1b30ac9 Gerrit-Change-Number: 26857 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
3 9
0 0
Change in osmo-iuh[master]: add unittest for ranap_transp_layer_addr_decode()
by dexter 11 Jan '22

11 Jan '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26856 ) Change subject: add unittest for ranap_transp_layer_addr_decode() ...................................................................... add unittest for ranap_transp_layer_addr_decode() The function ranap_transp_layer_addr_decode() lacks a unit test. Lets add one. Change-Id: I6d7427dc07c858a8dd76c1fb536ec3df3d96f1b1 --- M src/tests/test-helpers.c M src/tests/test-helpers.ok 2 files changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/56/26856/1 diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index 96540dc..4ca7334 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -319,6 +319,34 @@ OSMO_ASSERT(tli == NULL); } +void test_ranap_transp_layer_addr_decode(void) +{ + int rc; + char addr[100]; + RANAP_TransportLayerAddress_t trasp_layer_addr = { 0 }; + uint8_t encoded_addr_x213_nsap[] = + { 0x35, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; + uint8_t encoded_addr[] = { 0x01, 0x02, 0x03, 0x04 }; + + printf("Testing function ranap_transp_layer_addr_decode()\n"); + + printf(" ipv4, x213_nsap\n"); + trasp_layer_addr.buf = encoded_addr_x213_nsap; + trasp_layer_addr.size = sizeof(encoded_addr_x213_nsap); + rc = ranap_transp_layer_addr_decode(addr, sizeof(addr), &trasp_layer_addr); + printf(" addr=%s\n", addr); + OSMO_ASSERT(rc == 0); + + printf(" ipv4\n"); + trasp_layer_addr.buf = encoded_addr; + trasp_layer_addr.size = sizeof(encoded_addr); + rc = ranap_transp_layer_addr_decode(addr, sizeof(addr), &trasp_layer_addr); + printf(" addr=%s\n", addr); + OSMO_ASSERT(rc == 0); +} + int main(int argc, char **argv) { asn1_xer_print = 0; @@ -331,6 +359,7 @@ test_ranap_common(); test_ranap_new_transp_info_gtp(); test_ranap_new_transp_info_rtp(); + test_ranap_transp_layer_addr_decode(); test_common_cleanup(); return 0; diff --git a/src/tests/test-helpers.ok b/src/tests/test-helpers.ok index 049fbb4..fe08287 100644 --- a/src/tests/test-helpers.ok +++ b/src/tests/test-helpers.ok @@ -51,3 +51,8 @@ transportLayerAddress = f11ff22ff33ff44ff55ff66ff77ff88f bindingID = 11220000 unsupported address family +Testing function ranap_transp_layer_addr_decode() + ipv4, x213_nsap + addr=1.2.3.4 + ipv4 + addr=1.2.3.4 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26856 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I6d7427dc07c858a8dd76c1fb536ec3df3d96f1b1 Gerrit-Change-Number: 26856 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
3 5
0 0
Change in osmo-iuh[master]: jenkins.sh: osmo-iuh no longer has doc/manuals/ make target
by pespin 11 Jan '22

11 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26866 ) Change subject: jenkins.sh: osmo-iuh no longer has doc/manuals/ make target ...................................................................... jenkins.sh: osmo-iuh no longer has doc/manuals/ make target the doc/manuals directory was dropped together with osmo-hnbgw binary when it was moved to a separate repository recently. Change-Id: Iceefc4e477ab516c5dc08e6c5b859c48d92a1b61 --- M contrib/jenkins.sh 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/66/26866/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a3a3d4a..9ee073d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -62,9 +62,5 @@ $MAKE $PARALLEL_MAKE distcheck \ || cat-testlogs.sh -if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then - make -C "$base/doc/manuals" publish -fi - $MAKE $PARALLEL_MAKE maintainer-clean osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26866 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Iceefc4e477ab516c5dc08e6c5b859c48d92a1b61 Gerrit-Change-Number: 26866 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
2 2
0 0
Change in simtrace2[master]: firmware: add definition for main osc bypass when using external osc
by James Tavares 11 Jan '22

11 Jan '22
James Tavares has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/26861 ) Change subject: firmware: add definition for main osc bypass when using external osc ...................................................................... firmware: add definition for main osc bypass when using external osc Add new board.h definition BOARD_MAINOSC_BYPASS to configure the clock module to use an external oscillator rather than a crystal. The qmod board is one such board. Change-Id: If62f55cd4c8b0cf758534f09d25a9bcb028814a7 --- M firmware/libboard/common/source/board_lowlevel.c M firmware/libboard/qmod/include/board.h 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/61/26861/1 diff --git a/firmware/libboard/common/source/board_lowlevel.c b/firmware/libboard/common/source/board_lowlevel.c index 1ddbcba..a04ce10 100644 --- a/firmware/libboard/common/source/board_lowlevel.c +++ b/firmware/libboard/common/source/board_lowlevel.c @@ -147,7 +147,7 @@ } */ -#ifndef qmod +#ifndef BOARD_MAINOSC_BYPASS /* Initialize main oscillator */ if ( !(PMC->CKGR_MOR & CKGR_MOR_MOSCSEL) ) { @@ -165,11 +165,11 @@ timeout = 0; while (!(PMC->PMC_SR & PMC_SR_MOSCSELS) && (timeout++ < CLOCK_TIMEOUT)); #else - /* QMOD has external 12MHz clock source */ + /* Board has external clock, not a crystal oscillator */ PIOB->PIO_PDR = (1 << 9); PIOB->PIO_PUDR = (1 << 9); PIOB->PIO_PPDDR = (1 << 9); - PMC->CKGR_MOR = CKGR_MOR_KEY(0x37) | CKGR_MOR_MOSCRCEN | CKGR_MOR_MOSCXTBY| CKGR_MOR_MOSCSEL; + PMC->CKGR_MOR = CKGR_MOR_KEY(0x37) | CKGR_MOR_MOSCRCEN | CKGR_MOR_MOSCXTBY | CKGR_MOR_MOSCSEL; #endif /* disable the red LED after main clock initialization */ diff --git a/firmware/libboard/qmod/include/board.h b/firmware/libboard/qmod/include/board.h index 6d7d4ff..7ea5bd7 100644 --- a/firmware/libboard/qmod/include/board.h +++ b/firmware/libboard/qmod/include/board.h @@ -25,6 +25,8 @@ #define BOARD_MAINOSC 12000000 /** desired main clock frequency (in Hz, based on BOARD_MAINOSC) */ #define BOARD_MCK 58000000 // 18.432 * 29 / 6 +/** board has external clock, not crystal */ +#define BOARD_MAINOSC_BYPASS /** MCU pin connected to red LED */ #define PIO_LED_RED PIO_PA17 @@ -35,7 +37,7 @@ /** green LED pin definition */ #define PIN_LED_GREEN {PIO_LED_GREEN, PIOA, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT} /** LEDs pin definition */ -#define PINS_LEDS PIN_LED_RED, PIN_LED_GREEN +#define PINS_LEDS PIN_LED_RED, PIN_LED_GREEN /** index for red LED in LEDs pin definition array */ #define LED_NUM_RED 0 /** index for green LED in LEDs pin definition array */ -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: If62f55cd4c8b0cf758534f09d25a9bcb028814a7 Gerrit-Change-Number: 26861 Gerrit-PatchSet: 1 Gerrit-Owner: James Tavares <jtavares(a)kvh.com> Gerrit-MessageType: newchange
2 2
0 0
Change in simtrace2[master]: simtrace2-tool: add "modem sim-card (insert|remove)" command
by James Tavares 11 Jan '22

11 Jan '22
James Tavares has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/26863 ) Change subject: simtrace2-tool: add "modem sim-card (insert|remove)" command ...................................................................... simtrace2-tool: add "modem sim-card (insert|remove)" command Add a new command to request that the simtrace2 firmware manipulate the card detect signal, causing the downstream cellular modem to believe that the SIM card has been inserted or removed, respectfully. Change-Id: I8c79eb29379a789d9d0d21495e30d66ddbdfb022 --- M host/src/simtrace2-tool.c 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/63/26863/1 diff --git a/host/src/simtrace2-tool.c b/host/src/simtrace2-tool.c index d92638f..eb61ee2 100644 --- a/host/src/simtrace2-tool.c +++ b/host/src/simtrace2-tool.c @@ -65,6 +65,7 @@ printf( "Commands:\n" "\tmodem reset (enable|disable|cycle)\n" "\tmodem sim-switch (local|remote)\n" + "\tmodem sim-card (insert|remove)\n" "\n"); } @@ -167,6 +168,29 @@ return 0; } +/* emulate SIM card insertion / removal from modem */ +static int do_modem_sim_card(int argc, char **argv) +{ + char *command; + if (argc < 1) + return -EINVAL; + command = argv[0]; + argc--; + argv++; + + if (!strcmp(command, "insert")) { + printf("Setting SIM=INSERTED; Modem reset recommended\n"); + return osmo_st2_cardem_request_card_insert(ci, 1); + } else if (!strcmp(command, "remove")) { + printf("Setting SIM=REMOVED; Modem reset recommended\n"); + return osmo_st2_cardem_request_card_insert(ci, 0); + } else { + fprintf(stderr, "Unsupported modem sim-card command: '%s'\n", command); + return -EINVAL; + } + return 0; +} + static int do_subsys_modem(int argc, char **argv) { char *command; @@ -182,6 +206,8 @@ rc = do_modem_reset(argc, argv); } else if (!strcmp(command, "sim-switch")) { rc = do_modem_sim_switch(argc, argv); + } else if (!strcmp(command, "sim-card")) { + rc = do_modem_sim_card(argc, argv); } else { fprintf(stderr, "Unsupported command for subsystem modem: '%s'\n", command); return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I8c79eb29379a789d9d0d21495e30d66ddbdfb022 Gerrit-Change-Number: 26863 Gerrit-PatchSet: 1 Gerrit-Owner: James Tavares <jtavares(a)kvh.com> Gerrit-MessageType: newchange
2 3
0 0
Change in osmo-iuh[master]: iu_helpers: check length before accessing buf
by dexter 11 Jan '22

11 Jan '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26855 ) Change subject: iu_helpers: check length before accessing buf ...................................................................... iu_helpers: check length before accessing buf in ranap_transp_layer_addr_decode() we access the buffer buf before checking the length field. This can lead to a segfault when the buffer has a length of 0. Change-Id: I983f6e5e4cee47b3f5719829e1310b8e2e33ffaf --- M src/iu_helpers.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/55/26855/1 diff --git a/src/iu_helpers.c b/src/iu_helpers.c index 392622f..62f5c22 100644 --- a/src/iu_helpers.c +++ b/src/iu_helpers.c @@ -113,7 +113,7 @@ buf = trasp_layer_addr->buf; len = trasp_layer_addr->size; - if (buf[0] == 0x35 && len >= 7) + if (len >= 7 && buf[0] == 0x35) rc = inet_ntop(AF_INET, buf + 3, addr, addr_len); else if (len > 3) rc = inet_ntop(AF_INET, buf, addr, addr_len); -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26855 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I983f6e5e4cee47b3f5719829e1310b8e2e33ffaf Gerrit-Change-Number: 26855 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
3 3
0 0
Change in osmo-e1-hardware[master]: icE1usb fw: add port number argument to e1_tick_read()
by tnt 10 Jan '22

10 Jan '22
tnt has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21732 ) Change subject: icE1usb fw: add port number argument to e1_tick_read() ...................................................................... Abandoned Superseeded -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21732 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I0f4548b5623a7eaf74af3076c301e029bb3933da Gerrit-Change-Number: 21732 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-MessageType: abandon
1 0
0 0
Change in osmo-msc[master]: ran_msg_iu.c: Set proper codec in Assignment Complete
by pespin 10 Jan '22

10 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/26806 ) Change subject: ran_msg_iu.c: Set proper codec in Assignment Complete ...................................................................... ran_msg_iu.c: Set proper codec in Assignment Complete We need to set the codec as present in order for msc_a_up_call_assignment_complete() to configure properly the CN-side of he leg with the IUFP codec, which should be the desired default in order to avoid transcoding. Change-Id: Ib8086462239e2df748cf47ea7b37a07f1f3b85a8 --- M src/libmsc/ran_msg_iu.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/26806/1 diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c index c10df4d..ee1d0a5 100644 --- a/src/libmsc/ran_msg_iu.c +++ b/src/libmsc/ran_msg_iu.c @@ -153,7 +153,8 @@ .msg_type = RAN_MSG_ASSIGNMENT_COMPLETE, .msg_name = "RANAP RAB Assignment Response", .assignment_complete = { - .codec = CODEC_AMR_8000_1, + .codec_present = true, + .codec = CODEC_IUFP, }, }; if (osmo_sockaddr_str_from_str(&ran_dec_msg->assignment_complete.remote_rtp, addr, port)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/26806 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ib8086462239e2df748cf47ea7b37a07f1f3b85a8 Gerrit-Change-Number: 26806 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
3 3
0 0
Change in osmo-e1-hardware[master]: icE1usb fw: Don't expose some E1 helper functions globally
by tnt 10 Jan '22

10 Jan '22
tnt has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/26831 ) Change subject: icE1usb fw: Don't expose some E1 helper functions globally ...................................................................... icE1usb fw: Don't expose some E1 helper functions globally Not used anywhere and really shouldn't be Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com> Change-Id: I1e339d1b8faecffba5f8d73588b376edc7a75a96 --- M firmware/ice40-riscv/icE1usb/e1.c M firmware/ice40-riscv/icE1usb/e1.h 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/31/26831/1 diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c index f5e367e..59be063 100644 --- a/firmware/ice40-riscv/icE1usb/e1.c +++ b/firmware/ice40-riscv/icE1usb/e1.c @@ -21,13 +21,13 @@ static volatile struct e1_core * const e1_regs = (void *)(E1_CORE_BASE); static volatile uint8_t * const e1_data = (void *)(E1_DATA_BASE); -unsigned int +static unsigned int e1_data_ofs(int mf, int frame, int ts) { return (mf << 9) | (frame << 5) | ts; } -volatile uint8_t * +static volatile uint8_t * e1_data_ptr(int mf, int frame, int ts) { return &e1_data[e1_data_ofs(mf, frame, ts)]; diff --git a/firmware/ice40-riscv/icE1usb/e1.h b/firmware/ice40-riscv/icE1usb/e1.h index 4394638..4cbb6e5 100644 --- a/firmware/ice40-riscv/icE1usb/e1.h +++ b/firmware/ice40-riscv/icE1usb/e1.h @@ -28,9 +28,6 @@ const struct e1_error_count *e1_get_error_count(void); -volatile uint8_t *e1_data_ptr(int mf, int frame, int ts); -unsigned int e1_data_ofs(int mf, int frame, int ts); - enum e1_platform_led { E1P_LED_GREEN = 0, E1P_LED_YELLOW = 1, -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/26831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I1e339d1b8faecffba5f8d73588b376edc7a75a96 Gerrit-Change-Number: 26831 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt(a)246tNt.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
2 2
0 0
  • ← Newer
  • 1
  • ...
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • ...
  • 79
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.