mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-29 11:11:53 +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);
|
send_ack(seq);
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case s_tx:
|
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)
|
if (type != pt_ack)
|
||||||
return;
|
return;
|
||||||
if (seq != my_seq)
|
if (seq != my_seq)
|
||||||
|
Loading…
Reference in New Issue
Block a user