public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Danny Kukawka <danny.kukawka@bisect•de>
To: Oliver Neukum <oliver@neukum•org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation•org>,
	linux-usb@vger•kernel.org,
	"David S. Miller" <davem@davemloft•net>,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH 37/50] usbnet: set addr_assign_type if random_ether_addr() used
Date: Wed, 8 Feb 2012 22:41:33 +0100	[thread overview]
Message-ID: <201202082241.35654.danny.kukawka@bisect.de> (raw)
In-Reply-To: <201202082230.19936.oliver@neukum.org>

On Mittwoch, 8. Februar 2012, Oliver Neukum wrote:
> Am Mittwoch, 8. Februar 2012, 22:10:44 schrieb Danny Kukawka:
> > Set addr_assign_type correctly to NET_ADDR_RANDOM in case
> > a random MAC address was generated and assigned to the netdevice.
> >
> > Signed-off-by: Danny Kukawka <danny.kukawka@bisect•de>
> > ---
> >  drivers/net/usb/usbnet.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> > index fae0fbd..7bd07d7 100644
> > --- a/drivers/net/usb/usbnet.c
> > +++ b/drivers/net/usb/usbnet.c
> > @@ -1365,6 +1365,7 @@ usbnet_probe (struct usb_interface *udev, const
> > struct usb_device_id *prod) dev->net = net;
> >  	strcpy (net->name, "usb%d");
> >  	memcpy (net->dev_addr, node_id, sizeof node_id);
> > +	net->addr_assign_type |= NET_ADDR_RANDOM;
> >
> >  	/* rx and tx sides can use different message sizes;
> >  	 * bind() should set rx_urb_size in that case.
>
> Don't you set the flag too early here? By that time we don't know
> whether the device provides a real MAC, do we?

You're right. Maybe it's the wrong place. Better the drivers take care of 
setting the correct addr_assign_type. 

Danny

  reply	other threads:[~2012-02-08 21:41 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 21:10 [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if a random mac address get assigned to a netdevice Danny Kukawka
2012-02-08 21:10 ` [PATCH 01/50] eth: reset addr_assign_type if eth_mac_addr() called Danny Kukawka
2012-02-08 22:50   ` Stephen Hemminger
2012-02-08 22:57     ` Danny Kukawka
2012-02-08 21:10 ` [PATCH 02/50] smsc95xx: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-09 10:51   ` Sergei Shtylyov
2012-02-08 21:10 ` [PATCH 03/50] smsc75xx: se " Danny Kukawka
2012-02-08 21:10 ` [PATCH 04/50] adi/blackfin: set addr_assign_type correctly if random Danny Kukawka
2012-02-09  3:28   ` Bob Liu
2012-02-09  4:05   ` Mike Frysinger
2012-02-08 21:10 ` [PATCH 06/50] dummy: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 07/50] au1000_eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 08/50] bnx2x: " Danny Kukawka
2012-02-09  9:59   ` David Laight
2012-02-08 21:10 ` [PATCH 09/50] Cadence MACB: " Danny Kukawka
2012-02-09  8:24   ` Nicolas Ferre
2012-02-08 21:10 ` [PATCH 10/50] Calxeda XGMAC: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 11/50] ep93xx: " Danny Kukawka
2012-02-08 21:29   ` H Hartley Sweeten
2012-02-08 21:10 ` [PATCH 12/50] dm9000: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 13/50] dnet: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 14/50] ethoc: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:10 ` [PATCH 15/50] lantiq_etop: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 16/50] pxa168_eth: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 17/50] enc28j60: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 18/50] mipsnet: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 19/50] macsonic: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 20/50] smsc911x: " Danny Kukawka
2012-02-09 11:28   ` Mark Brown
2012-02-08 21:10 ` [PATCH 21/50] smsc9420: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 22/50] r6040: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 23/50] efx: " Danny Kukawka
2012-02-08 21:29   ` Ben Hutchings
2012-02-08 21:10 ` [PATCH 24/50] sis900: " Danny Kukawka
2012-02-11  9:05   ` Daniele Venzano
2012-02-08 21:10 ` [PATCH 25/50] via-rhine: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 26/50] faraday: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 27/50] davinci_emac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 28/50] forcedeth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 29/50] micrel eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 30/50] atheros eth: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:10 ` [PATCH 31/50] tc35815: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 32/50] tile_net: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 33/50] stmmac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 34/50] xilinx ll_temac: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 35/50] ifb: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 36/50] igbvf: reset netdevice addr_assign_type if changed from random Danny Kukawka
2012-02-08 21:10 ` [PATCH 37/50] usbnet: set addr_assign_type if random_ether_addr() used Danny Kukawka
2012-02-08 21:30   ` Oliver Neukum
2012-02-08 21:41     ` Danny Kukawka [this message]
2012-02-09  6:57     ` Bjørn Mork
2012-02-09 14:55       ` Oliver Neukum
2012-02-08 21:10 ` [PATCH 39/50] veth: use dev_hw_addr_random() instead of random_ether_addr() Danny Kukawka
2012-02-08 21:10 ` [PATCH 40/50] batman-adv: " Danny Kukawka
     [not found]   ` <1328735457-29986-41-git-send-email-danny.kukawka-2YacvwyR+KOzQB+pC5nmwQ@public.gmane.org>
2012-02-09  8:44     ` Sven Eckelmann
2012-02-11 11:12     ` Marek Lindner
2012-02-08 21:10 ` [PATCH 41/50] l2tp_eth: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 42/50] virtio_net: " Danny Kukawka
2012-02-09  9:35   ` Michael S. Tsirkin
2012-02-08 21:10 ` [PATCH 43/50] macvlan: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 44/50] team: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 45/50] tun: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 46/50] wan: " Danny Kukawka
2012-02-09 14:12   ` Krzysztof Halasa
2012-02-08 21:10 ` [PATCH 47/50] bridge: " Danny Kukawka
2012-02-08 22:52   ` Stephen Hemminger
2012-02-08 21:10 ` [PATCH 48/50] ip_gre.c: " Danny Kukawka
     [not found] ` <1328735457-29986-1-git-send-email-danny.kukawka-2YacvwyR+KOzQB+pC5nmwQ@public.gmane.org>
2012-02-08 21:10   ` [PATCH 49/50] openvswitch: " Danny Kukawka
2012-02-08 21:10 ` [PATCH 50/50] " Danny Kukawka
2012-02-08 22:58 ` [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if a random mac address get assigned to a netdevice Stephen Hemminger
2012-02-09 14:59   ` Danny Kukawka
2012-02-09 16:06     ` Stephen Hemminger
2012-02-08 23:29 ` David Miller
2012-02-09 12:18   ` Danny Kukawka
2012-02-09 18:37     ` David Miller

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=201202082241.35654.danny.kukawka@bisect.de \
    --to=danny.kukawka@bisect$(echo .)de \
    --cc=davem@davemloft$(echo .)net \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oliver@neukum$(echo .)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