diff mbox

net: usbnet: update addr_assign_type if appropriate

Message ID 1377171946-19133-1-git-send-email-bjorn@mork.no
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Bjørn Mork Aug. 22, 2013, 11:45 a.m. UTC
This module generates a common default address on init,
using eth_random_addr. Set addr_assign_type to let
userspace know the address is random unless it was
overridden by the minidriver.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 drivers/net/usb/usbnet.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Oliver Neukum Aug. 23, 2013, 7:22 a.m. UTC | #1
On Thu, 2013-08-22 at 13:45 +0200, Bjørn Mork wrote:
> This module generates a common default address on init,
> using eth_random_addr. Set addr_assign_type to let
> userspace know the address is random unless it was
> overridden by the minidriver.
> 
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oliver@neukum.org>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjørn Mork Aug. 30, 2013, 6:18 p.m. UTC | #2
Bjørn Mork <bjorn@mork.no> writes:

> This module generates a common default address on init,
> using eth_random_addr. Set addr_assign_type to let
> userspace know the address is random unless it was
> overridden by the minidriver.
>
> Signed-off-by: Bjørn Mork <bjorn@mork.no>

David,

I see that this patch is marked "Changes Requested" in patchworks:
http://patchwork.ozlabs.org/patch/269030/

But I haven't seen any request for changes, only Olivers ack. And that's
all patchworks has recorded as well. Did I miss something?


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Aug. 30, 2013, 6:41 p.m. UTC | #3
From: Bjørn Mork <bjorn@mork.no>
Date: Fri, 30 Aug 2013 20:18:58 +0200

> Bjørn Mork <bjorn@mork.no> writes:
> 
>> This module generates a common default address on init,
>> using eth_random_addr. Set addr_assign_type to let
>> userspace know the address is random unless it was
>> overridden by the minidriver.
>>
>> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> 
> David,
> 
> I see that this patch is marked "Changes Requested" in patchworks:
> http://patchwork.ozlabs.org/patch/269030/
> 
> But I haven't seen any request for changes, only Olivers ack. And that's
> all patchworks has recorded as well. Did I miss something?

Your v2 of this series is all marked as Under Review.

You have to understand, wrt. your initial submission, when someone
asks for changes in one of the patches in a series I mark the whole
series as changes requested.

This gives a second level of reminder that when one patch needs changes
I expect the entire series to be resubmitted.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjørn Mork Aug. 30, 2013, 6:56 p.m. UTC | #4
David Miller <davem@davemloft.net> writes:
> From: Bjørn Mork <bjorn@mork.no>
> Date: Fri, 30 Aug 2013 20:18:58 +0200
>
>> Bjørn Mork <bjorn@mork.no> writes:
>> 
>>> This module generates a common default address on init,
>>> using eth_random_addr. Set addr_assign_type to let
>>> userspace know the address is random unless it was
>>> overridden by the minidriver.
>>>
>>> Signed-off-by: Bjørn Mork <bjorn@mork.no>
>> 
>> David,
>> 
>> I see that this patch is marked "Changes Requested" in patchworks:
>> http://patchwork.ozlabs.org/patch/269030/
>> 
>> But I haven't seen any request for changes, only Olivers ack. And that's
>> all patchworks has recorded as well. Did I miss something?
>
> Your v2 of this series is all marked as Under Review.
>
> You have to understand, wrt. your initial submission, when someone
> asks for changes in one of the patches in a series I mark the whole
> series as changes requested.
>
> This gives a second level of reminder that when one patch needs changes
> I expect the entire series to be resubmitted.

Huh?  This patch was never part of any series.  There are no references
or numbering in it.  I sent it as a standalone patch because the fix was
different and not depending on the other addr_assign_type changes.


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Aug. 30, 2013, 7:14 p.m. UTC | #5
From: Bjørn Mork <bjorn@mork.no>
Date: Fri, 30 Aug 2013 20:56:15 +0200

> David Miller <davem@davemloft.net> writes:
>> From: Bjørn Mork <bjorn@mork.no>
>> Date: Fri, 30 Aug 2013 20:18:58 +0200
>>
>>> Bjørn Mork <bjorn@mork.no> writes:
>>> 
>>>> This module generates a common default address on init,
>>>> using eth_random_addr. Set addr_assign_type to let
>>>> userspace know the address is random unless it was
>>>> overridden by the minidriver.
>>>>
>>>> Signed-off-by: Bjørn Mork <bjorn@mork.no>
>>> 
>>> David,
>>> 
>>> I see that this patch is marked "Changes Requested" in patchworks:
>>> http://patchwork.ozlabs.org/patch/269030/
>>> 
>>> But I haven't seen any request for changes, only Olivers ack. And that's
>>> all patchworks has recorded as well. Did I miss something?
>>
>> Your v2 of this series is all marked as Under Review.
>>
>> You have to understand, wrt. your initial submission, when someone
>> asks for changes in one of the patches in a series I mark the whole
>> series as changes requested.
>>
>> This gives a second level of reminder that when one patch needs changes
>> I expect the entire series to be resubmitted.
> 
> Huh?  This patch was never part of any series.  There are no references
> or numbering in it.  I sent it as a standalone patch because the fix was
> different and not depending on the other addr_assign_type changes.

I was hoping to get this fix, via the series.  When we have multiple instances
of the same bug it makes no sense to just fix one, especially now that you're
done the work to do all of them already.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjørn Mork Aug. 30, 2013, 7:19 p.m. UTC | #6
David Miller <davem@davemloft.net> writes:

> I was hoping to get this fix, via the series.  When we have multiple instances
> of the same bug it makes no sense to just fix one, especially now that you're
> done the work to do all of them already.

I see.  Sorry for not catching that earlier.


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index e4811d7..74a8e3c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1629,6 +1629,10 @@  usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 		dev->rx_urb_size = dev->hard_mtu;
 	dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
 
+	/* let userspace know we have a random address */
+	if (ether_addr_equal(net->dev_addr, node_id))
+		net->addr_assign_type = NET_ADDR_RANDOM;
+
 	if ((dev->driver_info->flags & FLAG_WLAN) != 0)
 		SET_NETDEV_DEVTYPE(net, &wlan_type);
 	if ((dev->driver_info->flags & FLAG_WWAN) != 0)