[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210929155334.12454-21-shenjian15@huawei.com>
Date: Wed, 29 Sep 2021 23:51:07 +0800
From: Jian Shen <shenjian15@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <andrew@...n.ch>,
<hkallweit1@...il.com>
CC: <netdev@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: [RFCv2 net-next 020/167] net: qlogic: convert the prototype of qlcnic_process_flags
For the origin type for netdev_features_t would be changed to
be unsigned long * from u64, so changes the prototype of
qlcnic_process_flags for adaption.
Signed-off-by: Jian Shen <shenjian15@...wei.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 24 +++++++++----------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index e6ed7f8413b4..2367923e3e3f 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -1020,37 +1020,35 @@ int qlcnic_change_mtu(struct net_device *netdev, int mtu)
return rc;
}
-static netdev_features_t qlcnic_process_flags(struct qlcnic_adapter *adapter,
- netdev_features_t features)
+static void qlcnic_process_flags(struct qlcnic_adapter *adapter,
+ netdev_features_t *features)
{
u32 offload_flags = adapter->offload_flags;
if (offload_flags & BIT_0) {
- features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
- NETIF_F_IPV6_CSUM;
+ *features |= NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
+ NETIF_F_IPV6_CSUM;
adapter->rx_csum = 1;
if (QLCNIC_IS_TSO_CAPABLE(adapter)) {
if (!(offload_flags & BIT_1))
- features &= ~NETIF_F_TSO;
+ *features &= ~NETIF_F_TSO;
else
- features |= NETIF_F_TSO;
+ *features |= NETIF_F_TSO;
if (!(offload_flags & BIT_2))
- features &= ~NETIF_F_TSO6;
+ *features &= ~NETIF_F_TSO6;
else
- features |= NETIF_F_TSO6;
+ *features |= NETIF_F_TSO6;
}
} else {
- features &= ~(NETIF_F_RXCSUM |
+ *features &= ~(NETIF_F_RXCSUM |
NETIF_F_IP_CSUM |
NETIF_F_IPV6_CSUM);
if (QLCNIC_IS_TSO_CAPABLE(adapter))
- features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
+ *features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
adapter->rx_csum = 0;
}
-
- return features;
}
void qlcnic_fix_features(struct net_device *netdev, netdev_features_t *features)
@@ -1061,7 +1059,7 @@ void qlcnic_fix_features(struct net_device *netdev, netdev_features_t *features)
if (qlcnic_82xx_check(adapter) &&
(adapter->flags & QLCNIC_ESWITCH_ENABLED)) {
if (adapter->flags & QLCNIC_APP_CHANGED_FLAGS) {
- *features = qlcnic_process_flags(adapter, *features);
+ qlcnic_process_flags(adapter, features);
} else {
changed = *features ^ netdev->features;
*features ^= changed & (NETIF_F_RXCSUM |
--
2.33.0
Powered by blists - more mailing lists