Re: [PATCH 2/3] OMAP2+ devices add mac address allocation register api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/29/12 16:51, the mail apparently from Arnd Bergmann included:
On Friday 29 June 2012, Andy Green wrote:
+static int omap_panda_netdev_event(struct notifier_block *this,
+                                               unsigned long event, void *ptr)
+{
+       struct net_device *dev = ptr;
+       struct sockaddr sa;
+       int n;
+
+       if (event != NETDEV_REGISTER)
+               return NOTIFY_DONE;
+
+       n = omap_device_path_need_mac(dev->dev.parent);
+       if (n < 0)
+               return NOTIFY_DONE;
+
+       sa.sa_family = dev->type;
+       omap2_die_id_to_ethernet_mac(sa.sa_data, n);
+       dev->netdev_ops->ndo_set_mac_address(dev, &sa);
+
+       return NOTIFY_DONE;
+}
+
+static struct notifier_block omap_panda_netdev_notifier = {
+       .notifier_call = omap_panda_netdev_event,
+       .priority = 1,
+};
+
+int omap_register_mac_device_fixup_paths(const char * const *paths, int count)
+{
+       mac_device_fixup_paths = paths;
+       count_mac_device_fixup_paths = count;
+
+       return register_netdevice_notifier(&omap_panda_netdev_notifier);
+}

The omap_panda_netdev_event and omap_panda_netdev_notifier symbols should probably
lose the "panda_" part of their names, because they are now located in a common
file and are not panda specific any more.

Good point thanks, I'll sort it out after waiting for any more comments.

-Andy

--
Andy Green | TI Landing Team Leader
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106 - http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux