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

July 2023

  • 1 participants
  • 3051 discussions
[S] Change in osmo-bts[master]: Add ASCI (advanced speech call items) log sub-system
by laforge 10 Jul '23

10 Jul '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33288 ) Change subject: Add ASCI (advanced speech call items) log sub-system ...................................................................... Add ASCI (advanced speech call items) log sub-system As we subsequently add ASCI related features to the code, it makes sense to have a specific log sub-system for it. Change-Id: I8ea3e61df35175bd74110b2f41994c99da3e2858 Related: OS#4851 --- M include/osmo-bts/logging.h M src/common/logging.c 2 files changed, 21 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/logging.h b/include/osmo-bts/logging.h index cf46352..ce08e47 100644 --- a/include/osmo-bts/logging.h +++ b/include/osmo-bts/logging.h @@ -21,6 +21,7 @@ DABIS, DRTP, DOSMUX, + DASCI, }; extern const struct log_info bts_log_info; diff --git a/src/common/logging.c b/src/common/logging.c index 9335d93..cee4ff6 100644 --- a/src/common/logging.c +++ b/src/common/logging.c @@ -125,6 +125,13 @@ .loglevel = LOGL_NOTICE, .enabled = 1, }, + [DASCI] = { + .name = "DASCI", + .description = "ASCI (Advanced Speech Call Items: VGCS/VBS)", + .loglevel = LOGL_NOTICE, + .enabled = 1, + }, + }; static int osmo_bts_filter_fn(const struct log_context *ctx, struct log_target *tgt) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8ea3e61df35175bd74110b2f41994c99da3e2858 Gerrit-Change-Number: 33288 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: Store "Channel rate and type" from RSL Channel Mode IE in BTS
by laforge 10 Jul '23

10 Jul '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33291 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Store "Channel rate and type" from RSL Channel Mode IE in BTS ...................................................................... Store "Channel rate and type" from RSL Channel Mode IE in BTS The RSL "Channel rate and type" field from the RSL Channel Mode IE in RSL_CHAN_ACTIV and RSL_MODE_MODIFY_REQ messages is the only place where the BSC differentiates between a normal TCH and the special TCH modes used in VGCS or VBS. Let's copy this field from the RSL message into the lchan state, so that BTS models can actually (in subsequent patches) reflect it when activating the L1. Change-Id: I6d531bf528bcb81f44d91336471a46ef790d7646 Related: OS#4851 --- M include/osmo-bts/lchan.h M src/common/rsl.c 2 files changed, 24 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h index d17bf96..80ebb0c 100644 --- a/include/osmo-bts/lchan.h +++ b/include/osmo-bts/lchan.h @@ -141,6 +141,8 @@ uint8_t nr; /* The logical channel type */ enum gsm_chan_t type; + /* RSL channel rate and type */ + enum rsl_cmod_crt rsl_chan_rt; /* RSL channel mode */ enum rsl_cmod_spd rsl_cmode; /* If TCH, traffic channel mode */ diff --git a/src/common/rsl.c b/src/common/rsl.c index df16149..b71310a 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -113,6 +113,7 @@ cm = (const struct rsl_ie_chan_mode *) TLVP_VAL(tp, RSL_IE_CHAN_MODE); lchan->rsl_cmode = cm->spd_ind; + lchan->rsl_chan_rt = cm->chan_rt; lchan->ts->trx->bts->dtxd = (cm->dtx_dtu & RSL_CMOD_DTXd) ? true : false; /* Octet 5: Channel rate and type */ @@ -120,6 +121,10 @@ case RSL_CMOD_CRT_SDCCH: case RSL_CMOD_CRT_TCH_Bm: case RSL_CMOD_CRT_TCH_Lm: + case RSL_CMOD_CRT_TCH_GROUP_Bm: + case RSL_CMOD_CRT_TCH_GROUP_Lm: + case RSL_CMOD_CRT_TCH_BCAST_Bm: + case RSL_CMOD_CRT_TCH_BCAST_Lm: break; case RSL_CMOD_CRT_OSMO_TCH_VAMOS_Bm: case RSL_CMOD_CRT_OSMO_TCH_VAMOS_Lm: -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6d531bf528bcb81f44d91336471a46ef790d7646 Gerrit-Change-Number: 33291 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-bts[master]: ASCI: NCH / NOTIFICATION support
by laforge 10 Jul '23

10 Jul '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33289 ) Change subject: ASCI: NCH / NOTIFICATION support ...................................................................... ASCI: NCH / NOTIFICATION support This adds very minimalistic support for notification of VBS/VGCS calls. Minimalistic in that we * only notify via PCH (not via NCH or FACCH) * only include notification in otherwise empty PAGING TYPE 1 This means that notification will cease to work once the PCH becomes too loaded and we never would send otherwise empty PAGING TYPE 1 anymore. Change-Id: I6f6f72d9a0123cb519b341d72a124aaa2117370e Requires: libosmocore.git I9586b5cb8514010d9358fcfc97c3d34741294522 Related: OS#5781 --- M include/osmo-bts/Makefile.am M include/osmo-bts/bts.h A include/osmo-bts/notification.h M src/common/Makefile.am M src/common/bts.c M src/common/nm_bts_fsm.c A src/common/notification.c M src/common/paging.c M src/common/rsl.c 9 files changed, 319 insertions(+), 10 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index 0e45d70..1a07287 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -32,5 +32,6 @@ dtx_dl_amr_fsm.h \ ta_control.h \ nm_common_fsm.h \ + notification.h \ osmux.h \ $(NULL) diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index 296aa0d..9290089 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -290,6 +290,11 @@ bool pni; /* Primary Notification Identifier */ } etws; + /* Advanced Speech Call Items (VBS/VGCS) + NCH related bits */ + struct { + struct llist_head notifications; + } asci; + struct paging_state *paging_state; struct llist_head bsc_oml_hosts; unsigned int rtp_jitter_buf_ms; diff --git a/include/osmo-bts/notification.h b/include/osmo-bts/notification.h new file mode 100644 index 0000000..3d05acc --- /dev/null +++ b/include/osmo-bts/notification.h @@ -0,0 +1,57 @@ +/* Maintain and generate ASCI notifications */ + +/* + * (C) 2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * Author: Harald Welte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* one [concurrent] ASCI (VBS/VGCS) notification */ +struct asci_notification { + struct llist_head list; /* linked to bts->asci.notifications */ + + /* Group call reference (TS 24.008 10.5.1.9 "Descriptive group or broadcast call reference") */ + uint8_t group_call_ref[5]; + + /* Group Channel Description (TS 44.018 10.5.2.14b) */ + struct { + bool present; + uint8_t value[255]; + uint8_t len; + } chan_desc; + + /* NCH DRX Information (TS 48.058 9.3.47) */ + struct { + bool present; + struct rsl_ie_nch_drx_info value; + } nch_drx_info; +}; + +int bts_asci_notification_add(struct gsm_bts *bts, const uint8_t *group_call_ref, const uint8_t *chan_desc, + uint8_t chan_desc_len, const struct rsl_ie_nch_drx_info *nch_drx_info); + +int bts_asci_notification_del(struct gsm_bts *bts, const uint8_t *group_call_ref); + +int bts_asci_notification_reset(struct gsm_bts *bts); + +const struct asci_notification *bts_asci_notification_get_next(struct gsm_bts *bts); + +void append_group_call_information(struct bitvec *bv, const uint8_t *gcr, const uint8_t *ch_desc, uint8_t ch_desc_len); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 32f644c..270139c 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -67,6 +67,7 @@ nm_gprs_nse_fsm.c \ nm_gprs_nsvc_fsm.c \ nm_radio_carrier_fsm.c \ + notification.c \ probes.d \ $(NULL) diff --git a/src/common/bts.c b/src/common/bts.c index 802cb00..28f7567 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -400,6 +400,8 @@ bts->smscb_queue_tgt_len = 2; bts->smscb_queue_hyst = 2; + INIT_LLIST_HEAD(&bts->asci.notifications); + INIT_LLIST_HEAD(&bts->bsc_oml_hosts); /* register DTX DL FSM */ diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c index f929354..86d9307 100644 --- a/src/common/nm_bts_fsm.c +++ b/src/common/nm_bts_fsm.c @@ -36,6 +36,7 @@ #include <osmo-bts/nm_common_fsm.h> #include <osmo-bts/phy_link.h> #include <osmo-bts/cbch.h> +#include <osmo-bts/notification.h> #define X(s) (1 << (s)) @@ -64,6 +65,7 @@ bts->bsic = 0xff; /* invalid value */ TALLOC_FREE(bts->mo.nm_attr); bts_cbch_reset(bts); + bts_asci_notification_reset(bts); if (bts->c0_power_red_db > 0) bts_set_c0_pwr_red(bts, 0); diff --git a/src/common/notification.c b/src/common/notification.c new file mode 100644 index 0000000..1fda519 --- /dev/null +++ b/src/common/notification.c @@ -0,0 +1,155 @@ +/* Maintain and generate ASCI notifications */ + +/* + * (C) 2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * Author: Harald Welte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <errno.h> + +#include <osmocom/core/bitvec.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/gsm/protocol/gsm_08_58.h> + +#include <osmo-bts/bts.h> +#include <osmo-bts/logging.h> +#include <osmo-bts/notification.h> + +static struct asci_notification *bts_asci_notification_find(struct gsm_bts *bts, const uint8_t *group_call_ref) +{ + struct asci_notification *n; + llist_for_each_entry(n, &bts->asci.notifications, list) { + if (!memcmp(n->group_call_ref, group_call_ref, sizeof(n->group_call_ref))) + return n; + } + return NULL; +} + +int bts_asci_notification_add(struct gsm_bts *bts, const uint8_t *group_call_ref, const uint8_t *chan_desc, + uint8_t chan_desc_len, const struct rsl_ie_nch_drx_info *nch_drx_info) +{ + struct asci_notification *n; + + if (bts_asci_notification_find(bts, group_call_ref)) + return -EEXIST; + + n = talloc_zero(bts, struct asci_notification); + if (!n) + return -ENOMEM; + + memcpy(n->group_call_ref, group_call_ref, sizeof(n->group_call_ref)); + if (chan_desc && chan_desc_len) { + n->chan_desc.present = true; + n->chan_desc.len = chan_desc_len; + memcpy(&n->chan_desc.value, chan_desc, chan_desc_len); + } + if (nch_drx_info) { + n->nch_drx_info.present = true; + n->nch_drx_info.value = *nch_drx_info; + } + + LOGP(DASCI, LOGL_INFO, "Added ASCI Notification for group call reference %s\n", + osmo_hexdump_nospc(n->group_call_ref, ARRAY_SIZE(n->group_call_ref))); + + /* add at beginning of "queue" to make sure a new call is notified first */ + llist_add(&n->list, &bts->asci.notifications); + + return 0; +} + +int bts_asci_notification_del(struct gsm_bts *bts, const uint8_t *group_call_ref) +{ + struct asci_notification *n = bts_asci_notification_find(bts, group_call_ref); + if (!n) + return -ENODEV; + + LOGP(DASCI, LOGL_INFO, "Deleting ASCI Notification for group call reference %s\n", + osmo_hexdump_nospc(n->group_call_ref, ARRAY_SIZE(n->group_call_ref))); + + llist_del(&n->list); + talloc_free(n); + + return 0; +} + +int bts_asci_notification_reset(struct gsm_bts *bts) +{ + struct asci_notification *n, *n2; + + LOGP(DASCI, LOGL_INFO, "Deleting all %u ASCI Notifications of BTS\n", + llist_count(&bts->asci.notifications)); + + llist_for_each_entry_safe(n, n2, &bts->asci.notifications, list) { + llist_del(&n->list); + talloc_free(n); + } + return 0; +} + +const struct asci_notification *bts_asci_notification_get_next(struct gsm_bts *bts) +{ + struct asci_notification *n; + + n = llist_first_entry_or_null(&bts->asci.notifications, struct asci_notification, list); + if (!n) + return NULL; + + /* move to end of list to iterate over them */ + llist_del(&n->list); + llist_add_tail(&n->list, &bts->asci.notifications); + + return n; +} + + +/*! append a "Group Call Information" CSN.1 structure to the caller-provided bit-vector. + * \param[out] bv caller-provided output bit-vector + * \param[in] gcr 5-byte group call reference + * \param[in] ch_desc optional group channel description (may be NULL) + * \param[in] ch_desc_len length of group channel description (in bytes) */ +void append_group_call_information(struct bitvec *bv, const uint8_t *gcr, const uint8_t *ch_desc, uint8_t ch_desc_len) +{ + /* spec reference: TS 44.018 Section 9.1.21a */ + + /* <Group Call Reference : bit(36)> */ + struct bitvec *gcr_bv = bitvec_alloc(5*8, NULL); + OSMO_ASSERT(gcr_bv); + bitvec_unpack(gcr_bv, gcr); + for (unsigned int i = 0; i < 36; i++) + bitvec_set_bit(bv, bitvec_get_bit_pos(gcr_bv, i)); + + /* Group Channel Description */ + if (ch_desc && ch_desc_len) { + struct bitvec *chd_bv = bitvec_alloc(ch_desc_len*8, NULL); + OSMO_ASSERT(chd_bv); + bitvec_unpack(chd_bv, ch_desc); + bitvec_set_bit(bv, 1); + /* <Channel Description : bit(24)> */ + for (unsigned int i = 0; i < ch_desc_len * 8; i++) + bitvec_set_bit(bv, bitvec_get_bit_pos(chd_bv, i)); + bitvec_free(chd_bv); + /* FIXME: hopping */ + bitvec_set_bit(bv, 0); + } else { + bitvec_set_bit(bv, 0); + } + + bitvec_free(gcr_bv); +} diff --git a/src/common/paging.c b/src/common/paging.c index b3d5d8b..b1aad7c 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -43,6 +43,7 @@ #include <osmo-bts/paging.h> #include <osmo-bts/signal.h> #include <osmo-bts/pcu_if.h> +#include <osmo-bts/notification.h> #define MAX_PAGING_BLOCKS_CCCH 9 #define MAX_BS_PA_MFRMS 9 @@ -366,7 +367,8 @@ } /* 3GPP TS 44.018 10.5.2.23 append P1 Rest Octets to given bit-vector */ -static void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro) +static void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro, + const struct asci_notification *notif) { /* Paging 1 RO (at least 10 bits before ETWS struct) */ if (p1ro->nln_pch.present) { @@ -378,7 +380,14 @@ } bitvec_set_bit(bv, L); /* no Priority1 */ bitvec_set_bit(bv, L); /* no Priority2 */ - bitvec_set_bit(bv, L); /* no Group Call Info */ + if (notif) { + bitvec_set_bit(bv, H); /* Group Call Info */ + append_group_call_information(bv, notif->group_call_ref, + notif->chan_desc.present ? notif->chan_desc.value : NULL, + notif->chan_desc.len); + } else { + bitvec_set_bit(bv, L); /* no Group Call Info */ + } if (p1ro->packet_page_ind[0]) bitvec_set_bit(bv, H); /* Packet Page Indication 1 */ else @@ -405,7 +414,8 @@ static int fill_paging_type_1(uint8_t *out_buf, const uint8_t *identity1_lv, uint8_t chan1, const uint8_t *identity2_lv, - uint8_t chan2, const struct p1_rest_octets *p1ro) + uint8_t chan2, const struct p1_rest_octets *p1ro, + const struct asci_notification *notif) { struct gsm48_paging1 *pt1 = (struct gsm48_paging1 *) out_buf; unsigned int ro_len; @@ -436,7 +446,7 @@ .data = cur, }; - append_p1_rest_octets(&bv, p1ro); + append_p1_rest_octets(&bv, p1ro, notif); } return GSM_MACBLOCK_LEN; @@ -582,6 +592,7 @@ int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt, int *is_empty) { + const struct asci_notification *notif; struct llist_head *group_q; struct gsm_bts *bts = ps->bts; int group; @@ -607,12 +618,16 @@ if (ps->bts->etws.prim_notif) { struct p1_rest_octets p1ro; build_p1_rest_octets(&p1ro, bts); - len = fill_paging_type_1(out_buf, empty_id_lv, 0, NULL, 0, &p1ro); + /* we intentioanally don't try to add notifications here, as ETWS is more critical */ + len = fill_paging_type_1(out_buf, empty_id_lv, 0, NULL, 0, &p1ro, NULL); } else if (llist_empty(group_q)) { /* There is nobody to be paged, send Type1 with two empty ID */ //DEBUGP(DPAG, "Tx PAGING TYPE 1 (empty)\n"); - len = fill_paging_type_1(out_buf, empty_id_lv, 0, - NULL, 0, NULL); + /* for now, we only send VGCS/VBS notfication if we have nothing else to page; + * this is the safe choice. For other situations with mobile identities in the + * paging type 1, we'd need to check if there's sufficient space in the rest octets. */ + notif = bts_asci_notification_get_next(bts); + len = fill_paging_type_1(out_buf, empty_id_lv, 0, NULL, 0, NULL, notif); *is_empty = 1; } else { struct paging_record *pr[4]; @@ -688,19 +703,21 @@ } } else if (num_pr == 1) { DEBUGP(DPAG, "Tx PAGING TYPE 1 (1 xMSI,1 empty)\n"); + /* TODO: check if we can include an ASCI notification */ len = fill_paging_type_1(out_buf, pr[0]->u.normal.identity_lv, pr[0]->u.normal.chan_needed, - NULL, 0, NULL); + NULL, 0, NULL, NULL); } else { /* 2 (any type) or * 3 or 4, of which only 2 will be sent */ DEBUGP(DPAG, "Tx PAGING TYPE 1 (2 xMSI)\n"); + /* TODO: check if we can include an ASCI notification */ len = fill_paging_type_1(out_buf, pr[0]->u.normal.identity_lv, pr[0]->u.normal.chan_needed, pr[1]->u.normal.identity_lv, - pr[1]->u.normal.chan_needed, NULL); + pr[1]->u.normal.chan_needed, NULL, NULL); if (num_pr >= 3) { /* re-add #4 for next time */ llist_add(&pr[2]->list, group_q); diff --git a/src/common/rsl.c b/src/common/rsl.c index d652787..7bd950f 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -56,6 +56,7 @@ #include <osmo-bts/l1sap.h> #include <osmo-bts/bts_model.h> #include <osmo-bts/pcuif_proto.h> +#include <osmo-bts/notification.h> //#define FAKE_CIPH_MODE_COMPL @@ -775,6 +776,52 @@ return 0; } +/* 8.5.10 NOTIFICATION COMMAND */ +static int rsl_rx_notification_cmd(struct gsm_bts_trx *trx, struct msgb *msg) +{ + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); + struct tlv_parsed tp; + uint8_t command_indicator; + int rc; + + if (rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)) < 0) { + LOGPTRX(trx, DRSL, LOGL_ERROR, "%s(): rsl_tlv_parse() failed\n", __func__); + return rsl_tx_error_report(trx, RSL_ERR_PROTO, &cch->chan_nr, NULL, msg); + } + + if (cch->chan_nr != RSL_CHAN_PCH_AGCH) { + LOGPTRX(trx, DRSL, LOGL_ERROR, "%s(): chan nr is not Downlink CCCH\n", __func__); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); + } + + if (!TLVP_PRES_LEN(&tp, RSL_IE_CMD_INDICATOR, 1)) + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); + command_indicator = *TLVP_VAL(&tp, RSL_IE_CMD_INDICATOR); + + switch (command_indicator) { + case RSL_CMD_INDICATOR_START: + /* we need at least a Group Call Reference to start notification */ + if (!TLVP_PRES_LEN(&tp, RSL_IE_GROUP_CALL_REF, 5)) + return rsl_tx_error_report(trx, RSL_ERR_OPT_IE_ERROR, &cch->chan_nr, NULL, msg); + rc = bts_asci_notification_add(trx->bts, TLVP_VAL(&tp, RSL_IE_GROUP_CALL_REF), + TLVP_VAL(&tp, RSL_IE_CHAN_DESC), TLVP_LEN(&tp, RSL_IE_CHAN_DESC), + (struct rsl_ie_nch_drx_info *) TLVP_VAL(&tp, RSL_IE_NCH_DRX_INFO)); + break; + case RSL_CMD_INDICATOR_STOP: + if (!TLVP_PRES_LEN(&tp, RSL_IE_GROUP_CALL_REF, 5)) { + /* interpret this as stopping of all notification */ + rc = bts_asci_notification_reset(trx->bts); + } else { + rc = bts_asci_notification_del(trx->bts, TLVP_VAL(&tp, RSL_IE_GROUP_CALL_REF)); + } + break; + default: + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); + } + + return rc; +} + /* OSMO_ETWS_CMD - proprietary extension as TS 48.058 has no standardized way to do this :( */ static int rsl_rx_osmo_etws_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { @@ -3680,8 +3727,10 @@ case RSL_MT_SMS_BC_CMD: ret = rsl_rx_sms_bcast_cmd(trx, msg); break; - case RSL_MT_SMS_BC_REQ: case RSL_MT_NOT_CMD: + ret = rsl_rx_notification_cmd(trx, msg); + break; + case RSL_MT_SMS_BC_REQ: LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", rsl_msg_name(cch->c.msg_type)); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6f6f72d9a0123cb519b341d72a124aaa2117370e Gerrit-Change-Number: 33289 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: Change return value of bts_supports_cm() from int to bool
by laforge 10 Jul '23

10 Jul '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33622 ) Change subject: Change return value of bts_supports_cm() from int to bool ...................................................................... Change return value of bts_supports_cm() from int to bool Change-Id: I72e30fe852ab69a162b117a534071ebddd4b16ba --- M include/osmo-bts/bts.h M src/common/bts.c M src/common/rsl.c M tests/misc/misc_test.c 4 files changed, 32 insertions(+), 23 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index 9290089..a21a5df 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -419,8 +419,8 @@ int bts_main(int argc, char **argv); -int bts_supports_cm(const struct gsm_bts *bts, - const struct rsl_ie_chan_mode *cm); +bool bts_supports_cm(const struct gsm_bts *bts, + const struct rsl_ie_chan_mode *cm); int32_t bts_get_avg_fn_advance(const struct gsm_bts *bts); diff --git a/src/common/bts.c b/src/common/bts.c index 6652ce6..0ca4b6d 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -779,8 +779,8 @@ return &bts->gsm_time; } -int bts_supports_cm(const struct gsm_bts *bts, - const struct rsl_ie_chan_mode *cm) +bool bts_supports_cm(const struct gsm_bts *bts, + const struct rsl_ie_chan_mode *cm) { enum osmo_bts_features feature = _NUM_BTS_FEAT; @@ -788,22 +788,22 @@ case RSL_CMOD_SPD_SIGN: /* We assume that signalling support is mandatory, * there is no BTS_FEAT_* definition to check that. */ - return 1; + return true; case RSL_CMOD_SPD_SPEECH: break; case RSL_CMOD_CRT_TCH_GROUP_Bm: case RSL_CMOD_CRT_TCH_GROUP_Lm: if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VGCS)) - return 0; + return false; break; case RSL_CMOD_CRT_TCH_BCAST_Bm: case RSL_CMOD_CRT_TCH_BCAST_Lm: if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VBS)) - return 0; + return false; break; case RSL_CMOD_SPD_DATA: default: - return 0; + return false; } /* Before the requested pchan/cm combination can be checked, we need to @@ -811,7 +811,7 @@ switch (cm->chan_rt) { case RSL_CMOD_CRT_OSMO_TCH_VAMOS_Bm: if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VAMOS)) - return 0; + return false; /* fall-through */ case RSL_CMOD_CRT_TCH_Bm: case RSL_CMOD_CRT_TCH_GROUP_Bm: @@ -828,13 +828,13 @@ break; default: /* Invalid speech codec type => Not supported! */ - return 0; + return false; } break; case RSL_CMOD_CRT_OSMO_TCH_VAMOS_Lm: if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VAMOS)) - return 0; + return false; /* fall-through */ case RSL_CMOD_CRT_TCH_Lm: case RSL_CMOD_CRT_TCH_GROUP_Lm: @@ -848,7 +848,7 @@ break; default: /* Invalid speech codec type => Not supported! */ - return 0; + return false; } break; @@ -856,14 +856,14 @@ LOGP(DRSL, LOGL_ERROR, "Unhandled RSL channel type=0x%02x/rate=0x%02x\n", cm->chan_rt, cm->chan_rate); - return 0; + return false; } /* Check if the feature is supported by this BTS */ if (osmo_bts_has_feature(bts->features, feature)) - return 1; + return true; - return 0; + return false; } /* return the gsm_lchan for the CBCH (if it exists at all) */ diff --git a/src/common/rsl.c b/src/common/rsl.c index 7bd950f..df16149 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -248,7 +248,7 @@ #undef RSL_CMODE - if (bts_supports_cm(lchan->ts->trx->bts, cm) != 1) { + if (!bts_supports_cm(lchan->ts->trx->bts, cm)) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Channel type=0x%02x/mode=%s " "is not supported by the PHY\n", cm->chan_rt, gsm48_chan_mode_name(lchan->tch_mode)); diff --git a/tests/misc/misc_test.c b/tests/misc/misc_test.c index b1b9820..cdc57df 100644 --- a/tests/misc/misc_test.c +++ b/tests/misc/misc_test.c @@ -172,11 +172,11 @@ /* Signalling shall be supported regardless of the features */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Bm, .spd_ind = RSL_CMOD_SPD_SIGN }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/F */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/F */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Lm, .spd_ind = RSL_CMOD_SPD_SIGN }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/H */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/H */ osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_F_V1); osmo_bts_set_feature(bts->features, BTS_FEAT_SPEECH_H_V1); @@ -186,27 +186,27 @@ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Bm, .spd_ind = RSL_CMOD_SPD_SPEECH, .chan_rate = RSL_CMOD_SP_GSM1 }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/FS */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/FS */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Lm, .spd_ind = RSL_CMOD_SPD_SPEECH, .chan_rate = RSL_CMOD_SP_GSM1 }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/HS */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/HS */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Bm, .spd_ind = RSL_CMOD_SPD_SPEECH, .chan_rate = RSL_CMOD_SP_GSM2 }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 0); /* TCH/EFS */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == false); /* TCH/EFS */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Bm, .spd_ind = RSL_CMOD_SPD_SPEECH, .chan_rate = RSL_CMOD_SP_GSM3 }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/AFS */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/AFS */ cm = (struct rsl_ie_chan_mode) { .chan_rt = RSL_CMOD_CRT_TCH_Lm, .spd_ind = RSL_CMOD_SPD_SPEECH, .chan_rate = RSL_CMOD_SP_GSM3 }; - OSMO_ASSERT(bts_supports_cm(bts, &cm) == 1); /* TCH/AHS */ + OSMO_ASSERT(bts_supports_cm(bts, &cm) == true); /* TCH/AHS */ talloc_free(bts); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33622 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I72e30fe852ab69a162b117a534071ebddd4b16ba Gerrit-Change-Number: 33622 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: validate RSL "channel rate and type" against VGCS/VBS flags
by laforge 10 Jul '23

10 Jul '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33290 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: validate RSL "channel rate and type" against VGCS/VBS flags ...................................................................... validate RSL "channel rate and type" against VGCS/VBS flags We already have specfied (but not yet implemented BTS_FEAT_{VBS,VGCS}). Let's add code to validate "channel rate and type" compatibility in bts_supports_cm() once a BTS model would actually exhibit those feature flags. Change-Id: I5e7f65b44cef6e2f7ad4f152f80a1686a4f511e3 Related: OS#4851 --- M src/common/bts.c 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/bts.c b/src/common/bts.c index 28f7567..6652ce6 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -791,6 +791,16 @@ return 1; case RSL_CMOD_SPD_SPEECH: break; + case RSL_CMOD_CRT_TCH_GROUP_Bm: + case RSL_CMOD_CRT_TCH_GROUP_Lm: + if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VGCS)) + return 0; + break; + case RSL_CMOD_CRT_TCH_BCAST_Bm: + case RSL_CMOD_CRT_TCH_BCAST_Lm: + if (!osmo_bts_has_feature(bts->features, BTS_FEAT_VBS)) + return 0; + break; case RSL_CMOD_SPD_DATA: default: return 0; @@ -804,6 +814,8 @@ return 0; /* fall-through */ case RSL_CMOD_CRT_TCH_Bm: + case RSL_CMOD_CRT_TCH_GROUP_Bm: + case RSL_CMOD_CRT_TCH_BCAST_Bm: switch (cm->chan_rate) { case RSL_CMOD_SP_GSM1: feature = BTS_FEAT_SPEECH_F_V1; @@ -825,6 +837,8 @@ return 0; /* fall-through */ case RSL_CMOD_CRT_TCH_Lm: + case RSL_CMOD_CRT_TCH_GROUP_Lm: + case RSL_CMOD_CRT_TCH_BCAST_Lm: switch (cm->chan_rate) { case RSL_CMOD_SP_GSM1: feature = BTS_FEAT_SPEECH_H_V1; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5e7f65b44cef6e2f7ad4f152f80a1686a4f511e3 Gerrit-Change-Number: 33290 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-bts[master]: ASCI: VGCS/VBS RACH -> RSL TALKER/LISTENER DETECT
by laforge 10 Jul '23

10 Jul '23
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33292 ) Change subject: ASCI: VGCS/VBS RACH -> RSL TALKER/LISTENER DETECT ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1bd07ab6802341b09a06e89df356665ffaf6d2bf Gerrit-Change-Number: 33292 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 10 Jul 2023 18:06:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Change return value of bts_supports_cm() from int to bool
by laforge 10 Jul '23

10 Jul '23
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33622 ) Change subject: Change return value of bts_supports_cm() from int to bool ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33622 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I72e30fe852ab69a162b117a534071ebddd4b16ba Gerrit-Change-Number: 33622 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 10 Jul 2023 18:05:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: ASCI: NCH / NOTIFICATION support
by laforge 10 Jul '23

10 Jul '23
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33289 ) Change subject: ASCI: NCH / NOTIFICATION support ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6f6f72d9a0123cb519b341d72a124aaa2117370e Gerrit-Change-Number: 33289 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 10 Jul 2023 18:05:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[XL] Change in osmo-msc[master]: ASCI: Add call control for VGCS/VBS
by laforge 10 Jul '23

10 Jul '23
Attention is currently required from: jolly, dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33511 ) Change subject: ASCI: Add call control for VGCS/VBS ...................................................................... Patch Set 12: (1 comment) File src/libmsc/msc_vgcs.c: https://gerrit.osmocom.org/c/osmo-msc/+/33511/comment/b667227a_a3ba5a99 PS12, Line 224: static uint8_t _rx_callref(uint8_t *ie, unsigned int remaining_len, uint32_t *callref, bool *with_prio, uint8_t *prio) > Done the function still has an 'int' return type ?!? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33511 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9947403fde8212b66758104443c60aaacc8b1e7b Gerrit-Change-Number: 33511 Gerrit-PatchSet: 12 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 18:03:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: example: Remove calls to osmo_ipa_process_msg()
by daniel 10 Jul '23

10 Jul '23
Attention is currently required from: arehbein, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33205 ) Change subject: example: Remove calls to osmo_ipa_process_msg() ...................................................................... Patch Set 11: (2 comments) Patchset: PS5: > I would say the answer is part of the discussion that has been led on the IRC Osmocom development ch […] ACK Patchset: PS11: This should be merged into the previous commit that changes the segmentation_cb() -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I53283ec7bd7f07dfa612681ae84af93d5cd098b9 Gerrit-Change-Number: 33205 Gerrit-PatchSet: 11 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 16:54:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.