On Tue, Dec 11, 2018 at 3:58 PM Jiri Pirko <[email protected]> wrote:
>
> Tue, Dec 11, 2018 at 09:46:47AM CET, [email protected] wrote:
> >wake-on-lan - Enables Wake on Lan for this port. If enabled,
> >the controller asserts a wake pin based on the wake-on-lan type.
> >
> >Cc: Jiri Pirko <[email protected]>
> >Signed-off-by: Vasundhara Volam <[email protected]>
> >---
> > include/net/devlink.h | 16 ++++++++++++++++
> > net/core/devlink.c    |  5 +++++
> > 2 files changed, 21 insertions(+)
> >
> >diff --git a/include/net/devlink.h b/include/net/devlink.h
> >index db413d3..93a1030 100644
> >--- a/include/net/devlink.h
> >+++ b/include/net/devlink.h
> >@@ -367,12 +367,25 @@ enum devlink_param_generic_id {
> >       DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
> >       DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
> >       DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
> >+      DEVLINK_PARAM_GENERIC_ID_WOL,
> >
> >       /* add new param generic ids above here*/
> >       __DEVLINK_PARAM_GENERIC_ID_MAX,
> >       DEVLINK_PARAM_GENERIC_ID_MAX = __DEVLINK_PARAM_GENERIC_ID_MAX - 1,
> > };
> >
> >+enum devlink_param_wol_types {
> >+      DEVLINK_PARAM_WOL_DISABLE = 0,
> >+      DEVLINK_PARAM_WOL_MAGIC_PKT,
> >+      DEVLINK_PARAM_WOL_PHY,
> >+      DEVLINK_PARAM_WOL_UNICAST,
> >+      DEVLINK_PARAM_WOL_MULTICAST,
> >+      DEVLINK_PARAM_WOL_BROADCAST,
> >+      DEVLINK_PARAM_WOL_ARP,
> >+      DEVLINK_PARAM_WOL_SECURE,
> >+      DEVLINK_PARAM_WOL_FILTERS,
>
> No need to put unused values to enum now. They should be added only when
> used.
Okay, I will remove them in next version. Thanks.
>
>
> >+};
> >+
> > #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_NAME "internal_error_reset"
> > #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_TYPE DEVLINK_PARAM_TYPE_BOOL
> >
> >@@ -397,6 +410,9 @@ enum devlink_param_generic_id {
> > #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME "fw_load_policy"
> > #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE DEVLINK_PARAM_TYPE_U8
> >
> >+#define DEVLINK_PARAM_GENERIC_WOL_NAME "wake-on-lan"
> >+#define DEVLINK_PARAM_GENERIC_WOL_TYPE DEVLINK_PARAM_TYPE_U8
> >+
> > #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)    \
> > {                                                                     \
> >       .id = DEVLINK_PARAM_GENERIC_ID_##_id,                           \
> >diff --git a/net/core/devlink.c b/net/core/devlink.c
> >index 6bd7e13..cbdccb2 100644
> >--- a/net/core/devlink.c
> >+++ b/net/core/devlink.c
> >@@ -2697,6 +2697,11 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, 
> >struct genl_info *info)
> >               .name = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME,
> >               .type = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE,
> >       },
> >+      {
> >+              .id = DEVLINK_PARAM_GENERIC_ID_WOL,
> >+              .name = DEVLINK_PARAM_GENERIC_WOL_NAME,
> >+              .type = DEVLINK_PARAM_GENERIC_WOL_TYPE,
> >+      },
> > };
> >
> > static int devlink_param_generic_verify(const struct devlink_param *param)
> >--
> >1.8.3.1
> >

Reply via email to