summaryrefslogtreecommitdiffstats
path: root/meif.c
diff options
context:
space:
mode:
Diffstat (limited to 'meif.c')
-rw-r--r--meif.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/meif.c b/meif.c
index 39e9f62..b0a5830 100644
--- a/meif.c
+++ b/meif.c
@@ -30,6 +30,8 @@
#include "meif.h"
+#define RC_SWITCH_PROTOCOL -4
+
/*
* Utils
*/
@@ -445,7 +447,7 @@ int meif_dispatch(struct meif_message *meif_message)
patch_send_stage = 3;
printf("Ready to switch protocol!\n");
- return -1;
+ return RC_SWITCH_PROTOCOL;
}
break;
case MEIF_NACK_MSG:
@@ -634,4 +636,10 @@ void meif_read_loop(int fd)
meif_message_free(meif_message);
}
}
+
+ switch(rc) {
+ case RC_SWITCH_PROTOCOL:
+ bcm4751_switch_protocol(fd);
+ break;
+ }
}