From dcc39ce3833585ec968d19e74bb50f335114b55e Mon Sep 17 00:00:00 2001 From: Algernon Date: Sat, 26 Aug 2023 10:37:04 +0800 Subject: [PATCH 232/283] net:ethtool Fix the Kabi problem is caused by the new FEC callback function in ethtool_ops driver inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8EN49 -------------------------------- Fix it because ethtool_ Add member get in the ops structure_ Fec_ Stats, as well as genl_ Kabi change caused by adding member maxattr in the ops structure. Signed-off-by: Xiaodong Li --- include/linux/ethtool.h | 2 ++ include/net/genetlink.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 56bc3e94af94..4bc3cd4060da 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -527,8 +527,10 @@ struct ethtool_ops { struct ethtool_link_ksettings *); int (*set_link_ksettings)(struct net_device *, const struct ethtool_link_ksettings *); +#ifndef __GENKSYMS__ void (*get_fec_stats)(struct net_device *dev, struct ethtool_fec_stats *fec_stats); +#endif int (*get_fecparam)(struct net_device *, struct ethtool_fecparam *); int (*set_fecparam)(struct net_device *, diff --git a/include/net/genetlink.h b/include/net/genetlink.h index a057409a44a5..83554e1cc08e 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -141,14 +141,16 @@ static inline int genl_err_attr(struct genl_info *info, int err, * @done: completion callback for dumps */ struct genl_ops { + const struct nla_policy *policy; int (*doit)(struct sk_buff *skb, struct genl_info *info); int (*start)(struct netlink_callback *cb); int (*dumpit)(struct sk_buff *skb, struct netlink_callback *cb); int (*done)(struct netlink_callback *cb); - const struct nla_policy *policy; +#ifndef __GENKSYMS__ unsigned int maxattr; +#endif u8 cmd; u8 internal_flags; u8 flags; -- 2.34.1