@@ -2400,7 +2400,7 @@ static int hns3_nic_set_features(struct net_device *netdev,
bool enable;
int ret;
- changed = netdev->active_features ^ features;
+ changed = netdev_active_features_xor(netdev, features);
if (changed & (NETIF_F_GRO_HW) && h->ae_algo->ops->set_gro_en) {
enable = !!(features & NETIF_F_GRO_HW);
@@ -226,7 +226,7 @@ int efx_set_features(struct net_device *net_dev, netdev_features_t data)
/* If Rx VLAN filter is changed, update filters via mac_reconfigure.
* If rx-fcs is changed, mac_reconfigure updates that too.
*/
- tmp = net_dev->active_features ^ data;
+ tmp = netdev_active_features_xor(net_dev, data);
if (tmp & NETIF_F_HW_VLAN_CTAG_FILTER ||
tmp & NETIF_F_RXFCS) {
/* efx_set_rx_mode() will schedule MAC work to update filters
@@ -2202,7 +2202,7 @@ static int ef4_set_features(struct net_device *net_dev, netdev_features_t data)
}
/* If Rx VLAN filter is changed, update filters via mac_reconfigure */
- tmp = net_dev->active_features ^ data;
+ tmp = netdev_active_features_xor(net_dev, data);
if (tmp & NETIF_F_HW_VLAN_CTAG_FILTER) {
/* ef4_set_rx_mode() will schedule MAC work to update filters
* when a new features are finally set in net_dev.
@@ -5418,7 +5418,7 @@ static inline netdev_features_t netdev_intersect_features(netdev_features_t f1,
{
netdev_features_t tmp;
- tmp = f1 ^ f2;
+ tmp = netdev_features_xor(f1, f2);
if (tmp & NETIF_F_HW_CSUM) {
if (f1 & NETIF_F_HW_CSUM)
netdev_features_direct_or(&f1, netdev_ip_csum_features);
@@ -9625,7 +9625,7 @@ int __netdev_update_features(struct net_device *dev)
if (!err) {
netdev_features_t diff;
- diff = features ^ dev->active_features;
+ diff = netdev_active_features_xor(dev, features);
if (diff & NETIF_F_RX_UDP_TUNNEL_PORT) {
/* udp_tunnel_{get,drop}_rx_info both need
@@ -163,7 +163,7 @@ static int ethtool_set_features(struct net_device *dev, void __user *useraddr)
netdev_wanted_features_direct_or(dev, tmp);
__netdev_update_features(dev);
- tmp = dev->wanted_features ^ dev->active_features;
+ tmp = netdev_wanted_features_xor(dev, dev->active_features);
if (tmp & valid)
ret |= ETHTOOL_F_WISH;
@@ -366,7 +366,7 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data)
ð_all_features);
/* allow changing only bits set in hw_features */
- changed = dev->active_features ^ features;
+ changed = netdev_active_features_xor(dev, features);
changed &= eth_all_features;
tmp = changed & ~dev->hw_features;
if (tmp)
Replace the '^' operations of features by netdev_features_xor helpers. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- drivers/net/ethernet/sfc/efx_common.c | 2 +- drivers/net/ethernet/sfc/falcon/efx.c | 2 +- include/linux/netdevice.h | 2 +- net/core/dev.c | 2 +- net/ethtool/ioctl.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-)