Commit a86e86db authored by Jian Shen's avatar Jian Shen Committed by Jakub Kicinski

net: ionic: fix error check for vlan flags in ionic_set_nic_features()

The prototype of input features of ionic_set_nic_features() is
netdev_features_t, but the vlan_flags is using the private
definition of ionic drivers. It should use the variable
ctx.cmd.lif_setattr.features, rather than features to check
the vlan flags. So fixes it.

Fixes: beead698 ("ionic: Add the basic NDO callbacks for netdev support")
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Acked-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7dc839fe
...@@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif, ...@@ -1437,7 +1437,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif,
if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH) if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH)
ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL); ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL);
if ((vlan_flags & features) && if ((vlan_flags & le64_to_cpu(ctx.cmd.lif_setattr.features)) &&
!(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features))) !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features)))
dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n"); dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment