sndcp: Use radio_prio assigned by SM when submitting LLC unitdata.req
Change-Id: I632329bb1f34efb4d9263241e2cda5b559f1ff59
This commit is contained in:
parent
b3e506b38c
commit
f79a8d8499
|
@ -151,6 +151,9 @@ struct gprs_sndcp_entity {
|
||||||
/* The NSAPI we shall use on top of LLC */
|
/* The NSAPI we shall use on top of LLC */
|
||||||
uint8_t nsapi;
|
uint8_t nsapi;
|
||||||
|
|
||||||
|
/* Radio Priority (MS only, used by LLC/RLCMAC), TS 24.008 10.5.7.2 */
|
||||||
|
uint8_t radio_prio;
|
||||||
|
|
||||||
/* NPDU number for the GTP->SNDCP side */
|
/* NPDU number for the GTP->SNDCP side */
|
||||||
uint16_t tx_npdu_nr;
|
uint16_t tx_npdu_nr;
|
||||||
/* SNDCP eeceiver state */
|
/* SNDCP eeceiver state */
|
||||||
|
|
|
@ -222,6 +222,18 @@ int gprs_sndcp_sne_submit_llc_ll_xid_req(struct gprs_sndcp_entity *sne)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int gprs_sndcp_sne_submit_llc_ll_unitdata_req(struct gprs_sndcp_entity *sne, uint8_t *data, unsigned int len)
|
||||||
|
{
|
||||||
|
struct osmo_gprs_llc_prim *llc_prim_tx;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
llc_prim_tx = osmo_gprs_llc_prim_alloc_ll_unitdata_req(sne->snme->tlli, sne->llc_sapi, data, len);
|
||||||
|
OSMO_ASSERT(llc_prim_tx);
|
||||||
|
llc_prim_tx->ll.unitdata_req.radio_prio = sne->radio_prio;
|
||||||
|
rc = gprs_sndcp_prim_call_down_cb(llc_prim_tx);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
int gprs_sndcp_sne_submit_sn_xid_cnf(struct gprs_sndcp_entity *sne)
|
int gprs_sndcp_sne_submit_sn_xid_cnf(struct gprs_sndcp_entity *sne)
|
||||||
{
|
{
|
||||||
struct osmo_gprs_sndcp_prim *sndcp_prim_tx;
|
struct osmo_gprs_sndcp_prim *sndcp_prim_tx;
|
||||||
|
@ -530,7 +542,6 @@ static int gprs_sndcp_send_ud_frag(struct sndcp_frag_state *fs,
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
int rc, more;
|
int rc, more;
|
||||||
struct osmo_gprs_llc_prim *llc_prim_tx;
|
|
||||||
|
|
||||||
fmsg = msgb_alloc_headroom(sne->n201_u+256, 128, "SNDCP Frag");
|
fmsg = msgb_alloc_headroom(sne->n201_u+256, 128, "SNDCP Frag");
|
||||||
if (!fmsg) {
|
if (!fmsg) {
|
||||||
|
@ -588,9 +599,7 @@ static int gprs_sndcp_send_ud_frag(struct sndcp_frag_state *fs,
|
||||||
sch->more = more;
|
sch->more = more;
|
||||||
|
|
||||||
/* Send down the stack SNDCP->LLC as LL-UNITDATA.req: */
|
/* Send down the stack SNDCP->LLC as LL-UNITDATA.req: */
|
||||||
llc_prim_tx = osmo_gprs_llc_prim_alloc_ll_unitdata_req(sne->snme->tlli, sne->llc_sapi, fmsg->data, fmsg->len);
|
rc = gprs_sndcp_sne_submit_llc_ll_unitdata_req(sne, fmsg->data, fmsg->len);
|
||||||
OSMO_ASSERT(llc_prim_tx);
|
|
||||||
rc = gprs_sndcp_prim_call_down_cb(llc_prim_tx);
|
|
||||||
msgb_free(fmsg);
|
msgb_free(fmsg);
|
||||||
/* abort in case of error, do not advance frag_nr / next_byte */
|
/* abort in case of error, do not advance frag_nr / next_byte */
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
@ -622,7 +631,6 @@ int gprs_sndcp_sne_handle_sn_unitdata_req(struct gprs_sndcp_entity *sne, uint8_t
|
||||||
uint8_t dcomp = 0;
|
uint8_t dcomp = 0;
|
||||||
int rc;
|
int rc;
|
||||||
struct msgb *msg = msgb_alloc_headroom(npdu_len + 256, 128, "sndcp-tx");
|
struct msgb *msg = msgb_alloc_headroom(npdu_len + 256, 128, "sndcp-tx");
|
||||||
struct osmo_gprs_llc_prim *llc_prim_tx;
|
|
||||||
|
|
||||||
memcpy(msgb_put(msg, npdu_len), npdu, npdu_len);
|
memcpy(msgb_put(msg, npdu_len), npdu, npdu_len);
|
||||||
|
|
||||||
|
@ -711,9 +719,7 @@ int gprs_sndcp_sne_handle_sn_unitdata_req(struct gprs_sndcp_entity *sne, uint8_t
|
||||||
sch->nsapi = sne->nsapi;
|
sch->nsapi = sne->nsapi;
|
||||||
|
|
||||||
/* Send down the stack SNDCP->LLC as LL-UNITDATA.req: */
|
/* Send down the stack SNDCP->LLC as LL-UNITDATA.req: */
|
||||||
llc_prim_tx = osmo_gprs_llc_prim_alloc_ll_unitdata_req(sne->snme->tlli, sne->llc_sapi, msg->data, msg->len);
|
rc = gprs_sndcp_sne_submit_llc_ll_unitdata_req(sne, msg->data, msg->len);
|
||||||
OSMO_ASSERT(llc_prim_tx);
|
|
||||||
rc = gprs_sndcp_prim_call_down_cb(llc_prim_tx);
|
|
||||||
free_ret:
|
free_ret:
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -661,6 +661,8 @@ static int gprs_sndcp_prim_handle_sndcp_snsm_activate_ind(struct osmo_gprs_sndcp
|
||||||
if (g_sndcp_ctx->location != OSMO_GPRS_SNDCP_LOCATION_MS)
|
if (g_sndcp_ctx->location != OSMO_GPRS_SNDCP_LOCATION_MS)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
sne->radio_prio = sndcp_prim->snsm.activate_ind.radio_prio;
|
||||||
|
|
||||||
/* TODO: when supporting and using LLC ABM mode, flow should go through
|
/* TODO: when supporting and using LLC ABM mode, flow should go through
|
||||||
* LL-ESTABLISH.req, as per TS 24.007 C.6 "No LLC link exists yet,
|
* LL-ESTABLISH.req, as per TS 24.007 C.6 "No LLC link exists yet,
|
||||||
* establish a link and exchange XID"
|
* establish a link and exchange XID"
|
||||||
|
|
Loading…
Reference in New Issue