From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751142AbcGNHyp (ORCPT ); Thu, 14 Jul 2016 03:54:45 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34035 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbcGNHyg convert rfc822-to-8bit (ORCPT ); Thu, 14 Jul 2016 03:54:36 -0400 MIME-Version: 1.0 In-Reply-To: <87k2gpnpo5.fsf@miraculix.mork.no> References: <1468427945-11600-1-git-send-email-kristian.evensen@gmail.com> <87k2gpnpo5.fsf@miraculix.mork.no> From: Kristian Evensen Date: Thu, 14 Jul 2016 09:54:33 +0200 Message-ID: Subject: Re: [PATCH] rndis_host: Set random MAC for ZTE MF910 To: =?UTF-8?Q?Bj=C3=B8rn_Mork?= Cc: linux-usb@vger.kernel.org, Network Development , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjørn, On Thu, Jul 14, 2016 at 12:23 AM, Bjørn Mork wrote: > > Or how about the more generic?: > > if (bp[0] & 0x02) > eth_hw_addr_random(net); > else > ether_addr_copy(net->dev_addr, bp); > > That would catch similar screwups from other vendors too. Great idea, thanks. After submitting the patch I found some other devices with a similar bug, and there are probably even more out there. I will update patch and resubmit. -Kristian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kristian Evensen Subject: Re: [PATCH] rndis_host: Set random MAC for ZTE MF910 Date: Thu, 14 Jul 2016 09:54:33 +0200 Message-ID: References: <1468427945-11600-1-git-send-email-kristian.evensen@gmail.com> <87k2gpnpo5.fsf@miraculix.mork.no> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Network Development , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?Q?Bj=C3=B8rn_Mork?= Return-path: In-Reply-To: <87k2gpnpo5.fsf-3F4PFWf5pNjpjLOzFPqGjWGXanvQGlWp@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org Hi Bj=C3=B8rn, On Thu, Jul 14, 2016 at 12:23 AM, Bj=C3=B8rn Mork wrote= : > > Or how about the more generic?: > > if (bp[0] & 0x02) > eth_hw_addr_random(net); > else > ether_addr_copy(net->dev_addr, bp); > > That would catch similar screwups from other vendors too. Great idea, thanks. After submitting the patch I found some other devices with a similar bug, and there are probably even more out there. I will update patch and resubmit. -Kristian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html