net/mlx4_en: Avoid changing dev->features directly in run-time
authorEugenia Emantayev <eugenia@mellanox.com>
Wed, 17 Feb 2016 15:24:27 +0000 (17:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2016 15:29:27 +0000 (10:29 -0500)
commit925ab1aa9394bbaeac47ee5b65d3fdf0fb8135cf
tree79dfc56c64aa5ca9b97b8df36cef090193f6678c
parent85743f1eb34548ba4b056d2f184a3d107a3b8917
net/mlx4_en: Avoid changing dev->features directly in run-time

It's forbidden to manually change dev->features in run-time. Currently, this is
done in the driver to make sure that GSO_UDP_TUNNEL is advertized only when
VXLAN tunnel is set. However, since the stack actually does features intersection
with hw_enc_features, we can safely revert to advertizing features early when
registering the netdevice.

Fixes: f4a1edd56120 ('net/mlx4_en: Advertize encapsulation offloads [...]')
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c