mcf_fec: Drop mcf_fec_can_receive
commite813f0d8813944061fa9bde861cf6899379843e6
authorFam Zheng <famz@redhat.com>
Wed, 15 Jul 2015 10:19:08 +0000 (15 18:19 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 27 Jul 2015 13:12:18 +0000 (27 14:12 +0100)
treec13196af225190f0efc22fe1208067391e4de28b
parent575bafd1f387c5f06b59cf2515f6bb1eff9d119d
mcf_fec: Drop mcf_fec_can_receive

The semantics of .can_receive requires us to flush the queue explicitly
when s->rx_enabled becomes true after it returns 0, but the packet being
queued is not meaningful since the guest hasn't activated the card.
Let's just drop the packet in this case.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Message-id: 1436955553-22791-8-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/mcf_fec.c