[S] Change in osmocom-bb[master]: Fix reception of MM messages at gsm48_mm_data_ind()

2023-09-29 Thread jolly
jolly has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email )

Change subject: Fix reception of MM messages at gsm48_mm_data_ind()
..

Fix reception of MM messages at gsm48_mm_data_ind()

The patch "ASCI: Add GCC/BCC (call control) to mobility management"
breaks reception of MM messages. No MM connection setup is possible.

This patch fixes the issue.

Change-Id: I263739bb0220d19f14114714fe9d82505bdbd267
---
M src/host/layer23/src/mobile/gsm48_mm.c
1 file changed, 24 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved




diff --git a/src/host/layer23/src/mobile/gsm48_mm.c 
b/src/host/layer23/src/mobile/gsm48_mm.c
index cfdb4f5..8c57785 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -4068,7 +4068,7 @@
struct gsm48_mm_conn *conn;
struct gsm48_mmxx_hdr *mmh;
int msg_supported = 0; /* determine, if message is supported at all */
-   int rr_prim = -1, rr_est = -1; /* no prim set */
+   int rr_prim, rr_est = -1; /* no prim set */
uint8_t skip_ind;
int i, rc;

@@ -4108,11 +4108,7 @@
rr_prim = GSM48_MMBCC_DATA_IND;
break;
default:
-   LOGP(DMM, LOGL_NOTICE, "Protocol type 0x%02x unsupported.\n",
-pdisc);
-   msgb_free(msg);
-   return gsm48_mm_tx_mm_status(ms,
-   GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED);
+   goto forward_msg;
}

transaction_id = ((gh->proto_discr & 0xf0) ^ 0x80) >> 4; /* flip */
@@ -4159,6 +4155,7 @@
}

/* forward message */
+forward_msg:
switch (pdisc) {
case GSM48_PDISC_MM:
skip_ind = (gh->proto_discr & 0xf0) >> 4;
@@ -4190,6 +4187,13 @@
rc = -ENOTSUP;
msgb_free(msg);
return rc;
+
+   default:
+   LOGP(DMM, LOGL_NOTICE, "Protocol type 0x%02x unsupported.\n",
+pdisc);
+   msgb_free(msg);
+   return gsm48_mm_tx_mm_status(ms,
+   GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED);
}

LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' in MM state %s\n", ms->name,

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I263739bb0220d19f14114714fe9d82505bdbd267
Gerrit-Change-Number: 34570
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmocom-bb[master]: Fix reception of MM messages at gsm48_mm_data_ind()

2023-09-28 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email )

Change subject: Fix reception of MM messages at gsm48_mm_data_ind()
..


Patch Set 1: Code-Review+2

(1 comment)

File src/host/layer23/src/mobile/gsm48_mm.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/34570/comment/6400f0c6_cdc8b1ce
PS1, Line 4091: switch (pdisc) {
Sounds like you probably want to put all the code from here to line 4155 to a 
subfunction to simplify this one and avoid the goto. Can be done in another 
patch.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I263739bb0220d19f14114714fe9d82505bdbd267
Gerrit-Change-Number: 34570
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Thu, 28 Sep 2023 11:59:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmocom-bb[master]: Fix reception of MM messages at gsm48_mm_data_ind()

2023-09-28 Thread jolly
jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email )


Change subject: Fix reception of MM messages at gsm48_mm_data_ind()
..

Fix reception of MM messages at gsm48_mm_data_ind()

The patch "ASCI: Add GCC/BCC (call control) to mobility management"
breaks reception of MM messages. No MM connection setup is possible.

This patch fixes the issue.

Change-Id: I263739bb0220d19f14114714fe9d82505bdbd267
---
M src/host/layer23/src/mobile/gsm48_mm.c
1 file changed, 24 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/70/34570/1

diff --git a/src/host/layer23/src/mobile/gsm48_mm.c 
b/src/host/layer23/src/mobile/gsm48_mm.c
index cfdb4f5..8c57785 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -4068,7 +4068,7 @@
struct gsm48_mm_conn *conn;
struct gsm48_mmxx_hdr *mmh;
int msg_supported = 0; /* determine, if message is supported at all */
-   int rr_prim = -1, rr_est = -1; /* no prim set */
+   int rr_prim, rr_est = -1; /* no prim set */
uint8_t skip_ind;
int i, rc;

@@ -4108,11 +4108,7 @@
rr_prim = GSM48_MMBCC_DATA_IND;
break;
default:
-   LOGP(DMM, LOGL_NOTICE, "Protocol type 0x%02x unsupported.\n",
-pdisc);
-   msgb_free(msg);
-   return gsm48_mm_tx_mm_status(ms,
-   GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED);
+   goto forward_msg;
}

transaction_id = ((gh->proto_discr & 0xf0) ^ 0x80) >> 4; /* flip */
@@ -4159,6 +4155,7 @@
}

/* forward message */
+forward_msg:
switch (pdisc) {
case GSM48_PDISC_MM:
skip_ind = (gh->proto_discr & 0xf0) >> 4;
@@ -4190,6 +4187,13 @@
rc = -ENOTSUP;
msgb_free(msg);
return rc;
+
+   default:
+   LOGP(DMM, LOGL_NOTICE, "Protocol type 0x%02x unsupported.\n",
+pdisc);
+   msgb_free(msg);
+   return gsm48_mm_tx_mm_status(ms,
+   GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED);
}

LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' in MM state %s\n", ms->name,

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34570?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I263739bb0220d19f14114714fe9d82505bdbd267
Gerrit-Change-Number: 34570
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-MessageType: newchange