[PATCH] firmware/rssi: attempt to resync on sync errors

Nico Golde osmocom at ngolde.de
Mon Jul 9 15:32:17 UTC 2012


---
 src/target/firmware/apps/rssi/main.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/target/firmware/apps/rssi/main.c b/src/target/firmware/apps/rssi/main.c
index b2cafae..8907cce 100644
--- a/src/target/firmware/apps/rssi/main.c
+++ b/src/target/firmware/apps/rssi/main.c
@@ -763,6 +763,7 @@ static int inc_dec_spectrum(int inc)
 
 static void enter_sync(void);
 static void exit_sync(void);
+static void retry_sync(void);
 
 static void enter_rach(void);
 static void exit_rach(void);
@@ -987,6 +988,13 @@ static void handle_pm(void)
 
 /* sync / SI */
 
+static void retry_sync(void)
+{
+	exit_sync();
+	toggle_dcs_pcs();
+	enter_sync();
+}
+
 static void enter_sync(void)
 {
 	struct msgb *msg = l1ctl_msgb_alloc(L1CTL_FBSB_REQ);
@@ -1414,8 +1422,10 @@ static void l1a_l23_tx(struct msgb *msg)
 		sb = (struct l1ctl_fbsb_conf *) dl->payload;
 		if (sb->result == 0)
 			sync_result = "ok";
-		else
+		else {
 			sync_result = "error";
+			retry_sync();
+		}
 		bsic = sb->bsic;
 		break;
 	case L1CTL_DATA_IND:
-- 
1.7.10





More information about the baseband-devel mailing list