From ebabdea0a6df604d4b08cc532e04e845bc456705 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 1 Jun 2010 18:28:10 +0200 Subject: [GPRS] hand SNDCP N-PDUs to the GTP to the GGSN This so far only works for UNIT-DATA and only if the N-PDU is not fragmented at the SNDCP layer. --- openbsc/src/gprs/gprs_llc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'openbsc/src/gprs/gprs_llc.c') diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 26730d4c2..cb581f162 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -340,6 +340,15 @@ static int gprs_llc_hdr_rx(struct gprs_llc_hdr_parsed *gph, gprs_llc_tx_xid(lle, resp); } break; + case GPRS_LLC_UI: + if (gph->seq_tx < lle->vu_recv) { + LOGP(DLLC, "TLLI=%08x dropping UI, vurecv %u <= %u\n", + gph->seq_tx, lle->vu_recv); + return -EIO; + } + /* Increment the sequence number that we expect in the next frame */ + lle->vu_recv = (gph->seq_tx + 1) % 512; + break; } return 0; @@ -583,16 +592,18 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv) /* send LL_UNITDATA_IND to GMM */ rc = gsm0408_gprs_rcvmsg(msg, lle->llme); break; - case GPRS_SAPI_TOM2: - case GPRS_SAPI_TOM8: - /* FIXME: send LL_DATA_IND/LL_UNITDATA_IND to TOM */ case GPRS_SAPI_SNDCP3: case GPRS_SAPI_SNDCP5: case GPRS_SAPI_SNDCP9: case GPRS_SAPI_SNDCP11: - /* FIXME: send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */ + /* send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */ + rc = sndcp_llunitdata_ind(msg, lle, llhp.data, llhp.data_len); + break; case GPRS_SAPI_SMS: /* FIXME */ + case GPRS_SAPI_TOM2: + case GPRS_SAPI_TOM8: + /* FIXME: send LL_DATA_IND/LL_UNITDATA_IND to TOM */ default: LOGP(DLLC, LOGL_NOTICE, "Unsupported SAPI %u\n", llhp.sapi); rc = -EINVAL; -- cgit v1.2.3