summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-06-06 15:56:18 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-06-06 15:56:18 +0200
commit81b3237c884d348fe360bb31efc0c06946b29e3a (patch)
tree1b3bb7a168256858d754c70b30d09021b6a50d56
parent0ee32177a28e7191bb1ddba9c4115352b1d366d7 (diff)
layer23: modem: Forward LLC-TRANSMITTED.ind RLCMAC->GMM
-rw-r--r--src/host/layer23/src/modem/rlcmac.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/host/layer23/src/modem/rlcmac.c b/src/host/layer23/src/modem/rlcmac.c
index e030299d..161effd0 100644
--- a/src/host/layer23/src/modem/rlcmac.c
+++ b/src/host/layer23/src/modem/rlcmac.c
@@ -85,8 +85,8 @@ static int modem_rlcmac_handle_gmmrr(struct osmo_gprs_rlcmac_prim *rlcmac_prim)
switch (rlcmac_prim->oph.primitive) {
case OSMO_GPRS_RLCMAC_GMMRR_PAGE:
/* Forward it to upper layers, pass ownership over to GMM: */
- /* Optimization: RLCMAC-GMMRR-ASSIGN-REQ is 1-to-1 ABI compatible with
- GMM-GMMRR-ASSIGN-REQ, we just need to adapt the header.
+ /* Optimization: RLCMAC-GMMRR-PAGE-IND is 1-to-1 ABI compatible with
+ GMM-GMMRR-PAGE-IND, we just need to adapt the header.
See osmo_static_assert(_gmmrr_prim_size) above.
*/
gmm_prim = (struct osmo_gprs_gmm_prim *)rlcmac_prim;
@@ -95,6 +95,18 @@ static int modem_rlcmac_handle_gmmrr(struct osmo_gprs_rlcmac_prim *rlcmac_prim)
osmo_gprs_gmm_prim_lower_up(gmm_prim);
rc = 1; /* Tell RLCMAC that we take ownership of the prim. */
break;
+ case OSMO_GPRS_RLCMAC_GMMRR_LLC_TRANSMITTED:
+ /* Forward it to upper layers, pass ownership over to GMM: */
+ /* Optimization: RLCMAC-GMMRR-LLC-TRANSMITTED-IND is 1-to-1 ABI compatible with
+ GMM-GMMRR-LLC-TRANSMITTED-IND, we just need to adapt the header.
+ See osmo_static_assert(_gmmrr_prim_size) above.
+ */
+ gmm_prim = (struct osmo_gprs_gmm_prim *)rlcmac_prim;
+ gmm_prim->oph.sap = OSMO_GPRS_GMM_SAP_GMMRR;
+ gmm_prim->oph.primitive = OSMO_GPRS_GMM_GMMRR_LLC_TRANSMITTED;
+ osmo_gprs_gmm_prim_lower_up(gmm_prim);
+ rc = 1; /* Tell RLCMAC that we take ownership of the prim. */
+ break;
default:
LOGP(DRLCMAC, LOGL_NOTICE, "%s(): Unexpected Rx RLCMAC GMMRR prim %u\n",
__func__, rlcmac_prim->oph.primitive);