From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/3] OMAP2+ devices add mac address allocation register api
Date: Fri, 29 Jun 2012 08:51:46 +0000 [thread overview]
Message-ID: <201206290851.47054.arnd@arndb.de> (raw)
In-Reply-To: <20120629055516.11091.82899.stgit@build.warmcat.com>
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.
Arnd
next prev parent reply other threads:[~2012-06-29 8:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 5:55 [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Andy Green
2012-06-29 5:55 ` [PATCH 1/3] OMAP2+: add cpu id register to MAC address helper Andy Green
2012-06-29 9:05 ` Tony Lindgren
2012-06-29 9:13 ` Andy Green
2012-06-29 5:55 ` [PATCH 2/3] OMAP2+ devices add mac address allocation register api Andy Green
2012-06-29 8:51 ` Arnd Bergmann [this message]
2012-06-29 9:03 ` Andy Green
2012-06-29 9:40 ` Tony Lindgren
2012-06-29 10:07 ` Andy Green
2012-06-29 12:03 ` Tony Lindgren
2012-06-29 13:45 ` Arnd Bergmann
2012-06-29 13:55 ` Tony Lindgren
2012-06-29 13:59 ` Andy Green
2012-06-29 14:33 ` Arnd Bergmann
2012-06-29 14:52 ` Tony Lindgren
2012-06-29 15:05 ` Arnd Bergmann
2012-07-01 8:58 ` Tony Lindgren
2012-07-02 7:15 ` Arnd Bergmann
2012-07-02 10:51 ` Tony Lindgren
2012-06-29 14:03 ` Andy Green
2012-06-29 14:38 ` Arnd Bergmann
2012-06-29 5:55 ` [PATCH 3/3] OMAP4 PANDA register ethernet and wlan for automatic mac allocation Andy Green
2012-06-29 11:55 ` Tony Lindgren
2012-06-29 8:50 ` [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206290851.47054.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox