From patchwork Fri Jan 6 02:11:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiawen Wu X-Patchwork-Id: 13090788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86DCEC3DA7A for ; Fri, 6 Jan 2023 02:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbjAFCOu (ORCPT ); Thu, 5 Jan 2023 21:14:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjAFCOt (ORCPT ); Thu, 5 Jan 2023 21:14:49 -0500 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12BA61473 for ; Thu, 5 Jan 2023 18:14:46 -0800 (PST) X-QQ-mid: bizesmtp69t1672971281tmlfynaq Received: from wxdbg.localdomain.com ( [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 06 Jan 2023 10:14:32 +0800 (CST) X-QQ-SSF: 01400000000000H0X000000A0000000 X-QQ-FEAT: c42nD1GNGyn7STNizz2PS7BKeW9hxP+EEhHpR84/cf99wQRsSJeihbHCLPVHW 8jh4zVYC6najDrsoBvoD48xBheKTD8v80bBXH4+kx4eZRA7z9SjtKJR7M9YO+GmIgxWBy1X F99pPHRt5F1LqeDqAMi2BOAfO1jFuh2mKsS7Nzb1uPAazyn8B0VfdpPv978UxatLHHpNm6r ONFKsiaIGP/Tkzhjf7wYKq8i1iJBASjrIc3KmM8zqpPI9HWPTlwYxILRVXPSlUDf2vIsaPC Au9ImqRiCQw0HVyiqsLlGTI0hnKcut3NmBwnV9FLBKH4wasPY6nfnjjoEr47KiuYA9MMJv/ 4Xw2+lYAXw2s9Hfan+zzNa9EmtxNdvPhdtXbcO1 X-QQ-GoodBg: 2 From: Jiawen Wu To: netdev@vger.kernel.org, mengyuanlou@net-swift.com Cc: Jiawen Wu Subject: [PATCH net-next v3 0/7] net: wangxun: Adjust code structure Date: Fri, 6 Jan 2023 10:11:38 +0800 Message-Id: <20230106021145.2803126-1-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybglogicsvr:qybglogicsvr5 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Remove useless structs 'txgbe_hw' and 'ngbe_hw' make the codes clear. And move the same codes which sets MAC address between txgbe and ngbe to libwx. Further more, rename struct 'wx_hw' to 'wx' and move total adapter members to wx. Changelog: v3: - Change function parameters to keep two drivers more similar - Add strucure rename patch - Add adapter remove patch v2: - Split patch v1 into separate patches - Fix unreasonable code logic in MAC address operations Jiawen Wu (6): net: ngbe: Remove structure ngbe_hw net: txgbe: Move defines into unified file net: ngbe: Move defines into unified file net: wangxun: Move MAC address handling to libwx net: wangxun: Rename private structure in libwx net: txgbe: Remove structure txgbe_adapter Mengyuan Lou (1): net: ngbe: Remove structure ngbe_adapter drivers/net/ethernet/wangxun/libwx/wx_hw.c | 504 +++++++++++------- drivers/net/ethernet/wangxun/libwx/wx_hw.h | 37 +- drivers/net/ethernet/wangxun/libwx/wx_type.h | 72 ++- drivers/net/ethernet/wangxun/ngbe/ngbe.h | 79 --- drivers/net/ethernet/wangxun/ngbe/ngbe_hw.c | 47 +- drivers/net/ethernet/wangxun/ngbe/ngbe_hw.h | 4 +- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 300 ++++------- drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 68 +-- drivers/net/ethernet/wangxun/txgbe/txgbe.h | 23 - drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 112 ++-- drivers/net/ethernet/wangxun/txgbe/txgbe_hw.h | 6 +- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 326 ++++------- .../net/ethernet/wangxun/txgbe/txgbe_type.h | 26 +- 13 files changed, 702 insertions(+), 902 deletions(-) delete mode 100644 drivers/net/ethernet/wangxun/ngbe/ngbe.h delete mode 100644 drivers/net/ethernet/wangxun/txgbe/txgbe.h