laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bts/+/33287 )
Change subject: paging: Add support for generating NLN/NLN-Status in P1 Rest Octets
......................................................................
paging: Add support for generating NLN/NLN-Status in P1 Rest Octets
The NLN + NLN-Status are optional parts of P1 rest octets; they can
be used to support the "Reduced NCH monitoring mechanism" as described
in Section 3.3.3.3 of TS 48.018.
The patch just adds encoder capability but doesn't yet make use of it.
Change-Id: I961842c3fec151e149f72a4f36279ce4b979795e
Related: OS#5781
---
M src/common/paging.c
1 file changed, 29 insertions(+), 1 deletion(-)
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/paging.c b/src/common/paging.c
index 0ea7de7..b3d5d8b 100644
--- a/src/common/paging.c
+++ b/src/common/paging.c
@@ -321,6 +321,11 @@
/* abstract representation of P1 rest octets; we only implement those parts we need for
now */
struct p1_rest_octets {
+ struct {
+ bool present;
+ uint8_t nln;
+ uint8_t nln_status;
+ } nln_pch;
bool packet_page_ind[2];
bool r8_present;
struct {
@@ -364,7 +369,13 @@
static void append_p1_rest_octets(struct bitvec *bv, const struct p1_rest_octets *p1ro)
{
/* Paging 1 RO (at least 10 bits before ETWS struct) */
- bitvec_set_bit(bv, L); /* no NLN */
+ if (p1ro->nln_pch.present) {
+ bitvec_set_bit(bv, H);
+ bitvec_set_uint(bv, p1ro->nln_pch.nln, 2);
+ bitvec_set_uint(bv, p1ro->nln_pch.nln_status, 1);
+ } else {
+ bitvec_set_bit(bv, L); /* no NLN */
+ }
bitvec_set_bit(bv, L); /* no Priority1 */
bitvec_set_bit(bv, L); /* no Priority2 */
bitvec_set_bit(bv, L); /* no Group Call Info */
@@ -543,6 +554,7 @@
static void build_p1_rest_octets(struct p1_rest_octets *p1ro, struct gsm_bts *bts)
{
memset(p1ro, 0, sizeof(*p1ro));
+ p1ro->nln_pch.present = false;
p1ro->packet_page_ind[0] = false;
p1ro->packet_page_ind[1] = false;
p1ro->r8_present = true;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/33287
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I961842c3fec151e149f72a4f36279ce4b979795e
Gerrit-Change-Number: 33287
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