as it doesn't seem to offer anything of value. There's only 1 trivial user: int lowpan_ndisc_is_useropt(u8 nd_opt_type) { return nd_opt_type == ND_OPT_6CO; } but there's no harm to always treating that as a useropt...
Unified · Split
| @@ -147,11 +147,6 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int type, const void *data, · 146 unmodified lines | ||
| 147 | 147 | * The following hooks can be defined; unless noted otherwise, they are |
| 148 | 148 | * optional and can be filled with a null pointer. |
| 149 | 149 | * |
| 150 | − * int (*is_useropt)(u8 nd_opt_type): | |
| 151 | − * This function is called when IPv6 decide RA userspace options. if | |
| 152 | − * this function returns 1 then the option given by nd_opt_type will | |
| 153 | − * be handled as userspace option additional to the IPv6 options. | |
| 154 | − * | |
| 155 | 150 | * int (*parse_options)(const struct net_device *dev, |
| 156 | 151 | * struct nd_opt_hdr *nd_opt, |
| 157 | 152 | * struct ndisc_options *ndopts): |
| @@ -200,7 +195,6 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int type, const void *data, · 42 unmodified lines | ||
| 200 | 195 | * addresses. E.g. 802.15.4 6LoWPAN. |
| 201 | 196 | */ |
| 202 | 197 | struct ndisc_ops { |
| 203 | − int (*is_useropt)(u8 nd_opt_type); | |
| 204 | 198 | int (*parse_options)(const struct net_device *dev, |
| 205 | 199 | struct nd_opt_hdr *nd_opt, |
| 206 | 200 | struct ndisc_options *ndopts); |
| @@ -224,15 +218,6 @@ struct ndisc_ops { · 17 unmodified lines | ||
| 224 | 218 | }; |
| 225 | 219 | |
| 226 | 220 | #if IS_ENABLED(CONFIG_IPV6) |
| 227 | −static inline int ndisc_ops_is_useropt(const struct net_device *dev, | |
| 228 | − u8 nd_opt_type) | |
| 229 | −{ | |
| 230 | − if (dev->ndisc_ops && dev->ndisc_ops->is_useropt) | |
| 231 | − return dev->ndisc_ops->is_useropt(nd_opt_type); | |
| 232 | − else | |
| 233 | − return 0; | |
| 234 | −} | |
| 235 | − | |
| 236 | 221 | static inline int ndisc_ops_parse_options(const struct net_device *dev, |
| 237 | 222 | struct nd_opt_hdr *nd_opt, |
| 238 | 223 | struct ndisc_options *ndopts) |
| @@ -11,11 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | #include "6lowpan_i.h" |
| 13 | 13 | |
| 14 | −static int lowpan_ndisc_is_useropt(u8 nd_opt_type) | |
| 15 | −{ | |
| 16 | − return nd_opt_type == ND_OPT_6CO; | |
| 17 | −} | |
| 18 | − | |
| 19 | 14 | #if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) |
| 20 | 15 | #define NDISC_802154_SHORT_ADDR_LENGTH 1 |
| 21 | 16 | static int lowpan_ndisc_parse_802154_options(const struct net_device *dev, |
| @@ -222,7 +217,6 @@ static void lowpan_ndisc_prefix_rcv_add_addr(struct net *net, · 200 unmodified lines | ||
| 222 | 217 | #endif |
| 223 | 218 | |
| 224 | 219 | const struct ndisc_ops lowpan_ndisc_ops = { |
| 225 | − .is_useropt = lowpan_ndisc_is_useropt, | |
| 226 | 220 | #if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) |
| 227 | 221 | .parse_options = lowpan_ndisc_parse_options, |
| 228 | 222 | .update = lowpan_ndisc_update, |
| @@ -200,9 +200,9 @@ static inline int ndisc_is_useropt(const struct net_device *dev, · 199 unmodified lines | ||
| 200 | 200 | return opt->nd_opt_type == ND_OPT_PREFIX_INFO || |
| 201 | 201 | opt->nd_opt_type == ND_OPT_RDNSS || |
| 202 | 202 | opt->nd_opt_type == ND_OPT_DNSSL || |
| 203 | + opt->nd_opt_type == ND_OPT_6CO || | |
| 203 | 204 | opt->nd_opt_type == ND_OPT_CAPTIVE_PORTAL || |
| 204 | − opt->nd_opt_type == ND_OPT_PREF64 || | |
| 205 | − ndisc_ops_is_useropt(dev, opt->nd_opt_type); | |
| 205 | + opt->nd_opt_type == ND_OPT_PREF64; | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | static struct nd_opt_hdr *ndisc_next_useropt(const struct net_device *dev, |