net: wangxun: Replace the judgement of MAC type with flags
authorJiawen Wu <jiawenwu@trustnetic.com>
Fri, 21 Feb 2025 06:57:18 +0000 (14:57 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Feb 2025 02:13:00 +0000 (18:13 -0800)
commita3ad653c915990fcbb72f9d41c94628255278abc
tree4fa496e43f44686005fb9cafdf1db3520012ce2a
parent2e5af6b2ae85328051f2ecb1b7fe64cdd835c8e9
net: wangxun: Replace the judgement of MAC type with flags

Since device MAC types are constantly being added, the judgments of
wx->mac.type are complex. Try to convert the types to flags depending
on functions.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20250221065718.197544-2-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/libwx/wx_ethtool.c
drivers/net/ethernet/wangxun/libwx/wx_hw.c
drivers/net/ethernet/wangxun/libwx/wx_type.h
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c