On 2017/11/4 3:52, Florian Fainelli wrote:
> On 11/02/2017 09:18 PM, Lipeng wrote:
>> From: Fuyun Liang <[email protected]>
>>
>> This patch adds set_link_ksettings support for ethtool cmd.
>>
>> Signed-off-by: Fuyun Liang <[email protected]>
>> Signed-off-by: Lipeng <[email protected]>
>> ---
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>> index c7b8ebd..7fe193b 100644
>> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
>> @@ -653,6 +653,16 @@ static int hns3_get_link_ksettings(struct net_device *netdev,
>> return 0;
>> }
>>
>> +static int hns3_set_link_ksettings(struct net_device *netdev,
>> + const struct ethtool_link_ksettings *cmd)
>> +{
>> + /* Only support ksettings_set for netdev with phy attached for now */
>> + if (netdev->phydev)
>> + return phy_ethtool_ksettings_set(netdev->phydev, cmd);
>> +
>> + return -EOPNOTSUPP;
> Consider using phy_ethtool_get_link_ksettings() which already checks for
> netdev->phydev.
agree, Thanks for your comment.
as this patch has been applied to net-next, we will push another
cleanup patch.
From 1583075895004028493@xxx Fri Nov 03 19:53:41 +0000 2017
X-GM-THRID: 1583015474965024164
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread