@@ -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 |
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@huawei.com> --- .../net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-)