From patchwork Wed Dec 14 06:41:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiawen Wu X-Patchwork-Id: 13072802 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 CE0C1C4332F for ; Wed, 14 Dec 2022 06:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237365AbiLNGnz (ORCPT ); Wed, 14 Dec 2022 01:43:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbiLNGnw (ORCPT ); Wed, 14 Dec 2022 01:43:52 -0500 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57ECB10B63 for ; Tue, 13 Dec 2022 22:43:48 -0800 (PST) X-QQ-mid: bizesmtp70t1671000223tp2d13u5 Received: from wxdbg.localdomain.com ( [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 14 Dec 2022 14:43:33 +0800 (CST) X-QQ-SSF: 01400000000000H0X000B00A0000000 X-QQ-FEAT: ZkxZBO9qcf7jaEkQ93zhTzli7kp/N2nOjtCb1z4hloNRDEWlMWDkMBlCvWksI ftiO2UpLp4bcExZZNp5uVD2gPelGYk6qFWMdZT2q9ObdQ36FV67rX40N4zjl0t9IRODviez rq1S6UKMUxgOGPB7tcIfW7BxJuobCVCc60dNV6meSUplyGIq/xSoqfji2+UDzUdF9sVXeK1 kKYV2ji9QNbjjuWBJdQEUvuIDLB1ePj+JPLK3I7Be//i6ar9IsjLgmpfjEwVv77lE9t+Z1e ahQekSUQj/3ITylWC0UR5LL7gognZF3Q06kILgS0N0N+IEWlytB6BjANJz3H9tfCx/HtH7C bqLF9MSpH5inW1XBd75kCH4c5jwcwrrIpgIvkFo X-QQ-GoodBg: 2 From: Jiawen Wu To: netdev@vger.kernel.org, mengyuanlou@net-swift.com Cc: Jiawen Wu Subject: [PATCH net v2 0/5] net: wangxun: Adjust code structure Date: Wed, 14 Dec 2022 14:41:28 +0800 Message-Id: <20221214064133.2424570-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. Changelog: v2: - Split patch v1 into separate patches - Fix unreasonable code logic in MAC address operations Jiawen Wu (5): net: txgbe: Remove structure txgbe_hw 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 drivers/net/ethernet/wangxun/libwx/wx_hw.c | 116 +++++++++++- drivers/net/ethernet/wangxun/libwx/wx_hw.h | 5 +- drivers/net/ethernet/wangxun/libwx/wx_type.h | 12 ++ drivers/net/ethernet/wangxun/ngbe/ngbe.h | 79 -------- drivers/net/ethernet/wangxun/ngbe/ngbe_hw.c | 21 +-- drivers/net/ethernet/wangxun/ngbe/ngbe_hw.h | 4 +- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 125 ++++--------- drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 58 +++++- drivers/net/ethernet/wangxun/txgbe/txgbe.h | 43 ----- drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 36 ++-- drivers/net/ethernet/wangxun/txgbe/txgbe_hw.h | 6 +- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 174 +++--------------- .../net/ethernet/wangxun/txgbe/txgbe_type.h | 22 ++- 13 files changed, 296 insertions(+), 405 deletions(-) delete mode 100644 drivers/net/ethernet/wangxun/ngbe/ngbe.h delete mode 100644 drivers/net/ethernet/wangxun/txgbe/txgbe.h