提交 4bd9d507 编写于 作者: A Aya Levin 提交者: Saeed Mahameed

net/mlx5e: Enforce setting of a single FEC mode

Ethtool command allow setting of several FEC modes in a single set
command. The driver can only set a single FEC mode at a time. With this
patch driver will reply not-supported on setting several FEC modes.
Signed-off-by: NAya Levin <ayal@mellanox.com>
Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
上级 511aa2aa
无相关合并请求
......@@ -1541,6 +1541,10 @@ static int mlx5e_set_fecparam(struct net_device *netdev,
int mode;
int err;
if (bitmap_weight((unsigned long *)&fecparam->fec,
ETHTOOL_FEC_BASER_BIT + 1) > 1)
return -EOPNOTSUPP;
for (mode = 0; mode < ARRAY_SIZE(pplm_fec_2_ethtool); mode++) {
if (!(pplm_fec_2_ethtool[mode] & fecparam->fec))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部