lede/package/qca/qca-nss-drv/patches/0015-nss-drv-fix-igs.patch
2025-05-26 18:15:31 +08:00

41 lines
1.2 KiB
Diff

--- a/nss_igs.c
+++ b/nss_igs.c
@@ -163,7 +163,7 @@ EXPORT_SYMBOL(nss_igs_register_if);
* nss_igs_get_context()
* Get the IGS context.
*/
-struct nss_ctx_instance *nss_igs_get_context()
+struct nss_ctx_instance *nss_igs_get_context(void)
{
return (struct nss_ctx_instance *)&nss_top_main.nss[nss_top_main.igs_handler_id];
}
@@ -177,8 +177,9 @@ EXPORT_SYMBOL(nss_igs_get_context);
void nss_igs_module_save(struct tc_action_ops *act, struct module *module)
{
nss_assert(act);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0))
nss_assert(act->type == TCA_ACT_MIRRED_NSS);
-
+#endif
nss_igs_module = module;
}
EXPORT_SYMBOL(nss_igs_module_save);
@@ -188,7 +189,7 @@ EXPORT_SYMBOL(nss_igs_module_save);
* nss_igs_module_get()
* Get the ingress shaping module reference.
*/
-bool nss_igs_module_get()
+bool nss_igs_module_get(void)
{
nss_assert(nss_igs_module);
return try_module_get(nss_igs_module);
@@ -199,7 +200,7 @@ EXPORT_SYMBOL(nss_igs_module_get);
* nss_igs_module_put()
* Release the ingress shaping module reference.
*/
-void nss_igs_module_put()
+void nss_igs_module_put(void)
{
nss_assert(nss_igs_module);
module_put(nss_igs_module);