162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2010, Intel Corporation. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Author: John Fastabend <john.r.fastabend@intel.com> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/rtnetlink.h> 962306a36Sopenharmony_ci#include <linux/notifier.h> 1062306a36Sopenharmony_ci#include <linux/export.h> 1162306a36Sopenharmony_ci#include <net/dcbevent.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_cistatic ATOMIC_NOTIFIER_HEAD(dcbevent_notif_chain); 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciint register_dcbevent_notifier(struct notifier_block *nb) 1662306a36Sopenharmony_ci{ 1762306a36Sopenharmony_ci return atomic_notifier_chain_register(&dcbevent_notif_chain, nb); 1862306a36Sopenharmony_ci} 1962306a36Sopenharmony_ciEXPORT_SYMBOL(register_dcbevent_notifier); 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciint unregister_dcbevent_notifier(struct notifier_block *nb) 2262306a36Sopenharmony_ci{ 2362306a36Sopenharmony_ci return atomic_notifier_chain_unregister(&dcbevent_notif_chain, nb); 2462306a36Sopenharmony_ci} 2562306a36Sopenharmony_ciEXPORT_SYMBOL(unregister_dcbevent_notifier); 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciint call_dcbevent_notifiers(unsigned long val, void *v) 2862306a36Sopenharmony_ci{ 2962306a36Sopenharmony_ci return atomic_notifier_call_chain(&dcbevent_notif_chain, val, v); 3062306a36Sopenharmony_ci} 31