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.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 D634BC32792 for ; Mon, 30 Sep 2019 12:04:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15EFE2086A for ; Mon, 30 Sep 2019 12:04:42 +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="rFPp1PUO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730172AbfI3MEl (ORCPT ); Mon, 30 Sep 2019 08:04:41 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.162]:20030 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfI3MEk (ORCPT ); Mon, 30 Sep 2019 08:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1569845075; 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=YFs2nW85v53bCTBvhL2RV3+dwFi2cEslKs2w/Xp/G4k=; b=rFPp1PUOWM+kwJCNG0UzReeM/GgGko44wxVk3/rinAWEw1Rdz6B+GxTzdnvPkkpZTy w8kC7JUMilb6zwJf7gAlIFuiIflxQCx20SidjllDOCpapIutDl5afeKb1+xkiVP5wh1B Q1EHhcj/F5ykf4+sFawGEIhZHPR/ME90rrdy/EgoYOhsN4s969QJJOxg/G34IqcjDcJl MnSwWeLRNKcoulY5FUIE+LiusTCskoE+3XypA4DqwgIhumsJgUehXufl4Y3y3uSPOa41 xywiTEW2LfeD759JjjC0oN7TH/QfN0iLRGBBgHisxstr1zAUGrKzIyg9nSgkeNXxIoI6 KdvA== 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.28.0 AUTH) with ESMTPSA id d0520cv8UC4TJ7R (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); Mon, 30 Sep 2019 14:04:29 +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: Mon, 30 Sep 2019 14:04:02 +0200 Message-Id: <1569845043-27318-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 This is a resend of the following patch as net-next was closed before: 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