18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2010, Intel Corporation. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Author: John Fastabend <john.r.fastabend@intel.com> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <linux/rtnetlink.h> 98c2ecf20Sopenharmony_ci#include <linux/notifier.h> 108c2ecf20Sopenharmony_ci#include <linux/export.h> 118c2ecf20Sopenharmony_ci#include <net/dcbevent.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic ATOMIC_NOTIFIER_HEAD(dcbevent_notif_chain); 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciint register_dcbevent_notifier(struct notifier_block *nb) 168c2ecf20Sopenharmony_ci{ 178c2ecf20Sopenharmony_ci return atomic_notifier_chain_register(&dcbevent_notif_chain, nb); 188c2ecf20Sopenharmony_ci} 198c2ecf20Sopenharmony_ciEXPORT_SYMBOL(register_dcbevent_notifier); 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciint unregister_dcbevent_notifier(struct notifier_block *nb) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci return atomic_notifier_chain_unregister(&dcbevent_notif_chain, nb); 248c2ecf20Sopenharmony_ci} 258c2ecf20Sopenharmony_ciEXPORT_SYMBOL(unregister_dcbevent_notifier); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciint call_dcbevent_notifiers(unsigned long val, void *v) 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci return atomic_notifier_call_chain(&dcbevent_notif_chain, val, v); 308c2ecf20Sopenharmony_ci} 31