From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753231AbcGSH6x (ORCPT ); Tue, 19 Jul 2016 03:58:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:53314 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbcGSH6v (ORCPT ); Tue, 19 Jul 2016 03:58:51 -0400 Message-ID: <1468912620.2178.5.camel@suse.com> Subject: Re: [PATCH net-next] cdc_ether: Improve ZTE MF823/831/910 handling From: Oliver Neukum To: Kristian Evensen Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Network Development In-Reply-To: References: <1468844691-8222-1-git-send-email-kristian.evensen@gmail.com> <1468846886.2280.6.camel@suse.com> <1468849802.2280.11.camel@suse.com> <1468851242.2280.14.camel@suse.com> <1468909209.2178.0.camel@suse.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 19 Jul 2016 09:17:00 +0200 Mime-Version: 1.0 X-Mailer: Evolution 3.12.11 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-07-19 at 08:40 +0200, Kristian Evensen wrote: > On Tue, Jul 19, 2016 at 8:20 AM, Oliver Neukum wrote: > >> I had a look at some other drivers, and I think we need to be very > >> careful about making setting a random MAC too generic. For example, we > >> might be unlucky and break the possibly_iphdr()-code/assumption in > >> qmi_wwan.c. And there is probably more code/assumptions like that in > >> the network stack. > > > > In this case please use special cases for usbnet, too. > > We need a quirk. > > I guess I can match on the VID/PID in usbnet, but won't it be cleaner > to add a new bind() function (in cdc_ether) which matches the two PIDs > and leave usbnet as is? Or am I misunderstanding how to add this > functionality to usbnet? It would be cleaner, but it seems to me that multiple quirky devices driven by diverse drivers use those bogus MACs. If you want to catch them at a central place, it has to be usbnet. It is a matter of taste. I am fine with either solution. Regards Oliver