mirror of https://gerrit.osmocom.org/libosmocore
Revert "lapdm: Append RSL_IE_OSMO_ABS_FRAME_NUMBER to RSLms msgs towards upper layers"
This reverts commit d981794113
.
osmo-bts is forwarding the msgbs as they come from lapdm to the RSL on
the wire, which means we end up sending the osmocom-specific IEs on the
wire, something which was not envisioned when adding this IE.
Change-Id: I0ab0d5b545b4862e72eb1842edd07ca2e4955311
Related: OS#6142
This commit is contained in:
parent
cd23806264
commit
06da40bdb3
|
@ -51,8 +51,6 @@ void rsl_rll_push_hdr(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
|
|||
/* Push a RSL RLL header with L3_INFO IE */
|
||||
void rsl_rll_push_l3(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
|
||||
uint8_t link_id, int transparent);
|
||||
void rsl_rll_push_l3_with_fn(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
|
||||
uint8_t link_id, int transparent, uint32_t fn);
|
||||
|
||||
/* Allocate msgb and fill with simple RSL RLL header */
|
||||
struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr,
|
||||
|
|
|
@ -503,7 +503,7 @@ static int send_rslms_rll_l3(uint8_t msg_type, struct lapdm_msg_ctx *mctx,
|
|||
int transparent = rsl_is_transparent(msg_type);
|
||||
|
||||
/* Add the RSL + RLL header */
|
||||
rsl_rll_push_l3_with_fn(msg, msg_type, mctx->chan_nr, mctx->link_id, transparent, mctx->fn);
|
||||
rsl_rll_push_l3(msg, msg_type, mctx->chan_nr, mctx->link_id, transparent);
|
||||
|
||||
/* send off the RSLms message to L3 */
|
||||
return rslms_sendmsg(msg, mctx->dl->entity);
|
||||
|
@ -513,14 +513,10 @@ static int send_rslms_rll_l3(uint8_t msg_type, struct lapdm_msg_ctx *mctx,
|
|||
static int send_rslms_rll_l3_ui(struct lapdm_msg_ctx *mctx, struct msgb *msg)
|
||||
{
|
||||
uint8_t l3_len = msg->tail - (uint8_t *)msgb_l3(msg);
|
||||
uint32_t fn_be;
|
||||
|
||||
/* Add the RSL + RLL header */
|
||||
msgb_tv16_push(msg, RSL_IE_L3_INFO, l3_len);
|
||||
|
||||
osmo_store32be(mctx->fn, &fn_be);
|
||||
msgb_tlv_push(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be);
|
||||
|
||||
/* Add two non-standard IEs carrying MS power and TA values for B4 (SACCH) */
|
||||
if (mctx->lapdm_fmt == LAPDm_FMT_B4) {
|
||||
msgb_tv_push(msg, RSL_IE_MS_POWER, mctx->tx_power_ind);
|
||||
|
@ -537,12 +533,8 @@ static int send_rll_simple(uint8_t msg_type, struct lapdm_msg_ctx *mctx)
|
|||
{
|
||||
struct msgb *msg;
|
||||
int transparent = rsl_is_transparent(msg_type);
|
||||
uint32_t fn_be;
|
||||
|
||||
msg = rsl_rll_simple(msg_type, mctx->chan_nr, mctx->link_id, transparent);
|
||||
/* Add FN to the end to keep backward compat: */
|
||||
osmo_store32be(mctx->fn, &fn_be);
|
||||
msgb_tlv_put(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be);
|
||||
|
||||
/* send off the RSLms message to L3 */
|
||||
return rslms_sendmsg(msg, mctx->dl->entity);
|
||||
|
@ -551,15 +543,10 @@ static int send_rll_simple(uint8_t msg_type, struct lapdm_msg_ctx *mctx)
|
|||
static int rsl_rll_error(uint8_t cause, struct lapdm_msg_ctx *mctx)
|
||||
{
|
||||
struct msgb *msg;
|
||||
uint32_t fn_be;
|
||||
|
||||
LOGDL(&mctx->dl->dl, LOGL_NOTICE, "sending MDL-ERROR-IND %d\n", cause);
|
||||
msg = rsl_rll_simple(RSL_MT_ERROR_IND, mctx->chan_nr, mctx->link_id, 0);
|
||||
msgb_tlv_put(msg, RSL_IE_RLM_CAUSE, 1, &cause);
|
||||
/* Add FN to the end to keep backward compat: */
|
||||
osmo_store32be(mctx->fn, &fn_be);
|
||||
msgb_tlv_put(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be);
|
||||
|
||||
return rslms_sendmsg(msg, mctx->dl->entity);
|
||||
}
|
||||
|
||||
|
|
|
@ -561,33 +561,6 @@ void rsl_rll_push_l3(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
|
|||
rsl_rll_push_hdr(msg, msg_type, chan_nr, link_id, transparent);
|
||||
}
|
||||
|
||||
/*! Wrap msgb in L3 Info IE and push a RSL RLL header
|
||||
* \param[in] msg Message Buffer to which L3 Header shall be appended
|
||||
* \param[in] msg_type RSL Message Type
|
||||
* \param[in] chan_hr RSL Channel Number
|
||||
* \param[in] link_id Link Identififer
|
||||
* \param[in] transparent Transparent to BTS (1) or not (0)
|
||||
* \param[in] fn Frame Number
|
||||
*/
|
||||
void rsl_rll_push_l3_with_fn(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr,
|
||||
uint8_t link_id, int transparent, uint32_t fn)
|
||||
{
|
||||
uint8_t l3_len = msg->tail - (uint8_t *)msgb_l3(msg);
|
||||
uint32_t fn_be;
|
||||
|
||||
/* construct a RSLms RLL message (DATA INDICATION, UNIT DATA
|
||||
* INDICATION) and send it off via RSLms */
|
||||
|
||||
/* Push the L3 IE tag and length */
|
||||
msgb_tv16_push(msg, RSL_IE_L3_INFO, l3_len);
|
||||
|
||||
osmo_store32be(fn, &fn_be);
|
||||
msgb_tlv_push(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be);
|
||||
|
||||
/* Then push the RSL header */
|
||||
rsl_rll_push_hdr(msg, msg_type, chan_nr, link_id, transparent);
|
||||
}
|
||||
|
||||
/*! Create msgb with RSL RLL header
|
||||
* \param[in] msg_type RSL Message Type
|
||||
* \param[in] chan_nr RSL Channel Number
|
||||
|
|
|
@ -359,7 +359,7 @@ static int ms_to_bts_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *_ctx
|
|||
struct abis_rsl_rll_hdr hdr;
|
||||
|
||||
printf("MS: Verifying incoming primitive.\n");
|
||||
OSMO_ASSERT(msg->len >= sizeof(struct abis_rsl_rll_hdr));
|
||||
OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr));
|
||||
|
||||
/* verify the header */
|
||||
memset(&hdr, 0, sizeof(hdr));
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
I do some very simple LAPDm test.
|
||||
Establishing link.
|
||||
ms_to_bts_l1_cb: MS(us) -> BTS prim message
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 31
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 25
|
||||
BTS: Verifying CM request.
|
||||
|
||||
Confirming
|
||||
lapdm_phsap_dequeue_prim(): got rc 0: Success
|
||||
Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00
|
||||
Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b
|
||||
ms_to_bts_tx_cb: BTS->MS(us) message 12
|
||||
ms_to_bts_tx_cb: BTS->MS(us) message 6
|
||||
MS: Verifying incoming primitive.
|
||||
|
||||
Sending back to MS
|
||||
lapdm_phsap_dequeue_prim(): got rc 0: Success
|
||||
Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00
|
||||
Message: [L2]> 03 00 0d [L3]> 05 04 0d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
|
||||
ms_to_bts_tx_cb: BTS->MS(us) message 18
|
||||
ms_to_bts_tx_cb: BTS->MS(us) message 12
|
||||
MS: Verifying incoming MM message: 3
|
||||
ms_to_bts_l1_cb: MS(us) -> BTS prim message
|
||||
lapdm_phsap_dequeue_prim(): got rc -19: No such device
|
||||
|
||||
Sending back to BTS
|
||||
ms_to_bts_l1_cb: MS(us) -> BTS prim message
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 20
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 14
|
||||
BTS: Verifying dummy message.
|
||||
lapdm_phsap_dequeue_prim(): got rc 0: Success
|
||||
MSGB: L3 is undefined
|
||||
|
@ -32,7 +32,7 @@ lapdm_phsap_dequeue_prim(): got rc -19: No such device
|
|||
lapdm_phsap_dequeue_prim(): got rc -19: No such device
|
||||
I test RF channel release of an unestablished channel.
|
||||
I test contention resultion by having two mobiles collide and first mobile repeating SABM.
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 31
|
||||
bts_to_ms_tx_cb: MS->BTS(us) message 25
|
||||
BTS: Verifying CM request.
|
||||
lapdm_phsap_dequeue_prim(): got rc 0: Success
|
||||
Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00
|
||||
|
@ -60,7 +60,7 @@ lapdm_phsap_dequeue_prim(): got rc -19: No such device
|
|||
I test if desync problems exist in LAPDm
|
||||
|
||||
Establishing SAPI=0
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 31
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 25
|
||||
|
||||
Dumping queue:
|
||||
00 00 17 [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80
|
||||
|
@ -70,7 +70,7 @@ Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0,
|
|||
Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b
|
||||
|
||||
Sending Classmark Change
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 33
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 27
|
||||
|
||||
Dumping queue:
|
||||
00 00 17 [L2]> 01 21 01
|
||||
|
@ -87,7 +87,7 @@ Dumping queue:
|
|||
|
||||
|
||||
Sending GPRS Suspend Request
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 28
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 22
|
||||
|
||||
Dumping queue:
|
||||
00 00 17 [L2]> 03 40 0d [L3]> 06 35 01
|
||||
|
@ -97,7 +97,7 @@ Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0,
|
|||
Message: [L2]> 03 40 0d [L3]> 06 35 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
|
||||
|
||||
Sending Cipher Mode Complete
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 17
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 11
|
||||
|
||||
Dumping queue:
|
||||
00 00 17 [L2]> 01 61 01
|
||||
|
@ -108,7 +108,7 @@ Took message from DCCH queue: L2 header size 23, L3 size 0, SAP 0x1000000, 0/0,
|
|||
Message: [L2]> 01 61 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
|
||||
|
||||
Establishing SAPI=3
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 12
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 6
|
||||
|
||||
Dumping queue:
|
||||
|
||||
|
@ -128,7 +128,7 @@ Message: [L2]> 0d 21 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
|
|||
=== I test SAPI0/SAPI3 prioritization ===
|
||||
|
||||
MS is establishing a SAPI=0 link
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 28
|
||||
bts_to_ms_dummy_tx_cb: MS->BTS(us) message 22
|
||||
BTS is establishing a SAPI=3 link
|
||||
lapdm_phsap_dequeue_prim(): got rc 0: Success
|
||||
Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00
|
||||
|
|
Loading…
Reference in New Issue