diff options
Diffstat (limited to 'net/dcb')
-rw-r--r-- | net/dcb/dcbnl.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index d900ab99814a..6b03f561caec 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -583,7 +583,7 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb, | |||
583 | u8 up, idtype; | 583 | u8 up, idtype; |
584 | int ret = -EINVAL; | 584 | int ret = -EINVAL; |
585 | 585 | ||
586 | if (!tb[DCB_ATTR_APP] || !netdev->dcbnl_ops->getapp) | 586 | if (!tb[DCB_ATTR_APP]) |
587 | goto out; | 587 | goto out; |
588 | 588 | ||
589 | ret = nla_parse_nested(app_tb, DCB_APP_ATTR_MAX, tb[DCB_ATTR_APP], | 589 | ret = nla_parse_nested(app_tb, DCB_APP_ATTR_MAX, tb[DCB_ATTR_APP], |
@@ -604,7 +604,16 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb, | |||
604 | goto out; | 604 | goto out; |
605 | 605 | ||
606 | id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); | 606 | id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); |
607 | up = netdev->dcbnl_ops->getapp(netdev, idtype, id); | 607 | |
608 | if (netdev->dcbnl_ops->getapp) { | ||
609 | up = netdev->dcbnl_ops->getapp(netdev, idtype, id); | ||
610 | } else { | ||
611 | struct dcb_app app = { | ||
612 | .selector = idtype, | ||
613 | .protocol = id, | ||
614 | }; | ||
615 | up = dcb_getapp(netdev, &app); | ||
616 | } | ||
608 | 617 | ||
609 | /* send this back */ | 618 | /* send this back */ |
610 | dcbnl_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); | 619 | dcbnl_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); |