From 6e160c59ad0273b955b766c887100c40692a2b21 Mon Sep 17 00:00:00 2001 From: John Fastabend Date: Fri, 21 Jan 2011 16:35:18 +0000 Subject: [PATCH] --- yaml --- r: 232457 b: refs/heads/master c: 3dce38a02d6370dca690cd923619d4b00024b723 h: refs/heads/master i: 232455: 5ed7db1b433289ca5ee3c79717897d569798c039 v: v3 --- [refs] | 2 +- trunk/net/dcb/dcbnl.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e6bf35951ef0..2786a2e05c42 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5955e7524790a2c8972487ab43347c28a1931521 +refs/heads/master: 3dce38a02d6370dca690cd923619d4b00024b723 diff --git a/trunk/net/dcb/dcbnl.c b/trunk/net/dcb/dcbnl.c index d900ab99814a..6b03f561caec 100644 --- a/trunk/net/dcb/dcbnl.c +++ b/trunk/net/dcb/dcbnl.c @@ -583,7 +583,7 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb, u8 up, idtype; int ret = -EINVAL; - if (!tb[DCB_ATTR_APP] || !netdev->dcbnl_ops->getapp) + if (!tb[DCB_ATTR_APP]) goto out; 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, goto out; id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); - up = netdev->dcbnl_ops->getapp(netdev, idtype, id); + + if (netdev->dcbnl_ops->getapp) { + up = netdev->dcbnl_ops->getapp(netdev, idtype, id); + } else { + struct dcb_app app = { + .selector = idtype, + .protocol = id, + }; + up = dcb_getapp(netdev, &app); + } /* send this back */ dcbnl_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);