[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJ7U8D1Ej63lX06g@corigine.com>
Date: Fri, 30 Jun 2023 15:13:20 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Vivek Pernamitta <quic_vpernami@...cinc.com>
Cc: mhi@...ts.linux.dev, mrana@...cinc.com, quic_qianyu@...cinc.com,
manivannan.sadhasivam@...aro.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V1] net: mhi : Add support to enable ethernet interface
On Fri, Jun 30, 2023 at 03:14:41PM +0530, Vivek Pernamitta wrote:
> Add support to enable ethernet interface for MHI SWIP channels.
>
> Signed-off-by: Vivek Pernamitta <quic_vpernami@...cinc.com>
...
> @@ -301,11 +318,17 @@ static void mhi_net_rx_refill_work(struct work_struct *work)
> schedule_delayed_work(&mhi_netdev->rx_refill, HZ / 2);
> }
>
> -static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev)
> +static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev, bool eth_dev)
> {
> struct mhi_net_dev *mhi_netdev;
> int err;
>
> + if (eth_dev) {
> + eth_random_addr(ndev->dev_addr);
> + if (!is_valid_ether_addr(ndev->dev_addr))
> + return -EADDRNOTAVAIL;
> + }
Hi Vivek,
This doesn't seem right.
As GCC points out, dev_addr is const.
And I don't think eth_random_addr() produces invalid addresses.
Perhaps you want eth_hw_addr_random() here.
As was mentioned elsewhere in this thread, net-next, is closed.
So please post a v2 once it re-opens, after 10th July.
--
pw-bot: changes-requested
Powered by blists - more mailing lists