This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18387 )
Change subject: BTS::parse_rach_ind(): properly handle EGPRS Packet Channel Request
......................................................................
BTS::parse_rach_ind(): properly handle EGPRS Packet Channel Request
Let's finally use the API we introduced in [1].
[1] I96df3352856933c9140177b2801a2c71f4134183
Change-Id: Ia15761c33c8048d35c7f7bc93dbea781dd0894b7
Related: OS#1548
---
M src/bts.cpp
1 file changed, 56 insertions(+), 3 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/bts.cpp b/src/bts.cpp
index 2a74978..26cb258 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -685,9 +685,57 @@
* can only receive EGPRS mslot class through 11-bit EGPRS PACKET CHANNEL REQUEST. */
static int parse_egprs_pkt_ch_req(uint16_t ra11, struct chan_req_params *chan_req)
{
- /* EGPRS multislot class is only present in One Phase Access Request */
- if ((ra11 >> 10) == 0x00) /* .0xx xxx. .... */
- chan_req->egprs_mslot_class = ((ra11 & 0x3e0) >> 5) + 1;
+ EGPRS_PacketChannelRequest_t req;
+ int rc;
+
+ rc = decode_egprs_pkt_ch_req(ra11, &req);
+ if (rc) {
+ LOGP(DRLCMAC, LOGL_NOTICE, "Failed to decode "
+ "EGPRS Packet Channel Request: rc=%d\n", rc);
+ return rc;
+ }
+
+ LOGP(DRLCMAC, LOGL_INFO, "Rx EGPRS Packet Channel Request: %s\n",
+ get_value_string(egprs_pkt_ch_req_type_names, req.Type));
+
+ switch (req.Type) {
+ case EGPRS_PKT_CHAN_REQ_ONE_PHASE:
+ chan_req->egprs_mslot_class = req.Content.MultislotClass + 1;
+ chan_req->priority = req.Content.Priority + 1;
+ break;
+ case EGPRS_PKT_CHAN_REQ_SHORT:
+ chan_req->priority = req.Content.Priority + 1;
+ if (req.Content.NumberOfBlocks == 0)
+ chan_req->single_block = true;
+ break;
+ case EGPRS_PKT_CHAN_REQ_ONE_PHASE_RED_LATENCY:
+ chan_req->priority = req.Content.Priority + 1;
+ break;
+ /* Two phase access => single block is needed */
+ case EGPRS_PKT_CHAN_REQ_TWO_PHASE:
+ case EGPRS_PKT_CHAN_REQ_TWO_PHASE_IPA:
+ chan_req->priority = req.Content.Priority + 1;
+ chan_req->single_block = true;
+ break;
+ /* Signalling => single block is needed */
+ case EGPRS_PKT_CHAN_REQ_SIGNALLING:
+ case EGPRS_PKT_CHAN_REQ_SIGNALLING_IPA:
+ chan_req->single_block = true;
+ break;
+
+ /* Neither unacknowledged RLC mode, nor emergency calls are supported */
+ case EGPRS_PKT_CHAN_REQ_ONE_PHASE_UNACK:
+ case EGPRS_PKT_CHAN_REQ_EMERGENCY_CALL:
+ case EGPRS_PKT_CHAN_REQ_DEDICATED_CHANNEL:
+ LOGP(DRLCMAC, LOGL_NOTICE, "%s is not supported, rejecting\n",
+ get_value_string(egprs_pkt_ch_req_type_names, req.Type));
+ return -ENOTSUP;
+
+ default:
+ LOGP(DRLCMAC, LOGL_ERROR, "Unknown EGPRS Packet Channel Request "
+ "type=0x%02x, probably a bug in CSN.1 codec\n", req.Type);
+ return -EINVAL;
+ }
return 0;
}
@@ -774,6 +822,11 @@
chan_req.single_block = true;
}
+ /* TODO: handle Radio Priority (see 3GPP TS 44.060, table 11.2.5a.5) */
+ if (chan_req.priority > 0)
+ LOGP(DRLCMAC, LOGL_NOTICE, "EGPRS Packet Channel Request indicates "
+ "Radio Priority %u, however we ignore it\n", chan_req.priority);
+
/* Should we allocate a single block or an Uplink TBF? */
if (chan_req.single_block) {
rc = sba()->alloc(&trx_no, &ts_no, &sb_fn, ta);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18387
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia15761c33c8048d35c7f7bc93dbea781dd0894b7
Gerrit-Change-Number: 18387
Gerrit-PatchSet: 8
Gerrit-Owner: Vadim Yanitskiy <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200603/7f281589/attachment.htm>