l1_if: send EMPTY-FRAME.req instead of fill frame on TCH/F + FACCH
This commit is contained in:
parent
1920738840
commit
547b1d1916
|
@ -214,6 +214,7 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
|
||||||
struct gsm_bts_role_bts *btsb = bts->role;
|
struct gsm_bts_role_bts *btsb = bts->role;
|
||||||
GsmL1_Prim_t *l1p = msgb_l1prim(resp_msg);
|
GsmL1_Prim_t *l1p = msgb_l1prim(resp_msg);
|
||||||
GsmL1_PhDataReq_t *data_req = &l1p->u.phDataReq;
|
GsmL1_PhDataReq_t *data_req = &l1p->u.phDataReq;
|
||||||
|
GsmL1_PhEmptyFrameReq_t *empty_req = &l1p->u.phEmptyFrameReq;
|
||||||
GsmL1_MsgUnitParam_t *msu_param = &data_req->msgUnitParam;
|
GsmL1_MsgUnitParam_t *msu_param = &data_req->msgUnitParam;
|
||||||
struct lapdm_channel *lc;
|
struct lapdm_channel *lc;
|
||||||
struct lapdm_entity *le;
|
struct lapdm_entity *le;
|
||||||
|
@ -305,6 +306,8 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
|
||||||
rc = paging_gen_msg(btsb->paging_state, msu_param->u8Buffer, &g_time);
|
rc = paging_gen_msg(btsb->paging_state, msu_param->u8Buffer, &g_time);
|
||||||
break;
|
break;
|
||||||
case GsmL1_Sapi_TchF:
|
case GsmL1_Sapi_TchF:
|
||||||
|
#warning Send actual speech data on the TCH
|
||||||
|
goto empty_frame;
|
||||||
break;
|
break;
|
||||||
case GsmL1_Sapi_FacchF:
|
case GsmL1_Sapi_FacchF:
|
||||||
/* resolve the L2 entity using rts_ind->hLayer2 */
|
/* resolve the L2 entity using rts_ind->hLayer2 */
|
||||||
|
@ -312,8 +315,7 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
|
||||||
le = &lc->lapdm_dcch;
|
le = &lc->lapdm_dcch;
|
||||||
rc = lapdm_phsap_dequeue_prim(le, &pp);
|
rc = lapdm_phsap_dequeue_prim(le, &pp);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
memcpy(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN);
|
goto empty_frame;
|
||||||
#warning Send actual speech data on the TCH
|
|
||||||
else {
|
else {
|
||||||
data_req->sapi = GsmL1_Sapi_FacchF;
|
data_req->sapi = GsmL1_Sapi_FacchF;
|
||||||
memcpy(msu_param->u8Buffer, pp.oph.msg->data, GSM_MACBLOCK_LEN);
|
memcpy(msu_param->u8Buffer, pp.oph.msg->data, GSM_MACBLOCK_LEN);
|
||||||
|
@ -325,10 +327,24 @@ static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1,
|
||||||
memcpy(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN);
|
memcpy(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
tx:
|
||||||
/* transmit */
|
/* transmit */
|
||||||
osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], resp_msg);
|
osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], resp_msg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
empty_frame:
|
||||||
|
/* in case we decide to send an empty frame... */
|
||||||
|
memset(l1p, 0, sizeof(*l1p));
|
||||||
|
l1p->id = GsmL1_PrimId_PhEmptyFrameReq;
|
||||||
|
empty_req->hLayer1 = rts_ind->hLayer1;
|
||||||
|
empty_req->u8Tn = rts_ind->u8Tn;
|
||||||
|
empty_req->u32Fn = rts_ind->u32Fn;
|
||||||
|
empty_req->sapi = rts_ind->sapi;
|
||||||
|
empty_req->subCh = rts_ind->subCh;
|
||||||
|
empty_req->u8BlockNbr = rts_ind->u8BlockNbr;
|
||||||
|
|
||||||
|
goto tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_mph_time_ind(struct femtol1_hdl *fl1,
|
static int handle_mph_time_ind(struct femtol1_hdl *fl1,
|
||||||
|
|
Loading…
Reference in New Issue