mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/net: Make NetCanReceive() return a boolean
The NetCanReceive handler return whether the device can or can not receive new packets. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
3317db7439
commit
b8c4b67e3e
20 changed files with 45 additions and 48 deletions
|
@ -657,11 +657,11 @@ static void sunhme_transmit(SunHMEState *s)
|
|||
sunhme_update_irq(s);
|
||||
}
|
||||
|
||||
static int sunhme_can_receive(NetClientState *nc)
|
||||
static bool sunhme_can_receive(NetClientState *nc)
|
||||
{
|
||||
SunHMEState *s = qemu_get_nic_opaque(nc);
|
||||
|
||||
return s->macregs[HME_MACI_RXCFG >> 2] & HME_MAC_RXCFG_ENABLE;
|
||||
return !!(s->macregs[HME_MACI_RXCFG >> 2] & HME_MAC_RXCFG_ENABLE);
|
||||
}
|
||||
|
||||
static void sunhme_link_status_changed(NetClientState *nc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue