From: Yotam Gigi <yot...@mellanox.com>

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 <yot...@mellanox.com>
Acked-by: Ido Schimmel <ido...@mellanox.com>
Signed-off-by: Jiri Pirko <j...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index d48873b..f3ef588 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2129,7 +2129,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) {
-- 
2.5.5

Reply via email to