[OpenWrt-Devel] [PATCH 2/2] swconfig: add API for setting port link speed

Rafał Miłecki zajec5 at gmail.com
Thu Dec 31 06:14:13 EST 2015


On 29 December 2015 at 14:02, Rafał Miłecki <zajec5 at gmail.com> wrote:
> @@ -595,6 +614,33 @@ swconfig_parse_ports(struct sk_buff *msg, struct nlattr *head,
>  }
>
>  static int
> +swconfig_parse_link(struct sk_buff *msg, struct nlattr *nla,
> +                   struct switch_port_link *link)
> +{
> +       struct nlattr *tb[SWITCH_LINK_ATTR_MAX + 1];
> +
> +       if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy))
> +               return -EINVAL;
> +
> +       if (!tb[SWITCH_PORT_ID])
> +               return -EINVAL;

Invalid check, copy & paste mistake, drop it.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list