uimage_verify_default);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_of_match_table[] = {
{ .compatible = "denx,uimage" },
{},
};
-#endif
static struct mtd_part_parser uimage_generic_parser = {
.owner = THIS_MODULE,
.name = "uimage-fw",
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_of_match_table,
-#endif
.parse_fn = mtdsplit_uimage_parse_generic,
.type = MTD_PARSER_TYPE_FIRMWARE,
};
uimage_verify_wndr3700);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_netgear_of_match_table[] = {
{ .compatible = "netgear,uimage" },
{},
};
-#endif
static struct mtd_part_parser uimage_netgear_parser = {
.owner = THIS_MODULE,
.name = "netgear-fw",
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_netgear_of_match_table,
-#endif
.parse_fn = mtdsplit_uimage_parse_netgear,
.type = MTD_PARSER_TYPE_FIRMWARE,
};
uimage_find_edimax);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_edimax_of_match_table[] = {
{ .compatible = "edimax,uimage" },
{},
};
-#endif
static struct mtd_part_parser uimage_edimax_parser = {
.owner = THIS_MODULE,
.name = "edimax-fw",
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_edimax_of_match_table,
-#endif
.parse_fn = mtdsplit_uimage_parse_edimax,
.type = MTD_PARSER_TYPE_FIRMWARE,
};
uimage_find_fonfxc);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_fonfxc_of_match_table[] = {
{ .compatible = "fonfxc,uimage" },
{},
};
-#endif
static struct mtd_part_parser uimage_fonfxc_parser = {
.owner = THIS_MODULE,
.name = "fonfxc-fw",
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_fonfxc_of_match_table,
-#endif
.parse_fn = mtdsplit_uimage_parse_fonfxc,
};
uimage_verify_okli);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
static const struct of_device_id mtdsplit_uimage_okli_of_match_table[] = {
{ .compatible = "openwrt,okli" },
{},
};
-#endif
static struct mtd_part_parser uimage_okli_parser = {
.owner = THIS_MODULE,
.name = "okli-fw",
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
.of_match_table = mtdsplit_uimage_okli_of_match_table,
-#endif
.parse_fn = mtdsplit_uimage_parse_okli,
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)
if (nla_parse_nested_deprecated(tb, SWITCH_PORT_ATTR_MAX, nla,
port_policy, NULL))
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
- if (nla_parse_nested(tb, SWITCH_PORT_ATTR_MAX, nla,
- port_policy, NULL))
#else
if (nla_parse_nested(tb, SWITCH_PORT_ATTR_MAX, nla,
- port_policy))
+ port_policy, NULL))
#endif
return -EINVAL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)
if (nla_parse_nested_deprecated(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
- if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
#else
- if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy))
+ if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
#endif
return -EINVAL;
};
static struct genl_family switch_fam = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
- .id = GENL_ID_GENERATE,
-#endif
.name = "switch",
.hdrsize = 0,
.version = 1,
{
INIT_LIST_HEAD(&swdevs);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
- return genl_register_family_with_ops(&switch_fam, swconfig_ops);
-#else
return genl_register_family(&switch_fam);
-#endif
}
static void __exit