Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-16 Thread David Miller
From: Bjørn Mork Date: Fri, 15 Jul 2016 19:42:28 +0200 > David Laight writes: >> From: Bjørn Mork >> Not only that, there certainly used to be manufacturers that used 'locally >> administered' addresses on all their cards (as well as those that used >> unallocated >> address blocks). > > Sure.

Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-15 Thread Bjørn Mork
David Laight writes: > From: Bjørn Mork >> Sent: 13 July 2016 23:23 > ... >> 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 othe

RE: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-15 Thread David Laight
From: Bjørn Mork > Sent: 13 July 2016 23:23 ... > 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. Not really, that

Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-14 Thread Kristian Evensen
On Thu, Jul 14, 2016 at 9:54 AM, Kristian Evensen wrote: > 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->de

Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-14 Thread Kristian Evensen
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

Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-13 Thread Bjørn Mork
Kristian Evensen writes: > From: Kristian Evensen > > All ZTE MF910 mifis, at least on some revisions, export the same MAC > address (36:4b:50:b7:ef:da). Check for this MAC address and set a random > MAC if detected. > > Also, changed the memcpy() to ether_addr_copy(), as pointed out by > checkp

[PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-13 Thread Kristian Evensen
From: Kristian Evensen All ZTE MF910 mifis, at least on some revisions, export the same MAC address (36:4b:50:b7:ef:da). Check for this MAC address and set a random MAC if detected. Also, changed the memcpy() to ether_addr_copy(), as pointed out by checkpatch. Signed-off-by: Kristian Evensen -