aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-06-26 17:36:11 +0200
committerdexter <pmaier@sysmocom.de>2017-07-10 08:45:41 +0000
commit6a538a092106e448a354e42c161ea7630e457455 (patch)
tree9cdc8f96620aba92470fc9cfe645c7b914fd1719 /src
parent390742b3ede56aa05e7fb01f140ec8450f38e2af (diff)
octphy: do not send empty frames to phy
ph_data_req() and ph_tch_req() are generating empty (idle) frames when no data (msg == NULL) is available. Since the phy is able to generate idle frames internally, there is no need to waste Host CPU cycles by doing this in software. Remove the empty frame generation and exit the function cleanly. (Patch by Octasic Inc.) Change-Id: Ib857b7dab490ad426c48d6a9e5e6fa10ef5a0838
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-octphy/l1_if.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c
index 5785b9a0..740d808d 100644
--- a/src/osmo-bts-octphy/l1_if.c
+++ b/src/osmo-bts-octphy/l1_if.c
@@ -536,22 +536,9 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_DATA_CMD_SWAP(data_req);
} else {
- /* No data available, generate Empty frame Req in l1msg */
- tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *empty_frame_req =
- (tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *)
- msgb_put(l1msg, sizeof(*empty_frame_req));
-
- l1if_fill_msg_hdr(&empty_frame_req->Header, l1msg, fl1h, cOCTVC1_MSG_TYPE_COMMAND,
- cOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CID);
-
- empty_frame_req->TrxId.byTrxId = pinst->u.octphy.trx_id;
- empty_frame_req->LchId.byTimeslotNb = u8Tn;
- empty_frame_req->LchId.bySAPI = sapi;
- empty_frame_req->LchId.bySubChannelNb = subCh;
- empty_frame_req->LchId.byDirection = cOCTVC1_GSM_DIRECTION_ENUM_TX_BTS_MS;
- empty_frame_req->ulFrameNumber = u32Fn;
-
- mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_SWAP(empty_frame_req);
+ /* No data available, Don't send Empty frame to PHY */
+ rc = 0;
+ goto done;
}
rc = l1if_req_compl(fl1h, l1msg, NULL, NULL);
@@ -618,24 +605,8 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_DATA_CMD_SWAP(data_req);
} else {
- tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *empty_frame_req =
- (tOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD *)
- msgb_put(nmsg, sizeof(*empty_frame_req));
-
- mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_DEF(empty_frame_req);
-
- l1if_fill_msg_hdr(&empty_frame_req->Header, nmsg, fl1h, cOCTVC1_MSG_TYPE_COMMAND,
- cOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CID);
-
- empty_frame_req->TrxId.byTrxId = pinst->u.octphy.trx_id;
- empty_frame_req->LchId.byTimeslotNb = u8Tn;
- empty_frame_req->LchId.bySAPI = sapi;
- empty_frame_req->LchId.bySubChannelNb = subCh;
- empty_frame_req->LchId.byDirection =
- cOCTVC1_GSM_DIRECTION_ENUM_TX_BTS_MS;
- empty_frame_req->ulFrameNumber = u32Fn;
-
- mOCTVC1_GSM_MSG_TRX_REQUEST_LOGICAL_CHANNEL_EMPTY_FRAME_CMD_SWAP(empty_frame_req);
+ /* No data available, Don't send Empty frame to PHY */
+ return 0;
}
return l1if_req_compl(fl1h, nmsg, NULL, NULL);