Make use of T3142 received from BTS

Related: OS#3928
Change-Id: I4e26f181db9693d3a267a879e2aebda12eab2a8c
changes/05/23905/2
Pau Espin 2 years ago
parent 846fd248dc
commit 25ebf3c8f9
  1. 5
      src/bts.cpp
  2. 10
      src/encoding.cpp
  3. 3
      src/encoding.h
  4. 4
      tests/types/TypesTest.cpp

@ -76,7 +76,7 @@ void bts_trx_free_all_tbf(struct gprs_rlcmac_trx *trx)
}
static struct osmo_tdef T_defs_bts[] = {
{ .T=3142, .default_val=20, .unit=OSMO_TDEF_S, .desc="timer (s)", .val=0 },
{ .T=3142, .default_val=20, .unit=OSMO_TDEF_S, .desc="Wait Indication used in Imm Ass Reject during TBF Establishment (s)", .val=0, .min_val = 0, .max_val = 255 }, /* TS 44.018 10.5.2.43 */
{ .T=3169, .default_val=5, .unit=OSMO_TDEF_S, .desc="Reuse of USF and TFI(s) after the MS uplink TBF assignment is invalid (s)", .val=0 },
{ .T=3191, .default_val=5, .unit=OSMO_TDEF_S, .desc="Reuse of TFI(s) after sending (1) last RLC Data Block on TBF(s), or (2) PACKET TBF RELEASE for an MBMS radio bearer (s)", .val=0 },
{ .T=3193, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Reuse of TFI(s) after reception of final PACKET DOWNLINK ACK/NACK from MS for TBF (ms)", .val=0 },
@ -890,7 +890,8 @@ send_imm_ass_rej:
if (rc != 0) {
LOGP(DRLCMAC, LOGL_DEBUG, "Tx Immediate Assignment Reject on AGCH\n");
plen = Encoding::write_immediate_assignment_reject(
bv, rip->ra, Fn, rip->burst_type);
bv, rip->ra, Fn, rip->burst_type,
(uint8_t)osmo_tdef_get(bts->T_defs_bts, 3142, OSMO_TDEF_S, -1));
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_REJ);
} else {
LOGP(DRLCMAC, LOGL_DEBUG, "Tx Immediate Assignment on AGCH: "

@ -361,10 +361,8 @@ static int write_ia_rest_egprs_uplink_sba(const gprs_rlcmac_ul_tbf *tbf, bitvec
* Immediate assignment reject, sent on the CCCH/AGCH
* see GSM 44.018, 9.1.20 + 10.5.2.30
*/
int Encoding::write_immediate_assignment_reject(
bitvec *dest, uint16_t ra,
uint32_t ref_fn,
enum ph_burst_type burst_type)
int Encoding::write_immediate_assignment_reject(bitvec *dest, uint16_t ra,
uint32_t ref_fn, enum ph_burst_type burst_type, uint8_t t3142)
{
unsigned wp = 0;
int plen;
@ -404,8 +402,8 @@ int Encoding::write_immediate_assignment_reject(
bitvec_write_field(dest, &wp, ref_fn % 51, 6); // T3
bitvec_write_field(dest, &wp, ref_fn % 26, 5); // T2
/* TODO: Make it configurable */
bitvec_write_field(dest, &wp, 20, 8); //Wait Indication 1
/* 10.5.2.43 Wait Indication */
bitvec_write_field(dest, &wp, t3142, 8);
}
plen = wp / 8;

@ -59,7 +59,8 @@ public:
static int write_immediate_assignment_reject(
bitvec *dest, uint16_t ra,
uint32_t ref_fn,
enum ph_burst_type burst_type
enum ph_burst_type burst_type,
uint8_t t3142
);
static void write_packet_uplink_assignment(

@ -877,7 +877,7 @@ void test_immediate_assign_rej()
bitvec_unhex(immediate_assignment_rej, DUMMY_VEC);
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment_rej, 112, 100,
GSM_L1_BURST_TYPE_ACCESS_1);
GSM_L1_BURST_TYPE_ACCESS_1, 20);
printf("assignment reject: %s\n",
osmo_hexdump(immediate_assignment_rej->data, 22));
@ -892,7 +892,7 @@ void test_immediate_assign_rej()
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment_rej, 112, 100,
GSM_L1_BURST_TYPE_ACCESS_0);
GSM_L1_BURST_TYPE_ACCESS_0, 20);
printf("assignment reject: %s\n",
osmo_hexdump(immediate_assignment_rej->data, 22));

Loading…
Cancel
Save