From 5d93f0f4eceda7bef29e27e6ec521c1e56640c25 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 17 Nov 2016 21:07:56 +0100 Subject: [PATCH] Fix GSMTAP logging in case direct PHY access is enabled In the existing code, GSMTAP messages were only generated in case no direct PHY access was being used (i.e. in the case all user traffic goes over the PCU socket). I'm not quite sure what the reason is for that would be and conclud this is not intentional. Let's first send the message to GSMTAP and then decide whether to send it via the direct PHY access or via the PCU socket into the BTS/BSC. Change-Id: I5d2e018f7009cb947abc874881c0c440feca3ade --- src/pcu_l1_if.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index e1ebbde4..fb176538 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -129,6 +129,7 @@ void pcu_l1if_tx_pdtch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, { struct gprs_rlcmac_bts *bts = bts_main_data(); + gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PACCH, 0, fn, 0, 0, msg->data, msg->len); #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { l1if_pdch_req(bts->trx[trx].fl1h, ts, 0, fn, arfcn, block_nr, @@ -137,7 +138,6 @@ void pcu_l1if_tx_pdtch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, return; } #endif - gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PACCH, 0, fn, 0, 0, msg->data, msg->len); pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PDTCH, arfcn, fn, block_nr, msg->data, msg->len); msgb_free(msg); @@ -148,6 +148,7 @@ void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, { struct gprs_rlcmac_bts *bts = bts_main_data(); + gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PACCH, 0, fn, 0, 0, msg->data, msg->len); #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, @@ -156,7 +157,6 @@ void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, return; } #endif - gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PACCH, 0, fn, 0, 0, msg->data, msg->len); pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, msg->data, msg->len); msgb_free(msg);