From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9559DC49ED7 for ; Fri, 20 Sep 2019 07:05:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99F55206C2 for ; Fri, 20 Sep 2019 07:05:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pixelbox.red header.i=@pixelbox.red header.b="DzUbFbp+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394956AbfITHFC (ORCPT ); Fri, 20 Sep 2019 03:05:02 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.166]:34825 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394945AbfITHFC (ORCPT ); Fri, 20 Sep 2019 03:05:02 -0400 X-Greylist: delayed 347 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Sep 2019 03:05:01 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1568963100; s=strato-dkim-0002; d=pixelbox.red; h=Message-Id:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=HPMb6ataDu9MwOHJX7JxT3UqxfE6RZMRznHxEGci/QU=; b=DzUbFbp+tYYrh5NGjmFlYOfFQbey5+C4AO8Wuzni1A5l72DIzm9KqyOApV/xNJi/Wh NepgGJNHmJN9uW/GRtPud9lRDAZCT0q0Lcc1xoF17xiccPMEnJdkJ93+mqNNy+uHCsYm 991Ng1h8hj48FtiUSn+wb0OjlnwWdFGPXXVsHXbiFmPEuYBK8xUAXCMprjD37DsoIEPN ov+0ala5o4guw8kh8EK9I90UwV682uHFNf/eh9If7l3/szcKqOwuEANMSRqx/7UDK8Ef LToxHjvyb2ut0LB7buGJXcnqEvWOwzOlnWgD3OJKIl6DVKesJivp+3NSzPgGvkFzg8e7 8LVw== X-RZG-AUTH: ":PGkAZ0+Ia/aHbZh+i/9QzqYeH5BDcTFH98iPmzDT881S1Jv9Y40I0vUpkEK3poY1KyL7e8vwUVd6rhLT+3nQPD/JTWrS4IlCVOSV0M8=" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 44.27.0 AUTH) with ESMTPSA id w0149ev8K6x06mT (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 20 Sep 2019 08:59:00 +0200 (CEST) From: Peter Fink To: netdev@vger.kernel.org Cc: pfink@christ-es.de, davem@davemloft.net, linux@christ-es.de Subject: net: usb: ax88179_178a: allow passing MAC via DTB Date: Fri, 20 Sep 2019 08:58:29 +0200 Message-Id: <1568962710-14845-1-git-send-email-pedro@pixelbox.red> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peter Fink I adopted the feature to pass the MAC address through device tree from asix_devices.c (introduced in 03fc5d4) to ax88179-based devices. Please have a look if this patch can be accepted. I introduced a new function to avoid code duplication, but I'm not perfectly satisfied with the function name. Suggestions welcome. I'm not totally sure if the use of net->dev_addr and net->perm_addr was correct in the first place or if my understanding is lacking some bits. But I kept the existing behavior as it is working as expected. Patch tested with 4.19, but applies cleanly on net-next. Best regards, Peter -- drivers/net/usb/ax88179_178a.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) -- 2.7.4