Skip to contentSkip to conversation

hw/net: Drop unnecessary .can_receive functions

PATCH Applied Fam Zheng 3 participants 7 messages Jul 1, 2015 – Jul 20, 2015

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

cover hw/net: Drop unnecessary .can_receive functions

These are all repeating the default, and since we're cleaning up .can_receive, let's get these out of the way.

Fam

Fam Zheng (3):
musicpal: Drop eth_can_receive
etraxfs_eth: Drop eth_can_receive
lan9118: Drop lan9118_can_receive

 hw/arm/musicpal.c    | 6 ------
 hw/net/etraxfs_eth.c | 6 ------
 hw/net/lan9118.c     | 6 ------
 3 files changed, 18 deletions(-)
Signature · 1 line
2.4.3
author
#1 lore raw

PATCH 1/3 musicpal: Drop eth_can_receive

True is the default.

---
 hw/arm/musicpal.c | 6 ------
 1 file changed, 6 deletions(-)
hw/arm/musicpal.c +0 -6
index a3b1314..42f66b3 100644
@@ -187,11 +187,6 @@ static void eth_rx_desc_get(uint32_t addr, mv88w8618_rx_desc *desc)
     le32_to_cpus(&desc->next);
 }
 
-static int eth_can_receive(NetClientState *nc)
-{
-    return 1;
-}
-
 static ssize_t eth_receive(NetClientState *nc, const uint8_t *buf, size_t size)
 {
     mv88w8618_eth_state *s = qemu_get_nic_opaque(nc);
@@ -381,7 +376,6 @@ static void eth_cleanup(NetClientState *nc)
 static NetClientInfo net_mv88w8618_info = {
     .type = NET_CLIENT_OPTIONS_KIND_NIC,
     .size = sizeof(NICState),
-    .can_receive = eth_can_receive,
     .receive = eth_receive,
     .cleanup = eth_cleanup,
 };
Signature · 1 line
2.4.3
author
#2 lore raw

PATCH 2/3 etraxfs_eth: Drop eth_can_receive

In reply to Fam Zheng

True is the default.

---
 hw/net/etraxfs_eth.c | 6 ------
 1 file changed, 6 deletions(-)
hw/net/etraxfs_eth.c +0 -6
index 4773dea..d600275 100644
@@ -520,11 +520,6 @@ static int eth_match_groupaddr(ETRAXFSEthState *eth, const unsigned char *sa)
     return match;
 }
 
-static int eth_can_receive(NetClientState *nc)
-{
-    return 1;
-}
-
 static ssize_t eth_receive(NetClientState *nc, const uint8_t *buf, size_t size)
 {
     unsigned char sa_bcast[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@@ -584,7 +579,6 @@ static const MemoryRegionOps eth_ops = {
 static NetClientInfo net_etraxfs_info = {
     .type = NET_CLIENT_OPTIONS_KIND_NIC,
     .size = sizeof(NICState),
-    .can_receive = eth_can_receive,
     .receive = eth_receive,
     .link_status_changed = eth_set_link,
 };
Signature · 1 line
2.4.3
author
#3 lore raw

PATCH 3/3 lan9118: Drop lan9118_can_receive

In reply to Fam Zheng

True is the default.

---
 hw/net/lan9118.c | 6 ------
 1 file changed, 6 deletions(-)
hw/net/lan9118.c +0 -6
index f169c38..4f0e840 100644
@@ -461,11 +461,6 @@ static void lan9118_reset(DeviceState *d)
     lan9118_reload_eeprom(s);
 }
 
-static int lan9118_can_receive(NetClientState *nc)
-{
-    return 1;
-}
-
 static void rx_fifo_push(lan9118_state *s, uint32_t val)
 {
     int fifo_pos;
@@ -1312,7 +1307,6 @@ static const MemoryRegionOps lan9118_16bit_mem_ops = {
 static NetClientInfo net_lan9118_info = {
     .type = NET_CLIENT_OPTIONS_KIND_NIC,
     .size = sizeof(NICState),
-    .can_receive = lan9118_can_receive,
     .receive = lan9118_receive,
     .link_status_changed = lan9118_set_link,
 };
Signature · 1 line
2.4.3
author
#4 lore raw
In reply to Fam Zheng
Quoted 2 lines · Fam Zheng

These are all repeating the default, and since we're cleaning up .can_receive, let's get these out of the way.

Cc'ing net maintainers.

Fam

Reviewed-by on the v1 series
#5 lore raw
In reply to Fam Zheng
Quoted 11 lines · Fam Zheng

These are all repeating the default, and since we're cleaning up .can_receive, let's get these out of the way.

Fam

Fam Zheng (3):
musicpal: Drop eth_can_receive
etraxfs_eth: Drop eth_can_receive
lan9118: Drop lan9118_can_receive

Quoted 5 lines
 hw/arm/musicpal.c    | 6 ------
 hw/net/etraxfs_eth.c | 6 ------
 hw/net/lan9118.c     | 6 ------
 3 files changed, 18 deletions(-)
#6 lore raw
In reply to Fam Zheng
Quoted 11 lines · Fam Zheng

These are all repeating the default, and since we're cleaning up .can_receive, let's get these out of the way.

Fam

Fam Zheng (3):
musicpal: Drop eth_can_receive
etraxfs_eth: Drop eth_can_receive
lan9118: Drop lan9118_can_receive

Quoted 9 lines
 hw/arm/musicpal.c    | 6 ------
 hw/net/etraxfs_eth.c | 6 ------
 hw/net/lan9118.c     | 6 ------
 3 files changed, 18 deletions(-)
Signature · 1 line
2.4.3

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan