[PATCH] osmo-bts[master]: octphy: do not send empty frames to phy

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Jun 26 16:32:12 UTC 2017


Review at  https://gerrit.osmocom.org/3060

octphy: do not send empty frames to phy

ph_data_req() and ph_tch_req() are generating empty frames when
no data (msg == NULL) is available. Remove the empty frame
generation and exit the function cleanly.

(Patch by Octasic Inc.)

Change-Id: Ib857b7dab490ad426c48d6a9e5e6fa10ef5a0838
---
M src/osmo-bts-octphy/l1_if.c
1 file changed, 5 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/3060/1

diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c
index 8b31630..c36b701 100644
--- a/src/osmo-bts-octphy/l1_if.c
+++ b/src/osmo-bts-octphy/l1_if.c
@@ -536,22 +536,9 @@
 
 		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 @@
 
 		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);

-- 
To view, visit https://gerrit.osmocom.org/3060
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib857b7dab490ad426c48d6a9e5e6fa10ef5a0838
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list