diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-11-16 00:49:45 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-11-16 17:28:15 +0100 |
commit | 22e801a4ac65a6e9ba517d935e5fd1951be97650 (patch) | |
tree | ebaa627566a973fd38245b0239315870ccc1c993 /backport/compat | |
parent | 45745ebfeff0628bd08525c4ad0d600febf9a2a3 (diff) |
backports: add genl_notify()
This is needed by mac80211_hwsim.
The code was copied from kernel 3.4.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport/compat')
-rw-r--r-- | backport/compat/compat-3.3.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backport/compat/compat-3.3.c b/backport/compat/compat-3.3.c index 7ddc2bd2..490c29bd 100644 --- a/backport/compat/compat-3.3.c +++ b/backport/compat/compat-3.3.c @@ -224,3 +224,16 @@ void backport_destroy_workqueue(struct workqueue_struct *wq) spin_unlock(&wq_name_lock); } EXPORT_SYMBOL_GPL(backport_destroy_workqueue); + +void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, + struct nlmsghdr *nlh, gfp_t flags) +{ + struct sock *sk = net->genl_sock; + int report = 0; + + if (nlh) + report = nlmsg_report(nlh); + + nlmsg_notify(sk, skb, pid, group, report, flags); +} +EXPORT_SYMBOL_GPL(genl_notify); |