summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2026-07-25 22:41:40 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-07-30 11:36:46 +0200
commit0040ff44cd5b59f85ea2feac9ad6b6d9eed66833 (patch)
treec907e7450c56edd7283d87912b2ceffe5cf94dff
parentac84c855180104e5d8928dc56a4895fb2207f5ff (diff)
net: airoha: rename airoha_priv_flags to airoha_dev_flags
Rename the airoha_priv_flags enum to airoha_dev_flags and the AIROHA_PRIV_F_WAN flag to AIROHA_DEV_F_WAN. The "priv_flags" naming dates back to an earlier design that used ethtool private flags; since this series switched to tc qdisc offload for LAN/WAN configuration, align the naming to reflect that these are per-device flags rather than ethtool private flags. While at it, switch to test_bit()/set_bit()/clear_bit() APIs and convert the flags field from u32 to unsigned long to make flags manipulation atomic. Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260725-airoha-ethtool-priv_flags-v12-1-5136a30b2157@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/ethernet/airoha/airoha_eth.c2
-rw-r--r--drivers/net/ethernet/airoha/airoha_eth.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index 79418e682f71..d9a44a11d8db 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -2078,7 +2078,7 @@ static int airoha_dev_init(struct net_device *netdev)
fallthrough;
case AIROHA_GDM2_IDX:
/* GDM2 is always used as wan */
- dev->flags |= AIROHA_PRIV_F_WAN;
+ set_bit(AIROHA_DEV_F_WAN, &dev->flags);
break;
default:
break;
diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
index fe934f9ffe8a..24dd16fc509a 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.h
+++ b/drivers/net/ethernet/airoha/airoha_eth.h
@@ -570,8 +570,8 @@ struct airoha_qdma {
DECLARE_BITMAP(qos_channel_map, AIROHA_NUM_QOS_CHANNELS);
};
-enum airoha_priv_flags {
- AIROHA_PRIV_F_WAN = BIT(0),
+enum airoha_dev_flags {
+ AIROHA_DEV_F_WAN,
};
struct airoha_gdm_dev {
@@ -584,7 +584,7 @@ struct airoha_gdm_dev {
u64 cpu_tx_packets;
u64 fwd_tx_packets;
- u32 flags;
+ unsigned long flags;
int nbq;
struct airoha_hw_stats stats;
@@ -694,7 +694,7 @@ static inline u16 airoha_qdma_get_txq(struct airoha_qdma *qdma, u16 qid)
static inline bool airoha_is_lan_gdm_dev(struct airoha_gdm_dev *dev)
{
- return !(dev->flags & AIROHA_PRIV_F_WAN);
+ return !test_bit(AIROHA_DEV_F_WAN, &dev->flags);
}
static inline bool airoha_is_7581(struct airoha_eth *eth)