--- a/nss_ppe_vp.c +++ b/nss_ppe_vp.c @@ -783,24 +783,6 @@ static struct ctl_table nss_ppe_vp_table { } }; -static struct ctl_table nss_ppe_vp_dir[] = { - { - .procname = "ppe_vp", - .mode = 0555, - .child = nss_ppe_vp_table, - }, - { } -}; - -static struct ctl_table nss_ppe_vp_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_ppe_vp_dir, - }, - { } -}; - static struct ctl_table_header *nss_ppe_vp_procfs_header; /* @@ -812,7 +794,7 @@ void nss_ppe_vp_procfs_register(void) /* * Register sysctl table. */ - nss_ppe_vp_procfs_header = register_sysctl_table(nss_ppe_vp_root_dir); + nss_ppe_vp_procfs_header = register_sysctl("dev/nss/ppe_vp", nss_ppe_vp_table); } /* --- a/nss_pppoe.c +++ b/nss_pppoe.c @@ -353,33 +353,6 @@ static struct ctl_table nss_pppoe_table[ { } }; -static struct ctl_table nss_pppoe_dir[] = { - { - .procname = "pppoe", - .mode = 0555, - .child = nss_pppoe_table, - }, - { } -}; - -static struct ctl_table nss_pppoe_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_pppoe_dir, - }, - { } -}; - -static struct ctl_table nss_pppoe_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_pppoe_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_pppoe_header; /* @@ -391,7 +364,7 @@ void nss_pppoe_register_sysctl(void) /* * Register sysctl table. */ - nss_pppoe_header = register_sysctl_table(nss_pppoe_root); + nss_pppoe_header = register_sysctl("dev/nss/pppoe", nss_pppoe_table); } /* --- a/nss_c2c_tx.c +++ b/nss_c2c_tx.c @@ -334,33 +334,6 @@ static struct ctl_table nss_c2c_tx_table { } }; -static struct ctl_table nss_c2c_tx_dir[] = { - { - .procname = "c2c_tx", - .mode = 0555, - .child = nss_c2c_tx_table, - }, - { } -}; - -static struct ctl_table nss_c2c_tx_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_c2c_tx_dir, - }, - { } -}; - -static struct ctl_table nss_c2c_tx_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_c2c_tx_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_c2c_tx_header; /* @@ -378,7 +351,7 @@ void nss_c2c_tx_register_sysctl(void) /* * Register sysctl table. */ - nss_c2c_tx_header = register_sysctl_table(nss_c2c_tx_root); + nss_c2c_tx_header = register_sysctl("dev/nss/c2c_tx", nss_c2c_tx_table); } /* --- a/nss_ipv4.c +++ b/nss_ipv4.c @@ -712,33 +712,6 @@ static struct ctl_table nss_ipv4_table[] { } }; -static struct ctl_table nss_ipv4_dir[] = { - { - .procname = "ipv4cfg", - .mode = 0555, - .child = nss_ipv4_table, - }, - { } -}; - -static struct ctl_table nss_ipv4_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_ipv4_dir, - }, - { } -}; - -static struct ctl_table nss_ipv4_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_ipv4_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_ipv4_header; /* @@ -753,7 +726,7 @@ void nss_ipv4_register_sysctl(void) /* * Register sysctl table. */ - nss_ipv4_header = register_sysctl_table(nss_ipv4_root); + nss_ipv4_header = register_sysctl("dev/nss/ipv4cfg", nss_ipv4_table); } /* --- a/nss_ipv6.c +++ b/nss_ipv6.c @@ -18,6 +18,7 @@ * nss_ipv6.c * NSS IPv6 APIs */ +#include "linux/ipv6.h" #include #include "nss_dscp_map.h" #include "nss_ipv6_stats.h" @@ -377,7 +378,7 @@ EXPORT_SYMBOL(nss_ipv6_get_mgr); * nss_ipv6_register_handler() * Register our handler to receive messages for this interface */ -void nss_ipv6_register_handler() +void nss_ipv6_register_handler(void) { struct nss_ctx_instance *nss_ctx = nss_ipv6_get_mgr(); @@ -706,33 +707,6 @@ static struct ctl_table nss_ipv6_table[] { } }; -static struct ctl_table nss_ipv6_dir[] = { - { - .procname = "ipv6cfg", - .mode = 0555, - .child = nss_ipv6_table, - }, - { } -}; - -static struct ctl_table nss_ipv6_root_dir[] = { - { - .procname = "nss", - .mode = 0555, - .child = nss_ipv6_dir, - }, - { } -}; - -static struct ctl_table nss_ipv6_root[] = { - { - .procname = "dev", - .mode = 0555, - .child = nss_ipv6_root_dir, - }, - { } -}; - static struct ctl_table_header *nss_ipv6_header; /* @@ -747,7 +721,7 @@ void nss_ipv6_register_sysctl(void) /* * Register sysctl table. */ - nss_ipv6_header = register_sysctl_table(nss_ipv6_root); + nss_ipv6_header = register_sysctl("dev/nss/ipv6cfg", nss_ipv6_table); } /* --- a/nss_pm.c +++ b/nss_pm.c @@ -326,6 +326,7 @@ error: nss_pm_interface_status_t nss_pm_set_perf_level(void *handle, nss_pm_perf_level_t lvl) { #if ((NSS_DT_SUPPORT == 1) && (NSS_FREQ_SCALE_SUPPORT == 1)) +#if !defined(NSS_HAL_IPQ807x_SUPPORT) nss_freq_scales_t index; switch (lvl) { @@ -341,7 +342,6 @@ nss_pm_interface_status_t nss_pm_set_per index = NSS_FREQ_MID_SCALE; } -#if !defined(NSS_HAL_IPQ807x_SUPPORT) nss_freq_sched_change(index, false); #endif