diff options
| author | Jeremy Kerr <[email protected]> | 2021-07-29 02:20:44 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-07-29 14:06:50 +0000 |
| commit | 583be982d93479ea3d85091b0fd0b01201ede87d (patch) | |
| tree | b4407ff68cdafc6bea2041b6ca0dac5be0a1bfa2 /net/mctp/af_mctp.c | |
| parent | mctp: Add initial driver infrastructure (diff) | |
| download | kernel-583be982d93479ea3d85091b0fd0b01201ede87d.tar.gz kernel-583be982d93479ea3d85091b0fd0b01201ede87d.zip | |
mctp: Add device handling and netlink interface
This change adds the infrastructure for managing MCTP netdevices; we add
a pointer to the AF_MCTP-specific data to struct netdevice, and hook up
the rtnetlink operations for adding and removing addresses.
Includes changes from Matt Johnston <[email protected]>.
Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/mctp/af_mctp.c')
| -rw-r--r-- | net/mctp/af_mctp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index b3aeca6486e3..401b4fa141a5 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -6,13 +6,18 @@ * Copyright (c) 2021 Google */ +#include <linux/if_arp.h> #include <linux/net.h> #include <linux/mctp.h> #include <linux/module.h> #include <linux/socket.h> +#include <net/mctp.h> +#include <net/mctpdevice.h> #include <net/sock.h> +/* socket implementation */ + struct mctp_sock { struct sock sk; }; @@ -152,6 +157,8 @@ static __init int mctp_init(void) if (rc) goto err_unreg_sock; + mctp_device_init(); + return 0; err_unreg_sock: @@ -162,6 +169,7 @@ err_unreg_sock: static __exit void mctp_exit(void) { + mctp_device_exit(); proto_unregister(&mctp_proto); sock_unregister(PF_MCTP); } |
