From 6d92f148aa2354da52b29f366ebd628c9c0c000a Mon Sep 17 00:00:00 2001 From: Keith Date: Mon, 21 Sep 2020 00:09:30 +0200 Subject: Fix Radio Priority in MM Attach and PDP Context Activation 3GPP TS 24.008 Section 10.5.7.2 Radio Priority states that the Radio Priority IE is 3 bits as follows: -------------------------------------------- 0 0 1 priority level 1 (highest) 0 1 0 priority level 2 0 1 1 priority level 3 1 0 0 priority level 4 (lowest) All other values are interpreted as priority level 4 by this version of the protocol. -------------------------------------------- However at least the MediaTek MT6753 and MT6592 have been observed to interpret a value of 0 0 0 in an undetermined way resulting in lack of access to RACH in the cell. Fixes: OS#4506 Change-Id: I810cd541eb5764ee3f2c238bcd3a10836228d0b5 --- src/sgsn/gprs_gmm.c | 2 +- src/sgsn/sgsn_libgtp.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 86545f856..bf72cd6fe 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -302,7 +302,7 @@ int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm) aa->att_result = 1; /* GPRS only */ t = osmo_tdef_get(sgsn->cfg.T_defs, 3312, OSMO_TDEF_S, -1); aa->ra_upd_timer = gprs_secs_to_tmr_floor(t); - aa->radio_prio = 4; /* lowest */ + aa->radio_prio = 0x44; /* lowest */ gsm48_encode_ra(&aa->ra_id, &mm->ra); #if 0 diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index 581e74d4b..45a4a07a5 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -167,6 +167,7 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, pdp->hisaddr0 = ggsn->remote_addr; pdp->hisaddr1 = ggsn->remote_addr; //pdp->cch_pdp = 512; /* Charging Flat Rate */ + pdp->radio_pri = 0x4; /* MS provided APN, subscription was verified by the caller */ pdp->selmode = 0xFC | 0x00; -- cgit v1.2.3