diff options
author | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2012-06-29 20:30:10 +0400 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2012-06-29 20:30:10 +0400 |
commit | bbbd79d6f1abd4e7f865f72c15878e0f32f252c3 (patch) | |
tree | 0e82d0773cc16e720687f30c8aa79b5daa953f85 | |
parent | 34460b84072e7ec4c1bafe502aa9d6d859858c0a (diff) |
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.
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 17 | ||||
-rw-r--r-- | src/gprs_rlcmac.cpp | 16 | ||||
-rw-r--r-- | src/gprs_rlcmac.h | 3 |
3 files changed, 6 insertions, 30 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index c5360bc7..df37618a 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -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); diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp index ebb2946c..17120f9e 100644 --- a/src/gprs_rlcmac.cpp +++ b/src/gprs_rlcmac.cpp @@ -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); } + diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index 6f3d372b..3033973a 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -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 |