--- zzzz-none-000/linux-4.4.60/net/core/rtnetlink.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-1750e-727/linux-4.4.60/net/core/rtnetlink.c 2021-02-04 17:41:59.000000000 +0000 @@ -63,6 +63,45 @@ rtnl_calcit_func calcit; }; +#if IS_ENABLED(CONFIG_AVM_RTNETLINK_ENHANCEMENT) +static DECLARE_RWSEM(rtnl_offload_rwsem); + +void rtnl_offload_read_lock(void) +{ + down_read(&rtnl_offload_rwsem); +} +EXPORT_SYMBOL(rtnl_offload_read_lock); + +void rtnl_offload_read_unlock(void) +{ + up_read(&rtnl_offload_rwsem); +} +EXPORT_SYMBOL(rtnl_offload_read_unlock); + + +void rtnl_offload_write_lock(void) +{ + down_write(&rtnl_offload_rwsem); +} +EXPORT_SYMBOL(rtnl_offload_write_lock); + +void rtnl_offload_write_unlock(void) +{ + up_write(&rtnl_offload_rwsem); +} +EXPORT_SYMBOL(rtnl_offload_write_unlock); + +void (*wait_for_link_to_offload_cpu_hook)(void) = NULL; +EXPORT_SYMBOL(wait_for_link_to_offload_cpu_hook); + +void wait_for_link_to_offload_cpu(void){ + if(wait_for_link_to_offload_cpu_hook != NULL) + wait_for_link_to_offload_cpu_hook(); +} +#endif /* CONFIG_AVM_RTNETLINK_ENHANCEMENT */ + +// --------------------------------- + static DEFINE_MUTEX(rtnl_mutex); void rtnl_lock(void)