aboutsummaryrefslogtreecommitdiffstats
path: root/net/dcb/dcbnl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dcb/dcbnl.c')
-rw-r--r--net/dcb/dcbnl.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index f8b98d89c285..ca11d283bbeb 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -471,7 +471,11 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlmsghdr *nlh,
471 id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); 471 id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]);
472 472
473 if (netdev->dcbnl_ops->getapp) { 473 if (netdev->dcbnl_ops->getapp) {
474 up = netdev->dcbnl_ops->getapp(netdev, idtype, id); 474 ret = netdev->dcbnl_ops->getapp(netdev, idtype, id);
475 if (ret < 0)
476 return ret;
477 else
478 up = ret;
475 } else { 479 } else {
476 struct dcb_app app = { 480 struct dcb_app app = {
477 .selector = idtype, 481 .selector = idtype,
@@ -538,6 +542,8 @@ static int dcbnl_setapp(struct net_device *netdev, struct nlmsghdr *nlh,
538 542
539 if (netdev->dcbnl_ops->setapp) { 543 if (netdev->dcbnl_ops->setapp) {
540 ret = netdev->dcbnl_ops->setapp(netdev, idtype, id, up); 544 ret = netdev->dcbnl_ops->setapp(netdev, idtype, id, up);
545 if (ret < 0)
546 return ret;
541 } else { 547 } else {
542 struct dcb_app app; 548 struct dcb_app app;
543 app.selector = idtype; 549 app.selector = idtype;
@@ -1770,7 +1776,7 @@ EXPORT_SYMBOL(dcb_getapp);
1770 * 1776 *
1771 * Priority 0 is an invalid priority in CEE spec. This routine 1777 * Priority 0 is an invalid priority in CEE spec. This routine
1772 * removes applications from the app list if the priority is 1778 * removes applications from the app list if the priority is
1773 * set to zero. 1779 * set to zero. Priority is expected to be 8-bit 802.1p user priority bitmap
1774 */ 1780 */
1775int dcb_setapp(struct net_device *dev, struct dcb_app *new) 1781int dcb_setapp(struct net_device *dev, struct dcb_app *new)
1776{ 1782{
@@ -1831,7 +1837,8 @@ EXPORT_SYMBOL(dcb_ieee_getapp_mask);
1831 * 1837 *
1832 * This adds Application data to the list. Multiple application 1838 * This adds Application data to the list. Multiple application
1833 * entries may exists for the same selector and protocol as long 1839 * entries may exists for the same selector and protocol as long
1834 * as the priorities are different. 1840 * as the priorities are different. Priority is expected to be a
1841 * 3-bit unsigned integer
1835 */ 1842 */
1836int dcb_ieee_setapp(struct net_device *dev, struct dcb_app *new) 1843int dcb_ieee_setapp(struct net_device *dev, struct dcb_app *new)
1837{ 1844{