mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-pcu.git
synced 2025-11-02 13:13:31 +00:00
encoding: pass RFN to write_immediate_assignment(_reject)()
Those function don't really require the full FN, hence let's pass only the required information. This makes the implementation here less dependent on how/if we are able to calculate full FNs based on RFN: We get an RFN, and we have to encode so that the RFN can be derived again, so feels less cumbersome having to go through RFN->FN->RFN which may only cause possible issues if there's some FN timing bug. 3GPP TS 44.018 10.5.2.30 Request Reference: "The purpose of the Request Reference information element is to provide the random access information used in the channel request and the frame number, FN modulo 42432" 3GPP TS 44.018 10.5.2.38 Starting Time: "The purpose of the Starting Time information element is to provide the start TDMA frame number, FN modulo 42432." Change-Id: If9b758434c00f2a3868534d5be84946809c989a9
This commit is contained in:
@@ -753,7 +753,7 @@ static void check_imm_ass(struct gprs_rlcmac_tbf *tbf, bool dl, enum ph_burst_ty
|
||||
struct msgb *m = msgb_alloc(80, "test");
|
||||
bool poll = true;
|
||||
uint16_t ra = 13;
|
||||
uint32_t ref_fn = 24, fn = 11;
|
||||
uint32_t ref_rfn = 24, rfn = 11;
|
||||
int8_t ta_idx = 0;
|
||||
|
||||
/* HACK: tbf can be NULL, so we cannot use tbf->trx here */
|
||||
@@ -766,8 +766,8 @@ static void check_imm_ass(struct gprs_rlcmac_tbf *tbf, bool dl, enum ph_burst_ty
|
||||
bitvec_unhex(immediate_assignment, DUMMY_VEC);
|
||||
plen = Encoding::write_immediate_assignment(&trx.pdch[5], tbf,
|
||||
immediate_assignment,
|
||||
dl, ra, ref_fn, ta, usf,
|
||||
poll, fn, alpha, gamma, ta_idx, bt);
|
||||
dl, ra, ref_rfn, ta, usf,
|
||||
poll, rfn, alpha, gamma, ta_idx, bt);
|
||||
printf("[%u] %s Immediate Assignment <%s>:\n\t%s\n", plen, dl ? "DL" : "UL", kind,
|
||||
osmo_hexdump(immediate_assignment->data, sz));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user