mlxsw: spectrum: Fix misuse of hard_header_len
authorYotam Gigi <yotamg@mellanox.com>
Tue, 4 Oct 2016 07:46:04 +0000 (09:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Oct 2016 00:27:54 +0000 (20:27 -0400)
In order to specify that the mlxsw spectrum driver needs additional
headroom for packets, there have been use of the hard_header_len field of
the netdevice struct.

This commit changes that to use needed_headroom instead, as this is the
correct way to do that.

Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

index fd74d1064ff3d932f152c690152528e3502ef0b0..1ec0a4ce3c46edddc4fc0d63e67706d6459e10f3 100644 (file)
@@ -2285,7 +2285,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
        /* Each packet needs to have a Tx header (metadata) on top all other
         * headers.
         */
-       dev->hard_header_len += MLXSW_TXHDR_LEN;
+       dev->needed_headroom = MLXSW_TXHDR_LEN;
 
        err = mlxsw_sp_port_system_port_mapping_set(mlxsw_sp_port);
        if (err) {