diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2017-06-06 17:40:54 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-06-22 14:30:13 +0300 |
commit | c2df61376bf68c6532f75916a66c1473e1c99866 (patch) | |
tree | 9b4228c2e78a5ef550c18f490ed0296e3251ebbd /drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | |
parent | net/mlx5e: Add header re-write offloading of IPv6 hop-limit (diff) | |
download | linux-dev-c2df61376bf68c6532f75916a66c1473e1c99866.tar.xz linux-dev-c2df61376bf68c6532f75916a66c1473e1c99866.zip |
mlxfw: Make the module selectable
There are upcoming NIC (mlx5) use-cases where people want to avoid
building the mlxfw module, allow for that. The mlxsw module is
untouched and keeps selecting mlxfw.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Yotam Gigi <yotamg@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h b/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h index beea4ba83495..9ca85383aa35 100644 --- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h +++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h @@ -96,7 +96,16 @@ struct mlxfw_dev { u16 psid_size; }; +#if IS_ENABLED(CONFIG_MLXFW) int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, const struct firmware *firmware); +#else +static inline +int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, + const struct firmware *firmware) +{ + return -EOPNOTSUPP; +} +#endif #endif |