1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-25 17:43:09 +02:00

tools/dirtpan/dirtpan.c (rx_pck): break tie if both sides are in s_tx

Note that we still waste at least one perfectly good frame. However,
instead of implementing some fancy arbitration, it's better if we
just make the whole thing bidirectional in the future.
This commit is contained in:
Werner Almesberger 2011-05-11 16:29:26 -03:00
parent 2c7d06f6f2
commit e17881c91b

View File

@ -263,6 +263,14 @@ static void rx_pck(void *buf, int size)
send_ack(seq);
switch (state) {
case s_tx:
if (type == pt_first) {
/*
* @@@ Not optimal - we break the tie but lose a
* perfectly good frame.
*/
state = s_idle;
return;
}
if (type != pt_ack)
return;
if (seq != my_seq)