net: hns3: fix for FEC configuration
authorJian Shen <shenjian15@huawei.com>
Fri, 24 May 2019 11:19:48 +0000 (19:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:10:16 +0000 (09:10 +0200)
commit0fe85abd22af3f1675e70fe92f8365c495960315
tree5701b438f375001c5d85dbe34615ff4d07c4946d
parentff081970a4340d6e3348111abbfef8903ec56ae8
net: hns3: fix for FEC configuration

[ Upstream commit f438bfe9d4fe2e491505abfbf04d7c506e00d146 ]

The FEC capbility may be changed with port speed changes. Driver
needs to read the active FEC mode, and update FEC capability
when port speed changes.

Fixes: 7e6ec9148a1d ("net: hns3: add support for FEC encoding control")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c