Fixed DL TBF establishment on CCCH.

We shouldn't use paging procedure for DL TBF establishment, if we didn't receive paging message from BSSGP.
This commit is contained in:
Ivan Kluchnikov 2012-06-29 20:30:10 +04:00
parent 34460b8407
commit bbbd79d6f1
3 changed files with 6 additions and 30 deletions

View File

@ -48,22 +48,7 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp)
return bssgp_tx_status(BSSGP_CAUSE_MISSING_MAND_IE, NULL, msg);
}
uint16_t imsi_len = 0;
uint8_t *imsi = NULL;
if (TLVP_PRESENT(tp, BSSGP_IE_IMSI))
{
imsi_len = TLVP_LEN(tp, BSSGP_IE_IMSI);
imsi = (uint8_t *) TLVP_VAL(tp, BSSGP_IE_IMSI);
LOGPC(DBSSGP, LOGL_NOTICE, " IMSI = ");
for (i = 0; i < imsi_len; i++)
{
LOGPC(DBSSGP, LOGL_NOTICE, "%02x", imsi[i]);
}
LOGP(DBSSGP, LOGL_NOTICE, "\n");
}
tbf_dl_establish(tbf, imsi);
tbf_dl_establish(tbf);
uint8_t *llc_pdu = (uint8_t *) TLVP_VAL(tp, BSSGP_IE_LLC_PDU);
uint16_t llc_pdu_len = TLVP_LEN(tp, BSSGP_IE_LLC_PDU);

View File

@ -303,7 +303,7 @@ int tbf_ul_establish(struct gprs_rlcmac_tbf *tbf, uint8_t ra, uint32_t Fn, uint1
}
/* Management of downlink TBF establishment. */
int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf, uint8_t *imsi)
int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf)
{
if (tbf->direction != GPRS_RLCMAC_DL_TBF)
{
@ -318,17 +318,8 @@ int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf, uint8_t *imsi)
LOGP(DRLCMAC, LOGL_NOTICE, "TBF: [DOWNLINK] TFI: Wait DL TBF establishment by UL TBF\n", tbf->tfi);
break;
case CCCH_ESTABLISH:
if (imsi)
{
// Downlink TBF Establishment on CCCH ( Paging procedure )
// TODO: Implement paging procedure on CCCH.
LOGP(DRLCMAC, LOGL_NOTICE, "TBF: [DOWNLINK] TFI: Paging procedure on CCCH : Not implemented yet\n", tbf->tfi);
}
else
{
// Downlink TBF Establishment on CCCH ( Immediate Assignment )
tbf_gsm_timer_start(tbf, 1, 0);
}
// Downlink TBF Establishment on CCCH ( Immediate Assignment )
tbf_gsm_timer_start(tbf, 1, 0);
break;
case PACCH_ESTABLISH:
// Downlink TBF Establishment on PACCH ( Packet Immediate Assignment )
@ -1166,3 +1157,4 @@ void gprs_rlcmac_packet_downlink_assignment(gprs_rlcmac_tbf *tbf)
gprs_rlcmac_enqueue_block(packet_downlink_assignment_vec, 23);
bitvec_free(packet_downlink_assignment_vec);
}

View File

@ -116,7 +116,7 @@ struct gprs_rlcmac_tbf *tbf_alloc(gprs_rlcmac_tbf_direction dir, uint32_t tlli =
int tbf_ul_establish(struct gprs_rlcmac_tbf *tbf, uint8_t ra, uint32_t Fn, uint16_t qta);
int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf, uint8_t *imsi = NULL);
int tbf_dl_establish(struct gprs_rlcmac_tbf *tbf);
int tbf_ul_data_transfer(struct gprs_rlcmac_tbf *tbf, RlcMacUplinkDataBlock_t * ul_data_block);
@ -154,5 +154,4 @@ void gprs_rlcmac_tx_ul_ud(gprs_rlcmac_tbf *tbf);
void gprs_rlcmac_downlink_assignment(gprs_rlcmac_tbf *tbf);
void gprs_rlcmac_packet_downlink_assignment(gprs_rlcmac_tbf *tbf);
#endif // GPRS_RLCMAC_H