Commit 16309bc4 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Alessandro Rubini

spec main-loop: spec_recv_packet calling update

parent 3548d7cd
......@@ -23,11 +23,13 @@ void spec_main_loop(struct pp_instance *ppi)
while (1) {
unsigned char packet[1500];
/* Wait for a packet or for the timeout */
pp_printf("wait for packet\n");
while (delay_ms && !minic_poll_rx()) {
spec_udelay(1000);
delay_ms--;
}
if (!minic_poll_rx()) {
pp_printf("timeout\n");
delay_ms = pp_state_machine(ppi, NULL, 0);
continue;
}
......@@ -35,7 +37,7 @@ void spec_main_loop(struct pp_instance *ppi)
* We got a packet. If it's not ours, continue consuming
* the pending timeout
*/
i = spec_recv_packet(ppi, packet, sizeof(packet));
i = spec_recv_packet(ppi, packet, sizeof(packet), NULL);
if (0) {
int j;
pp_printf("recvd: %i\n", i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment