diff options
Diffstat (limited to 'net/hsr')
-rw-r--r-- | net/hsr/hsr_netlink.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c index 0009416c08c2..5325af85eea6 100644 --- a/net/hsr/hsr_netlink.c +++ b/net/hsr/hsr_netlink.c | |||
@@ -90,8 +90,8 @@ static struct genl_family hsr_genl_family = { | |||
90 | .maxattr = HSR_A_MAX, | 90 | .maxattr = HSR_A_MAX, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct genl_multicast_group hsr_network_genl_mcgrp = { | 93 | static const struct genl_multicast_group hsr_mcgrps[] = { |
94 | .name = "hsr-network", | 94 | { .name = "hsr-network", }, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | 97 | ||
@@ -129,8 +129,7 @@ void hsr_nl_ringerror(struct hsr_priv *hsr_priv, unsigned char addr[ETH_ALEN], | |||
129 | goto nla_put_failure; | 129 | goto nla_put_failure; |
130 | 130 | ||
131 | genlmsg_end(skb, msg_head); | 131 | genlmsg_end(skb, msg_head); |
132 | genlmsg_multicast(&hsr_genl_family, skb, 0, | 132 | genlmsg_multicast(&hsr_genl_family, skb, 0, 0, GFP_ATOMIC); |
133 | hsr_network_genl_mcgrp.id, GFP_ATOMIC); | ||
134 | 133 | ||
135 | return; | 134 | return; |
136 | 135 | ||
@@ -164,8 +163,7 @@ void hsr_nl_nodedown(struct hsr_priv *hsr_priv, unsigned char addr[ETH_ALEN]) | |||
164 | goto nla_put_failure; | 163 | goto nla_put_failure; |
165 | 164 | ||
166 | genlmsg_end(skb, msg_head); | 165 | genlmsg_end(skb, msg_head); |
167 | genlmsg_multicast(&hsr_genl_family, skb, 0, | 166 | genlmsg_multicast(&hsr_genl_family, skb, 0, 0, GFP_ATOMIC); |
168 | hsr_network_genl_mcgrp.id, GFP_ATOMIC); | ||
169 | 167 | ||
170 | return; | 168 | return; |
171 | 169 | ||
@@ -416,18 +414,13 @@ int __init hsr_netlink_init(void) | |||
416 | if (rc) | 414 | if (rc) |
417 | goto fail_rtnl_link_register; | 415 | goto fail_rtnl_link_register; |
418 | 416 | ||
419 | rc = genl_register_family_with_ops(&hsr_genl_family, hsr_ops); | 417 | rc = genl_register_family_with_ops_groups(&hsr_genl_family, hsr_ops, |
418 | hsr_mcgrps); | ||
420 | if (rc) | 419 | if (rc) |
421 | goto fail_genl_register_family; | 420 | goto fail_genl_register_family; |
422 | 421 | ||
423 | rc = genl_register_mc_group(&hsr_genl_family, &hsr_network_genl_mcgrp); | ||
424 | if (rc) | ||
425 | goto fail_genl_register_mc_group; | ||
426 | |||
427 | return 0; | 422 | return 0; |
428 | 423 | ||
429 | fail_genl_register_mc_group: | ||
430 | genl_unregister_family(&hsr_genl_family); | ||
431 | fail_genl_register_family: | 424 | fail_genl_register_family: |
432 | rtnl_link_unregister(&hsr_link_ops); | 425 | rtnl_link_unregister(&hsr_link_ops); |
433 | fail_rtnl_link_register: | 426 | fail_rtnl_link_register: |