On Tue, Sep 10, 2024 at 1:36 PM Jijie Shao <shaojijie@xxxxxxxxxx> wrote:
+++ b/net/core/dev.c[Kalesh] It would be better to move this code after
@@ -9087,6 +9087,11 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
return -EOPNOTSUPP;
if (sa->sa_family != dev->type)
return -EINVAL;
+ if (ops->ndo_validate_addr) {
+ err = ops->ndo_validate_addr(dev);
+ if (err)
+ return err;
+ }
netif_device_present() check. Minor nit and there will not be any
functional impact.