mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-12-29 03:24:36 +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:
parent
2c7d06f6f2
commit
e17881c91b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user