1 // SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2 /* Do not edit directly, auto-generated from: */ 3 /* Documentation/netlink/specs/em.yaml */ 4 /* YNL-GEN kernel source */ 5 /* To regenerate run: tools/net/ynl/ynl-regen.sh */ 6 7 #include <net/netlink.h> 8 #include <net/genetlink.h> 9 10 #include "em_netlink_autogen.h" 11 12 #include <uapi/linux/energy_model.h> 13 14 /* EM_CMD_GET_PD_TABLE - do */ 15 static const struct nla_policy em_get_pd_table_nl_policy[EM_A_PD_TABLE_PD_ID + 1] = { 16 [EM_A_PD_TABLE_PD_ID] = { .type = NLA_U32, }, 17 }; 18 19 /* Ops table for em */ 20 static const struct genl_split_ops em_nl_ops[] = { 21 { 22 .cmd = EM_CMD_GET_PDS, 23 .doit = em_nl_get_pds_doit, 24 .flags = GENL_CMD_CAP_DO, 25 }, 26 { 27 .cmd = EM_CMD_GET_PD_TABLE, 28 .doit = em_nl_get_pd_table_doit, 29 .policy = em_get_pd_table_nl_policy, 30 .maxattr = EM_A_PD_TABLE_PD_ID, 31 .flags = GENL_CMD_CAP_DO, 32 }, 33 }; 34 35 static const struct genl_multicast_group em_nl_mcgrps[] = { 36 [EM_NLGRP_EVENT] = { "event", }, 37 }; 38 39 struct genl_family em_nl_family __ro_after_init = { 40 .name = EM_FAMILY_NAME, 41 .version = EM_FAMILY_VERSION, 42 .netnsok = true, 43 .parallel_ops = true, 44 .module = THIS_MODULE, 45 .split_ops = em_nl_ops, 46 .n_split_ops = ARRAY_SIZE(em_nl_ops), 47 .mcgrps = em_nl_mcgrps, 48 .n_mcgrps = ARRAY_SIZE(em_nl_mcgrps), 49 }; 50