Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932216Ab2BHVVr (ORCPT ); Wed, 8 Feb 2012 16:21:47 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:34229 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932196Ab2BHVVm (ORCPT ); Wed, 8 Feb 2012 16:21:42 -0500 From: Danny Kukawka To: Felipe Balbi Cc: Danny Kukawka , Greg Kroah-Hartman , linux-usb@vger.kernel.org, "David S. Miller" , linux-kernel@vger.kernel.org Subject: [PATCH 38/50] g_ether: set addr_assign_type if random_ether_addr() used Date: Wed, 8 Feb 2012 22:10:45 +0100 Message-Id: <1328735457-29986-39-git-send-email-danny.kukawka@bisect.de> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1328735457-29986-1-git-send-email-danny.kukawka@bisect.de> References: <1328735457-29986-1-git-send-email-danny.kukawka@bisect.de> X-bounce-key: webpack.hosteurope.de;danny.kukawka@bisect.de;1328736102;9f8add73; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1177 Lines: 33 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 --- drivers/usb/gadget/u_ether.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 29c854b..984a1be 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c @@ -782,9 +782,11 @@ int gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN]) dev->net = net; strcpy(net->name, "usb%d"); - if (get_ether_addr(dev_addr, net->dev_addr)) + if (get_ether_addr(dev_addr, net->dev_addr)) { + net->addr_assign_type |= NET_ADDR_RANDOM; dev_warn(&g->dev, "using random %s ethernet address\n", "self"); + } if (get_ether_addr(host_addr, dev->host_mac)) dev_warn(&g->dev, "using random %s ethernet address\n", "host"); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/