diff mbox

[U-Boot] keystone2: net: add mcast function to keyston2 Ethernet driver

Message ID 1436370961-4375-1-git-send-email-vitalya@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Vitaly Andrianov July 8, 2015, 3:56 p.m. UTC
The MCAST_TFTP support requires that network drivers has mcast functon
implemented. This commit adds dummy keystone2_eth_bcast_addr() to meet
the requirement. As far as the driver doesn't use ALE and doesn't filter
any incoming packets, the function is empty.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
 drivers/net/keystone_net.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Tom Rini July 14, 2015, 10:11 p.m. UTC | #1
On Wed, Jul 08, 2015 at 11:56:01AM -0400, Vitaly Andrianov wrote:

> The MCAST_TFTP support requires that network drivers has mcast functon
> implemented. This commit adds dummy keystone2_eth_bcast_addr() to meet
> the requirement. As far as the driver doesn't use ALE and doesn't filter
> any incoming packets, the function is empty.
> 
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Joe Hershberger July 15, 2015, 6:44 p.m. UTC | #2
Hi Vitaly,

On Wed, Jul 8, 2015 at 10:56 AM, Vitaly Andrianov <vitalya@ti.com> wrote:
> The MCAST_TFTP support requires that network drivers has mcast functon
> implemented. This commit adds dummy keystone2_eth_bcast_addr() to meet
> the requirement. As far as the driver doesn't use ALE and doesn't filter
> any incoming packets, the function is empty.
>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> ---

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tom Rini July 28, 2015, 2:58 p.m. UTC | #3
On Wed, Jul 08, 2015 at 11:56:01AM -0400, Vitaly Andrianov wrote:

> The MCAST_TFTP support requires that network drivers has mcast functon
> implemented. This commit adds dummy keystone2_eth_bcast_addr() to meet
> the requirement. As far as the driver doesn't use ALE and doesn't filter
> any incoming packets, the function is empty.
> 
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index e2adb67..b3ab13d 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -511,6 +511,13 @@  static int keystone2_eth_rcv_packet(struct eth_device *dev)
 	return pkt_size;
 }
 
+#ifdef CONFIG_MCAST_TFTP
+static int keystone2_eth_bcast_addr(struct eth_device *dev, u32 ip, u8 set)
+{
+	return 0;
+}
+#endif
+
 /*
  * This function initializes the EMAC hardware.
  */
@@ -536,6 +543,9 @@  int keystone2_emac_initialize(struct eth_priv_t *eth_priv)
 	dev->halt		= keystone2_eth_close;
 	dev->send		= keystone2_eth_send_packet;
 	dev->recv		= keystone2_eth_rcv_packet;
+#ifdef CONFIG_MCAST_TFTP
+	dev->mcast		= keystone2_eth_bcast_addr;
+#endif
 
 	eth_register(dev);